protected static DependsOn <T> Register <T>() where T : class, INotifyPropertyChanged { Type type = typeof(T); if (DependsOn.ContainsKey(type)) { throw new InvalidOperationException("Type has already been registered for: " + typeof(T)); } var dependsOn = new DependsOn <T>(); DependsOn[type] = dependsOn; return(dependsOn); }
private void CreateSubscriptionsStartingBaseFirst(Type type) { if (type == typeof(ReactiveObject)) { return; } CreateSubscriptionsStartingBaseFirst(type.BaseType); IDependsOn dependsOn; if (DependsOn.TryGetValue(type, out dependsOn)) { dependsOn.CreateSubscriptions(this, ref _subscriptionTrees); } }