summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/IvyClient.cs34
1 files changed, 3 insertions, 31 deletions
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);