aboutsummaryrefslogtreecommitdiffstatsci
path: root/src/CompilerServices/Bindings.cs
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2016-08-08 19:22:52 +0200
committerjpbruyere <jp.bruyere@hotmail.com>2016-08-08 19:22:52 +0200
commitcc4c62ab5d809ff451ca475a7949adc4fdfd806b (patch)
tree3b39b3eeffbadbc930941e37c1ef3b5026339da3 /src/CompilerServices/Bindings.cs
parent4d4a9116ea5c68b27f0b7c43db9682ab57738ae7 (diff)
IMLInstantiator implementation
Diffstat (limited to 'src/CompilerServices/Bindings.cs')
-rw-r--r--src/CompilerServices/Bindings.cs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/CompilerServices/Bindings.cs b/src/CompilerServices/Bindings.cs
index 8ece856c..0ce8da6e 100644
--- a/src/CompilerServices/Bindings.cs
+++ b/src/CompilerServices/Bindings.cs
@@ -41,6 +41,11 @@ namespace Crow
public string DynMethodId {
get { return dynMethodId; }
}
+ public Type SourceType {
+ get { return Source == null ? null
+ : Source.Instance == null ? null
+ : Source.Instance.GetType();}
+ }
public bool Resolved {
get { return resolved; }
@@ -185,12 +190,8 @@ namespace Crow
}
if (Target.TryFindMember (memberName)) {
- if (TwoWayBinding) {
- IBindable source = Target.Instance as IBindable;
- if (source == null)
- throw new Exception (Source.Instance + " does not implement IBindable for 2 way bindings");
- source.Bindings.Add (new Binding (Target, Source));
- }
+ if (TwoWayBinding)
+ Interface.RegisterBinding (new Binding (Target, Source));
}
#if DEBUG_BINDING
else