summaryrefslogtreecommitdiff
path: root/CSharp
diff options
context:
space:
mode:
Diffstat (limited to 'CSharp')
-rw-r--r--CSharp/Ivy/Ivy/Ivy.cs50
1 files changed, 27 insertions, 23 deletions
diff --git a/CSharp/Ivy/Ivy/Ivy.cs b/CSharp/Ivy/Ivy/Ivy.cs
index 2f522fe..402a7d1 100644
--- a/CSharp/Ivy/Ivy/Ivy.cs
+++ b/CSharp/Ivy/Ivy/Ivy.cs
@@ -41,17 +41,17 @@ namespace IvyBus
/// disconnections, may be null
///
/// </param>
- public event ClientConnectedHandler clientConnected;
+ public event ClientConnectedHandler ClientConnected;
/// <summary>fires when a client discconnect from the bus</summary>
- public event ClientDisconnectedHandler clientDisconnected;
+ public event ClientDisconnectedHandler ClientDisconnected;
/// <summary>fires when a client receive a direct message from another client</summary>
- public event DirectMessageHandler directMessageReceived;
+ public event DirectMessageHandler DirectMessageReceived;
/// <summary>fires when somebody ask for killing every client on the bus</summary>
public event DieHandler dieReceived;
/// <summary>fires when a client receive a add binding from another client</summary>
- public event ClientAddBindingHandler addBinding;
+ public event ClientAddBindingHandler BindingAdd;
/// <summary>fires when a client receive a remove binding from another client</summary>
- public event ClientRemoveBindingHandler removeBinding;
+ public event ClientRemoveBindingHandler BindingRemove;
public bool Debug
@@ -112,6 +112,10 @@ namespace IvyBus
/// <summary>AppName the application name</summary>
public string AppName
{
+ set
+ {
+ appName = value;
+ }
get
{
return appName;
@@ -622,48 +626,48 @@ namespace IvyBus
}
internal void FireDirectMessage(IvyClient app, int id, string arg)
{
- if ( directMessageReceived != null )
+ if ( DirectMessageReceived != null )
{
if (IsSynchronous())
- syncControl.Invoke( directMessageReceived, new object[]{app,id,arg});
- else directMessageReceived( app, id, arg);
+ syncControl.Invoke( DirectMessageReceived, new object[]{app,id,arg});
+ else DirectMessageReceived( app, id, arg);
}
}
internal void FireClientConnected (IvyClient app)
{
- if ( clientConnected != null )
+ if ( ClientConnected != null )
{
if (IsSynchronous())
- syncControl.Invoke( clientConnected, new object[]{app});
- else clientConnected( app);
+ syncControl.Invoke( ClientConnected, new object[]{app});
+ else ClientConnected( app);
}
}
internal void FireClientDisconnected (IvyClient app)
{
- if ( clientDisconnected != null )
+ if ( ClientDisconnected != null )
{
if (IsSynchronous())
- syncControl.Invoke( clientDisconnected, new object[]{app});
- else clientDisconnected( app);
+ syncControl.Invoke( ClientDisconnected, new object[]{app});
+ else ClientDisconnected( app);
}
}
internal void FireClientAddBinding (IvyClient app, string regexp)
{
- if ( addBinding != null )
+ if ( BindingAdd != null )
{
if (IsSynchronous())
- syncControl.Invoke( addBinding, new object[]{app,regexp});
- else addBinding( app,regexp);
+ syncControl.Invoke( BindingAdd, new object[]{app,regexp});
+ else BindingAdd( app,regexp);
}
}
internal void FireClientRemoveBinding (IvyClient app, string regexp)
{
- if ( removeBinding != null )
+ if ( BindingRemove != null )
{
if (IsSynchronous())
- syncControl.Invoke( removeBinding, new object[]{app,regexp});
- else removeBinding( app,regexp);
+ syncControl.Invoke( BindingRemove, new object[]{app,regexp});
+ else BindingRemove( app,regexp);
}
}
internal bool FireDie (IvyClient app, int id, string arg )
@@ -740,17 +744,17 @@ namespace IvyBus
{
//TODO pocket PC BUS default ?????
#if (!PocketPC)
- if (domainbus == null)
+ if (domainbus == null || domainbus.Length == 0 )
{
domainbus = Environment.GetEnvironmentVariable("IVYBUS");
}
- if (domainbus == null)
+ if (domainbus == null || domainbus.Length == 0)
{
domainbus = Properties.Settings.Default.IvyBus;
}
#endif
- if (domainbus == null)
+ if (domainbus == null || domainbus.Length == 0)
domainbus = DEFAULT_DOMAIN;
return domainbus;
}