summaryrefslogtreecommitdiff
path: root/CSharp/Ivy/IvyPPC
diff options
context:
space:
mode:
authorfcolin2007-02-01 09:56:22 +0000
committerfcolin2007-02-01 09:56:22 +0000
commita14d111ba22dcf74f83565c1ffef406e8ec31937 (patch)
tree2142a2851135d76d36bce4be04cf7f4d8e8745f4 /CSharp/Ivy/IvyPPC
parentb88133b0bf519486a7eadf55c46a815fcc090f12 (diff)
downloadivy-csharp-a14d111ba22dcf74f83565c1ffef406e8ec31937.zip
ivy-csharp-a14d111ba22dcf74f83565c1ffef406e8ec31937.tar.gz
ivy-csharp-a14d111ba22dcf74f83565c1ffef406e8ec31937.tar.bz2
ivy-csharp-a14d111ba22dcf74f83565c1ffef406e8ec31937.tar.xz
Utilisateur : Fcolin Date : 4/07/06 Heure : 14:04 Archivé dans $/CSharp/Ivy/Ivy Commentaire: (vss 73)
Diffstat (limited to 'CSharp/Ivy/IvyPPC')
-rw-r--r--CSharp/Ivy/IvyPPC/Ivy.cs35
1 files changed, 25 insertions, 10 deletions
diff --git a/CSharp/Ivy/IvyPPC/Ivy.cs b/CSharp/Ivy/IvyPPC/Ivy.cs
index d81c620..3ade724 100644
--- a/CSharp/Ivy/IvyPPC/Ivy.cs
+++ b/CSharp/Ivy/IvyPPC/Ivy.cs
@@ -308,11 +308,25 @@ namespace IvyBus
debug = Properties.Settings.Default.IvyDebug;
protocolVersion = Properties.Settings.Default.IvyProtocolVersion;
#endif
+ // get binding from Attribute IvyBinding
+ //TODO Autobinding attribute
+#if (PocketPC)
+ if (parentControl != null)
+ AutoBinding(parentControl);
+#endif
+ Assembly assembly = Assembly.GetCallingAssembly();
+ if ( assembly != this.GetType().Assembly )
+ BindAttibute(assembly);
}
public Ivy(IContainer container)
: this()
{
container.Add(this);
+ // get binding from Attribute IvyBinding
+ //TODO Autobinding attribute
+ Assembly assembly = Assembly.GetCallingAssembly();
+ if (assembly != this.GetType().Assembly)
+ BindAttibute(assembly);
}
/// <summary>
/// Readies the structures for the software bus connexion.
@@ -342,6 +356,11 @@ namespace IvyBus
{
appName = name;
ready_message = rdy_message;
+ // get binding from Attribute IvyBinding
+ //TODO Autobinding attribute
+ Assembly assembly = Assembly.GetCallingAssembly();
+ if (assembly != this.GetType().Assembly)
+ BindAttibute(assembly);
}
protected override void Dispose(bool disposing)
@@ -360,7 +379,7 @@ namespace IvyBus
}
// Autobinding on static method
- public void AutoBinding(Type type)
+ public void BindAttibute(Type type)
{
if (type == null) return;
//Get instance of the IvyBindingAttribute.
@@ -383,7 +402,7 @@ namespace IvyBus
}
}
// Autobinding on instance method
- public void AutoBinding(object obj)
+ public void BindAttibute(object obj)
{
if (obj == null) return;
Type type = obj.GetType();
@@ -406,11 +425,11 @@ namespace IvyBus
}
// Autobinding on IvyBindingAttribute method
- public void AutoBinding(Assembly assy)
+ public void BindAttibute(Assembly assy)
{
foreach (Type typ in assy.GetTypes())
{
- AutoBinding(typ);
+ BindAttibute(typ);
}
}
@@ -801,10 +820,12 @@ namespace IvyBus
{
FireEvent(temp,e);
}
+#if (!PocketPC)
catch (SynchronizationLockException ex)
{
// protect terminaison
}
+#endif
catch (ObjectDisposedException)
{
// protect terminaison
@@ -1147,12 +1168,6 @@ namespace IvyBus
public void EndInit()
{
- //TODO Autobinding attribute
-#if (PocketPC)
- if (parentControl != null)
- AutoBinding(parentControl);
-#endif
- AutoBinding(Assembly.GetCallingAssembly());
// TODO ugly should be added directly the bindings Dictionary !
foreach (IvyApplicationBinding bind in app_bindings)
{