From b88133b0bf519486a7eadf55c46a815fcc090f12 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:56:20 +0000 Subject: Utilisateur : Fcolin Date : 3/07/06 Heure : 16:59 Archivé dans $/CSharp/Ivy/Ivy Commentaire: update doc (vss 72) --- CSharp/Ivy/IvyPPC/Ivy.cs | 108 +++++++++++++++++++++++------------------------ 1 file changed, 53 insertions(+), 55 deletions(-) diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs index af5096f..d81c620 100644 --- a/CSharp/Ivy/IvyPPC/Ivy.cs +++ b/CSharp/Ivy/IvyPPC/Ivy.cs @@ -42,10 +42,6 @@ namespace IvyBus { /* Event */ /// fires when a new client connect to the bus - /// A callback handling the notification of connexions and - /// disconnections, may be null - /// - /// public event EventHandler ClientConnected; /// fires when a client discconnect from the bus public event EventHandler ClientDisconnected; @@ -296,6 +292,9 @@ namespace IvyBus #endif + /// + /// Initializes a new instance of the class. + /// public Ivy() { #if (!PocketPC) @@ -315,7 +314,8 @@ namespace IvyBus { container.Add(this); } - /// Readies the structures for the software bus connexion. + /// + /// Readies the structures for the software bus connexion. /// /// This sample shows how to start working with Ivy. /// @@ -414,21 +414,19 @@ namespace IvyBus } } - /// connects the Ivy bus to a domain or list of domains. + /// + /// connects the Ivy bus to a domain or list of domains. /// + /// a domain of the form 10.0.0:1234, it is similar to the + /// netmask without the trailing .255. This will determine the meeting point + /// of the different applications. Right now, this is done with an UDP + /// broadcast. Beware of routing problems ! You can also use a comma + /// separated list of domains. /// /// One thread (IvyWatcher) for each traffic rendezvous (either UDP broadcast or TCP Multicast). /// One thread (serverThread/Ivy) to accept incoming connexions on server socket. /// a thread for each IvyClient when the connexion has been done. /// - /// a domain of the form 10.0.0:1234, it is similar to the - /// netmask without the trailing .255. This will determine the meeting point - /// of the different applications. Right now, this is done with an UDP - /// broadcast. Beware of routing problems ! You can also use a comma - /// separated list of domains. - /// * - /// - /// public void Start(string domainbus) { domainbus = GetDomain(domainbus); @@ -520,7 +518,8 @@ namespace IvyBus return d; } - /// disconnects from the Ivy bus + /// + /// disconnects from the Ivy bus /// public void Stop() { @@ -576,7 +575,8 @@ namespace IvyBus } - /// Send a formated message to someone on the bus + /// + /// Send a formated message to someone on the bus /// /// /// Performs a pattern matching according to everyone's regexps, and sends @@ -586,9 +586,8 @@ namespace IvyBus /// /// A string message format to build the message /// args used in message format - /// - /// the number of messages actually sent - /// + /// + /// the number of messages actually sent /// public int SendMsg(string format, params object[] args) { @@ -624,30 +623,19 @@ namespace IvyBus } return newbind.Key; } - /// Subscribes to a regular expression. + /// + /// Subscribes to a regular expression. /// + /// a regular expression, groups are done with parenthesis + /// any objects implementing the Ivy.MessageListener + /// The args. + /// the id of the regular expression /// /// The callback will be executed with /// the saved parameters of the regexp as arguments when a message will sent /// by another agent. A program doesn't receive its own messages. /// - /// - /// a regular expression, groups are done with parenthesis - /// - /// any objects implementing the Ivy.MessageListener - /// - /// the id of the regular expression - /// - /// // -#if OLD_API - // for compatibility raison with old IVY - [Obsolete("Will be removed in next version")] - public int bindMsg(string regexp, MessageHandler callback) - { - return bindMsg( regexp, callback, null); - } -#endif public ushort BindMsg(string regexp, EventHandler callback, params object[] args) { // creates a new binding (regexp,callback) @@ -660,11 +648,10 @@ namespace IvyBus return BindMsg(newbind); } - /// unsubscribes a regular expression + /// + /// unsubscribes a regular expression /// - /// the id of the regular expression, returned when it was bound - /// - /// + /// the id of the regular expression, returned when it was bound public void UnbindMsg(ushort id) { if (!bindings.ContainsKey(id)) @@ -681,14 +668,14 @@ namespace IvyBus lock (bindings) bindings.Remove(id); } - /// unsubscribes a regular expression + /// + /// unsubscribes a regular expression /// - /// a boolean, true if the regexp existed, false otherwise or + /// the string for the regular expression + /// + /// a boolean, true if the regexp existed, false otherwise or /// whenever an exception occured during unbinding /// - /// the string for the regular expression - /// - /// public bool UnbindMsg(string re) { foreach (IvyApplicationBinding bind in bindings.Values) @@ -710,7 +697,8 @@ namespace IvyBus } - /// Subscribes to a simple expression ( msg ar1 arg2 arg3 etc). + /// + /// Subscribes to a simple expression ( msg ar1 arg2 arg3 etc). /// /// /// The callback will be executed with @@ -719,13 +707,10 @@ namespace IvyBus /// /// /// a regular expression, groups are done with parenthesis - /// /// any objects implementing the EventHandler - /// - /// the id of the regular expression - /// + /// + /// the id of the regular expression /// - public int BindSimpleMsg(string expression, EventHandler callback, params object[] args) { // creates a new binding (regexp,callback) @@ -737,6 +722,12 @@ namespace IvyBus newbind.Args = args; return BindMsg(newbind); } + /// + /// Dies the specified target. + /// + /// The target. + /// The reason message. + /// public int Die(string target, string message) { List v = GetClientsByName(target); @@ -744,6 +735,12 @@ namespace IvyBus v[i].stream.TokenDie(0, message); return v.Count; } + /// + /// Pings the specified target. + /// + /// The target. + /// The message. + /// public int Ping(string target, string message) { List v = GetClientsByName(target); @@ -765,7 +762,7 @@ namespace IvyBus } } #else - internal virtual void FireEvent(EventHandler ev, IvyEventArgs e) + internal virtual void FireEvent(EventHandler ev, IvyEventArgs e) { if (ev != null) { @@ -902,10 +899,11 @@ namespace IvyBus } - /// gives a list of IvyClient(s) with the name given in parameter + /// + /// gives a list of IvyClient(s) with the name given in parameter /// - /// The name of the Ivy agent you're looking for - /// + /// The name of the Ivy agent you're looking for + /// public List GetClientsByName(string name) { List v = new List(); -- cgit v1.1