From f2cc6529ae1b6043865442af2330dac08a3f7f01 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:58:17 +0000 Subject: Utilisateur : Fcolin Date : 23/12/05 Heure : 16:22 Archivé dans $/CSharp/Ivy Commentaire: (vss 28) --- CSharp/Ivy/IvyPPC/IvyClient.cs | 34 +++------------------------------- 1 file changed, 3 insertions(+), 31 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/IvyPPC/IvyClient.cs b/CSharp/Ivy/IvyPPC/IvyClient.cs index 3982543..5a4a082 100644 --- a/CSharp/Ivy/IvyPPC/IvyClient.cs +++ b/CSharp/Ivy/IvyPPC/IvyClient.cs @@ -125,10 +125,7 @@ namespace IvyBus { foreach (Ivy.ApplicationBinding bind in bus.bindings.Values ) { - if ( bind.type == Ivy.BindingType.BindSimple ) - stream.TokenAddBinding(bind.key,bind.regexp); - else - stream.TokenAddRegexp(bind.key, bind.regexp); + stream.TokenAddBinding(bind); } } stream.TokenEndRegexp(); @@ -390,36 +387,11 @@ namespace IvyBus throw new IvyException(ioe.Message); } } - public void TokenAddRegexp(ushort id, string regexp) - { - if (bus.CheckRegexp(regexp)) - { - try - { - IvyBindingRegexp bind = new IvyBindingRegexp(id,regexp); - lock( bindings ) - { - bindings.Add( id, bind); - } - bus.FireClientAddBinding( this, bind.expression ); - } - catch (ArgumentException e) - { - throw new IvyException("regexp error " + e.Message); - } - } - else - { - traceDebug("regexp Warning exp='" + regexp + "' can't match removing from " + appName); - } - } - - public void TokenAddBinding(ushort id, string expression) + + internal void TokenAddBinding(IvyBindingBase bind) { try { - IvyBindingSimple bind = new IvyBindingSimple(id, expression); - lock( bindings ) { bindings.Add( id, bind); -- cgit v1.1