From 8466f7efa5244091a2d897620dd535c542ed61a3 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 10:02:10 +0000 Subject: Utilisateur : Fcolin Date : 23/06/06 Heure : 11:12 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 15) --- CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs index 259d589..8f41f0c 100644 --- a/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs +++ b/CSharp/Ivy/IvyPPC/IvyTCPStreamV3.cs @@ -83,11 +83,17 @@ namespace IvyBus // NOt implemented in this protocol version } - void IvyProtocol.TokenAddBinding(Ivy.ApplicationBinding bind) + void IvyProtocol.TokenAddBinding(BindingType type, ushort id, string expression) { - // NO Simple Binding in this protocol - if ( bind.type == Ivy.BindingType.BindRegexp ) - sendMsg(MessageType.AddRegexp, bind.key, bind.expression); /* perhaps we should perform some checking here */ + switch (type) + { + case BindingType.Regexp: + sendMsg(MessageType.AddRegexp, id, expression); /* perhaps we should perform some checking here */ + break; + case BindingType.Simple: + // NO Simple Binding in this protocol + break; + } } void IvyProtocol.TokenDelBinding(ushort id) @@ -169,7 +175,6 @@ namespace IvyBus bool IvyProtocol.receiveMsg() { - Ivy.ApplicationBinding bind; MessageType msgType = MessageType.Die; ushort msgId = 0; string msgData = null; @@ -190,13 +195,8 @@ namespace IvyBus receiver.TokenBye(msgId, msgData); break; - case MessageType.AddRegexp: - - bind = new Ivy.ApplicationBinding(); - bind.type = Ivy.BindingType.BindRegexp; - bind.key = msgId; - bind.expression = msgData; - receiver.TokenAddBinding(bind); + case MessageType.AddRegexp: + receiver.TokenAddBinding(BindingType.Regexp, msgId, msgData); break; case MessageType.DelBinding: -- cgit v1.1