diff options
author | fcolin | 2007-02-01 09:46:51 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:46:51 +0000 |
commit | bfe77225e5195c34945ae343d87b076a4ee8029a (patch) | |
tree | 3e7c8ffbfb30db7858157925c9b4b66dd9d9937a | |
parent | b0657da26b9087993dc0fa5ebc9bce57c8149566 (diff) | |
download | ivy-csharp-bfe77225e5195c34945ae343d87b076a4ee8029a.zip ivy-csharp-bfe77225e5195c34945ae343d87b076a4ee8029a.tar.gz ivy-csharp-bfe77225e5195c34945ae343d87b076a4ee8029a.tar.bz2 ivy-csharp-bfe77225e5195c34945ae343d87b076a4ee8029a.tar.xz |
Utilisateur : Fcolin Date : 23/12/05 Heure : 16:22 Archivé dans $/CSharp/Ivy Commentaire: (vss 28)
-rw-r--r-- | CSharp/Ivy/Ivy/IvyClient.cs | 34 |
1 files changed, 3 insertions, 31 deletions
diff --git a/CSharp/Ivy/Ivy/IvyClient.cs b/CSharp/Ivy/Ivy/IvyClient.cs index 3982543..5a4a082 100644 --- a/CSharp/Ivy/Ivy/IvyClient.cs +++ b/CSharp/Ivy/Ivy/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);
|