summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CSharp/Ivy/Ivy/Ivy.cs40
1 files changed, 15 insertions, 25 deletions
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
}
/// <summary>AppName the application name</summary>
[Category("Ivy")]
+ [Bindable(true)]
+ [DefaultValue(null)]
public string AppName
{
set
@@ -141,6 +145,7 @@ namespace IvyBus
}
/// <summary>AppPriority the Application Priority: the clients list is sorted against priority</summary>
[Category("Ivy")]
+ [DefaultValue(DEFAULT_PRIORITY)]
public ushort AppPriority
{
set
@@ -174,7 +179,8 @@ namespace IvyBus
///<remarks> optimise the parsing process when sending messages </remarks>
///</summary>
[Category("Ivy")]
- public string[] SentMessageClasses
+ [DefaultValue(null)]
+ public string[] SentMessageClasses
{
get
{
@@ -188,6 +194,8 @@ namespace IvyBus
}
/// <summary>ReadyMessage message send when Application receive all the regexp at the connection of the client</summary>
[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));
}
}