From 36ba341e1e44da3ec11014643e3b8d32fdb060c8 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 09:43:22 +0000 Subject: Utilisateur : Fcolin Date : 26/01/06 Heure : 17:33 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 43) --- CSharp/Ivy/Ivy/Ivy.cs | 40 +++++++++++++++------------------------- 1 file changed, 15 insertions(+), 25 deletions(-) (limited to 'CSharp/Ivy') diff --git a/CSharp/Ivy/Ivy/Ivy.cs b/CSharp/Ivy/Ivy/Ivy.cs index 7ae6443..7ca7592 100644 --- a/CSharp/Ivy/Ivy/Ivy.cs +++ b/CSharp/Ivy/Ivy/Ivy.cs @@ -59,6 +59,8 @@ namespace IvyBus public event ClientRemoveBindingHandler BindingRemove; [Category("Ivy")] + [Bindable(true)] + [DefaultValue(false)] public bool Debug { get @@ -117,6 +119,8 @@ namespace IvyBus } /// AppName the application name [Category("Ivy")] + [Bindable(true)] + [DefaultValue(null)] public string AppName { set @@ -141,6 +145,7 @@ namespace IvyBus } /// AppPriority the Application Priority: the clients list is sorted against priority [Category("Ivy")] + [DefaultValue(DEFAULT_PRIORITY)] public ushort AppPriority { set @@ -174,7 +179,8 @@ namespace IvyBus /// optimise the parsing process when sending messages /// [Category("Ivy")] - public string[] SentMessageClasses + [DefaultValue(null)] + public string[] SentMessageClasses { get { @@ -188,6 +194,8 @@ namespace IvyBus } /// ReadyMessage message send when Application receive all the regexp at the connection of the client [Category("Ivy")] + [Bindable(true)] + [DefaultValue(null)] public string ReadyMessage { get { return ready_message; } @@ -196,6 +204,7 @@ namespace IvyBus [Category("Ivy")] + [DefaultValue(null)] public Control SyncControl { get { return syncControl; } @@ -301,26 +310,7 @@ namespace IvyBus { syncControl = sync; } - - // Dispose ressources - protected override void Dispose(bool disposing) - { - if ( disposing ) stop(); - base.Dispose(disposing); - } - - public override ISite Site - { - get { - Console.WriteLine("Site get " + base.Site); - return base.Site; - } - set{ - base.Site = value; - Console.WriteLine("Site set " + base.Site); - - } - } + // Autobinding on static method public void AutoBinding(Type type) { @@ -330,8 +320,8 @@ namespace IvyBus foreach (IvyBindingAttribute attr in Attribute.GetCustomAttributes(m, typeof(IvyBindingAttribute))) { //TODO check paramater type MessageHandler - Console.WriteLine("IvyBinding " + attr.Expression + "to Method " + m.Name); - bindMsg(attr.Expression, (MessageHandler)Delegate.CreateDelegate(typeof(MessageHandler), m)); + Console.WriteLine("IvyBinding '" + attr.GetExpression(null) + "' to Method " + m.Name); + bindMsg(attr.GetExpression(null), (MessageHandler)Delegate.CreateDelegate(typeof(MessageHandler), m)); } } } @@ -345,8 +335,8 @@ namespace IvyBus foreach (IvyBindingAttribute attr in Attribute.GetCustomAttributes(m, typeof(IvyBindingAttribute))) { //TODO check paramater type MessageHandler - Console.WriteLine("IvyBinding " + attr.Expression + "to Method " + m.Name); - bindMsg(attr.Expression, (MessageHandler)Delegate.CreateDelegate(typeof(MessageHandler), obj, m)); + Console.WriteLine("IvyBinding '" + attr.GetExpression(obj) + "' to Method " + m.Name); + bindMsg(attr.GetExpression(obj), (MessageHandler)Delegate.CreateDelegate(typeof(MessageHandler), obj, m)); } } -- cgit v1.1