public object GetValue(string propertyName) { OnPropertyAccessed(propertyName); if (runtimeProxies.TryGetValue(propertyName, out IRuntimeProxy runtimeProxy)) { return(runtimeProxy.Manager.Implementation); } if (collectionProxies.TryGetValue(propertyName, out ICollectionProxy collectionProxy)) { return(collectionProxy); } if (!ObservableProperty.TryGetMember(propertyName, out object result)) { throw new NotSupportedException(propertyName); } return(result); }
public override bool TryGetMember(GetMemberBinder binder, out object result) { string name = binder.Name; OnPropertyAccessed(name); if (dynamicProxies.TryGetValue(name, out object dynamicProxy)) { result = dynamicProxy; return(true); } if (collectionProxies.TryGetValue(name, out ICollectionProxy collectionObservable)) { result = collectionObservable; return(true); } return(ObservableProperty.TryGetMember(name, out result)); }