diff options
author | fcolin | 2007-02-01 09:56:20 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 09:56:20 +0000 |
commit | b88133b0bf519486a7eadf55c46a815fcc090f12 (patch) | |
tree | adfa81dc0e042b50fe9836f47f764415e100aaf0 /CSharp | |
parent | d035b308f89d50494e652fc7889f3f2399072cd5 (diff) | |
download | ivy-csharp-b88133b0bf519486a7eadf55c46a815fcc090f12.zip ivy-csharp-b88133b0bf519486a7eadf55c46a815fcc090f12.tar.gz ivy-csharp-b88133b0bf519486a7eadf55c46a815fcc090f12.tar.bz2 ivy-csharp-b88133b0bf519486a7eadf55c46a815fcc090f12.tar.xz |
Utilisateur : Fcolin Date : 3/07/06 Heure : 16:59 Archivé dans $/CSharp/Ivy/Ivy Commentaire: update doc (vss 72)
Diffstat (limited to 'CSharp')
-rw-r--r-- | CSharp/Ivy/IvyPPC/Ivy.cs | 108 |
1 files 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 */
/// <summary>fires when a new client connect to the bus</summary>
- /// <param name='appcb'>A callback handling the notification of connexions and
- /// disconnections, may be null
- ///
- /// </param>
public event EventHandler<IvyEventArgs> ClientConnected;
/// <summary>fires when a client discconnect from the bus</summary>
public event EventHandler<IvyEventArgs> ClientDisconnected;
@@ -296,6 +292,9 @@ namespace IvyBus #endif
+ /// <summary>
+ /// Initializes a new instance of the <see cref="T:Ivy"/> class.
+ /// </summary>
public Ivy()
{
#if (!PocketPC)
@@ -315,7 +314,8 @@ namespace IvyBus {
container.Add(this);
}
- /// <summary> Readies the structures for the software bus connexion.
+ /// <summary>
+ /// Readies the structures for the software bus connexion.
/// </summary>
/// <example> This sample shows how to start working with Ivy.
/// <code>
@@ -414,21 +414,19 @@ namespace IvyBus }
}
- /// <summary> connects the Ivy bus to a domain or list of domains.
+ /// <summary>
+ /// connects the Ivy bus to a domain or list of domains.
/// </summary>
+ /// <param name="domainbus">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.</param>
/// <remarks>
/// 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.
/// </remarks>
- /// <param name='domainbus'>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.
- /// *
- ///
- /// </param>
public void Start(string domainbus)
{
domainbus = GetDomain(domainbus);
@@ -520,7 +518,8 @@ namespace IvyBus return d;
}
- /// <summary> disconnects from the Ivy bus
+ /// <summary>
+ /// disconnects from the Ivy bus
/// </summary>
public void Stop()
{
@@ -576,7 +575,8 @@ namespace IvyBus }
- /// <summary> Send a formated message to someone on the bus
+ /// <summary>
+ /// Send a formated message to someone on the bus
/// </summary>
/// <remarks>
/// Performs a pattern matching according to everyone's regexps, and sends
@@ -586,9 +586,8 @@ namespace IvyBus /// </remarks>
/// <param name='format'>A string message format to build the message
/// <param name='args'>args used in message format
- /// </param>
- /// <returns>the number of messages actually sent
- ///
+ /// <returns>
+ /// the number of messages actually sent
/// </returns>
public int SendMsg(string format, params object[] args)
{
@@ -624,30 +623,19 @@ namespace IvyBus }
return newbind.Key;
}
- /// <summary> Subscribes to a regular expression.
+ /// <summary>
+ /// Subscribes to a regular expression.
/// </summary>
+ /// <param name="regexp">a regular expression, groups are done with parenthesis</param>
+ /// <param name="callback">any objects implementing the Ivy.MessageListener</param>
+ /// <param name="args">The args.</param>
+ /// <returns>the id of the regular expression</returns>
/// <remarks>
/// 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.
/// </remarks>
- ///
- /// <param name='regexp'>a regular expression, groups are done with parenthesis
- /// </param>
- /// <param name='callback'>any objects implementing the Ivy.MessageListener
- /// </param>
- /// <returns>the id of the regular expression
- ///
- /// </returns>
//
-#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<IvyMessageEventArgs> callback, params object[] args)
{
// creates a new binding (regexp,callback)
@@ -660,11 +648,10 @@ namespace IvyBus return BindMsg(newbind);
}
- /// <summary> unsubscribes a regular expression
+ /// <summary>
+ /// unsubscribes a regular expression
/// </summary>
- /// <param name='id'>the id of the regular expression, returned when it was bound
- ///
- /// </param>
+ /// <param name="id">the id of the regular expression, returned when it was bound</param>
public void UnbindMsg(ushort id)
{
if (!bindings.ContainsKey(id))
@@ -681,14 +668,14 @@ namespace IvyBus lock (bindings) bindings.Remove(id);
}
- /// <summary> unsubscribes a regular expression
+ /// <summary>
+ /// unsubscribes a regular expression
/// </summary>
- /// <returns>a boolean, true if the regexp existed, false otherwise or
+ /// <param name="re">the string for the regular expression</param>
+ /// <returns>
+ /// a boolean, true if the regexp existed, false otherwise or
/// whenever an exception occured during unbinding
/// </returns>
- /// <param name='re'>the string for the regular expression
- ///
- /// </param>
public bool UnbindMsg(string re)
{
foreach (IvyApplicationBinding bind in bindings.Values)
@@ -710,7 +697,8 @@ namespace IvyBus }
- /// <summary> Subscribes to a simple expression ( msg ar1 arg2 arg3 etc).
+ /// <summary>
+ /// Subscribes to a simple expression ( msg ar1 arg2 arg3 etc).
/// </summary>
/// <remarks>
/// The callback will be executed with
@@ -719,13 +707,10 @@ namespace IvyBus /// </remarks>
///
/// <param name='regexp'>a regular expression, groups are done with parenthesis
- /// </param>
/// <param name='callback'>any objects implementing the EventHandler<IvyMessageEventArgs>
- /// </param>
- /// <returns>the id of the regular expression
- ///
+ /// <returns>
+ /// the id of the regular expression
/// </returns>
-
public int BindSimpleMsg(string expression, EventHandler<IvyMessageEventArgs> callback, params object[] args)
{
// creates a new binding (regexp,callback)
@@ -737,6 +722,12 @@ namespace IvyBus newbind.Args = args;
return BindMsg(newbind);
}
+ /// <summary>
+ /// Dies the specified target.
+ /// </summary>
+ /// <param name="target">The target.</param>
+ /// <param name="message">The reason message.</param>
+ /// <returns></returns>
public int Die(string target, string message)
{
List<IvyClient> v = GetClientsByName(target);
@@ -744,6 +735,12 @@ namespace IvyBus v[i].stream.TokenDie(0, message);
return v.Count;
}
+ /// <summary>
+ /// Pings the specified target.
+ /// </summary>
+ /// <param name="target">The target.</param>
+ /// <param name="message">The message.</param>
+ /// <returns></returns>
public int Ping(string target, string message)
{
List<IvyClient> v = GetClientsByName(target);
@@ -765,7 +762,7 @@ namespace IvyBus }
}
#else
- internal virtual void FireEvent(EventHandler<IvyEventArgs> ev, IvyEventArgs e)
+ internal virtual void FireEvent(EventHandler<IvyEventArgs> ev, IvyEventArgs e)
{
if (ev != null)
{
@@ -902,10 +899,11 @@ namespace IvyBus }
- /// <summary> gives a list of IvyClient(s) with the name given in parameter
+ /// <summary>
+ /// gives a list of IvyClient(s) with the name given in parameter
/// </summary>
- /// <param name='name'>The name of the Ivy agent you're looking for
- /// </param>
+ /// <param name="name">The name of the Ivy agent you're looking for</param>
+ /// <returns></returns>
public List<IvyClient> GetClientsByName(string name)
{
List<IvyClient> v = new List<IvyClient>();
|