From 101d33cf720a21a99044ad9dbebc495c5872f930 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:58:47 +0000 Subject: Utilisateur : Fcolin Date : 20/04/06 Heure : 13:15 Archivé dans $/CSharp/Ivy/Ivy Commentaire: filtrage classes (vss 43) --- CSharp/Ivy/IvyPPC/IvyClient.cs | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'CSharp/Ivy/IvyPPC/IvyClient.cs') diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs index 1a5a350..3110a3e 100644 --- a/CSharp/Ivy/IvyPPC/IvyClient.cs +++ b/CSharp/Ivy/IvyPPC/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) { -- cgit v1.1