From 3c9d0c18a19de1f1ec1c4e77f6b89fdf84d39605 Mon Sep 17 00:00:00 2001 From: fcolin Date: Fri, 10 Oct 2008 15:45:54 +0000 Subject: Ajout de commentaire sur les menbres public --- Ivy/IvyEventArgs.cs | 61 ++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 19 deletions(-) (limited to 'Ivy/IvyEventArgs.cs') diff --git a/Ivy/IvyEventArgs.cs b/Ivy/IvyEventArgs.cs index a08f314..279f7c4 100644 --- a/Ivy/IvyEventArgs.cs +++ b/Ivy/IvyEventArgs.cs @@ -15,20 +15,32 @@ namespace IvyBus private int id; private string arg; + /// + /// the client who raise the event + /// public IvyClient Client { get { return client; } } + /// + /// the id argument of the message + /// public int Id { get { return id; } } + /// + /// the general purpose argument of the event + /// public string Argument { get { return arg; } } + /// + /// Args of Ivy generated events + /// public IvyEventArgs(IvyClient app, int id, string arg) { this.client = app; @@ -41,46 +53,57 @@ namespace IvyBus /* return value for Die Event */ private bool forceExit; + /// + /// should we exit + /// + /// + /// by default the Ivy bus will make a call to Exit + /// set this flags to false if you wan't your application to survive + /// + /// true public bool ForceExit { get { return forceExit; } set { forceExit = value; } } + /// + /// Arg of the Die Event + /// public IvyDieEventArgs(IvyClient app, int id, string arg) : base(app, id, arg) { forceExit = true; } } - public class IvyMessageEventArgs : EventArgs + public class IvyMessageEventArgs : IvyEventArgs { - private IvyClient client; - private int id; - private string[] args; - - public IvyClient Client - { - get { return client; } - } - - public int Id - { - get { return id; } - } + private string[] arg_list; + /// + /// retreive all the arguments + /// + /// public string[] GetArguments() { - return (string[])args.Clone(); + return (string[])arg_list.Clone(); } + + /// + /// retreive the argument at specified index + /// + /// + /// public string this[int index] { - get { return args[index]; } + get { return arg_list[index]; } } + /// + /// Arg for the Normal Ivy Message received + /// public IvyMessageEventArgs(IvyClient app, int id, string[] args) + : base( app, id, null) { - this.client = app; - this.id = id; - this.args = args; + this.arg_list = args; } } } -- cgit v1.1