summaryrefslogtreecommitdiff
path: root/CSharp/Ivy
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:47:21 +0000
committerfcolin2007-02-01 09:47:21 +0000
commit20be088fae37407981218836e78b5e45dd03f57d (patch)
tree819754408bd3ac51775f384f6402f2801afdc80d /CSharp/Ivy
parent8eaf8d17e4ce101fbee7c1346d5c0a17245ec30f (diff)
downloadivy-csharp-20be088fae37407981218836e78b5e45dd03f57d.zip
ivy-csharp-20be088fae37407981218836e78b5e45dd03f57d.tar.gz
ivy-csharp-20be088fae37407981218836e78b5e45dd03f57d.tar.bz2
ivy-csharp-20be088fae37407981218836e78b5e45dd03f57d.tar.xz
Utilisateur : Fcolin Date : 20/04/06 Heure : 13:15 Archivé dans $/CSharp/Ivy/Ivy Commentaire: filtrage classes (vss 43)
Diffstat (limited to 'CSharp/Ivy')
-rw-r--r--CSharp/Ivy/Ivy/IvyClient.cs30
1 files changed, 19 insertions, 11 deletions
diff --git a/CSharp/Ivy/Ivy/IvyClient.cs b/CSharp/Ivy/Ivy/IvyClient.cs
index 1a5a350..3110a3e 100644
--- a/CSharp/Ivy/Ivy/IvyClient.cs
+++ b/CSharp/Ivy/Ivy/IvyClient.cs
@@ -84,7 +84,7 @@ namespace IvyBus
private int clientPriority; /* client priority */
private volatile Thread clientThread; // volatile to ensure the quick communication
- private bool doping = false;
+ private bool doping; // false by runtime default
private const int PINGTIMEOUT = 5000;
private volatile Thread pingerThread;
@@ -384,16 +384,24 @@ namespace IvyBus
{
try
{
- lock( bindings )
- {
- IvyBindingBase binding;
- if (bind.type == Ivy.BindingType.BindRegexp)
- binding = new IvyBindingRegexp(bind.key, bind.expression);
- else
- binding = new IvyBindingSimple(bind.key, bind.expression);
- bindings.Add( bind.key, binding);
- }
- bus.FireClientAddBinding( this, bind.expression );
+ if (bind.type == Ivy.BindingType.BindRegexp && !bus.CheckRegexp(bind.expression) )
+ {
+ bus.FireClientFilterBinding(this, bind.expression);
+ return;
+ }
+ lock (bindings)
+ {
+ IvyBindingBase binding;
+ if (bind.type == Ivy.BindingType.BindRegexp)
+ {
+ binding = new IvyBindingRegexp(bind.key, bind.expression);
+ }
+ else
+ binding = new IvyBindingSimple(bind.key, bind.expression);
+ bindings.Add(bind.key, binding);
+ }
+ bus.FireClientAddBinding(this, bind.expression);
+
}
catch (ArgumentException e)
{