public ModelItemDictionaryImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) { Fx.Assert(modelTreeManager != null, "modelTreeManager cannot be null"); Fx.Assert(itemType != null, "item type cannot be null"); Fx.Assert(instance != null, "instance cannot be null"); this.itemType = itemType; this.instance = new DictionaryWrapper(instance); this.modelTreeManager = modelTreeManager; this.parents = new List<ModelItem>(1); this.sources = new List<ModelProperty>(1); this.helper = new ModelTreeItemHelper(); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary<string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); this.modelItems = new NullableKeyDictionary<ModelItem, ModelItem>(); UpdateInstance(); if (ItemsCollectionObject != null) { ItemsCollectionModelItemCollection.CollectionChanged += new NotifyCollectionChangedEventHandler(itemsCollection_CollectionChanged); this.ItemsCollectionObject.ModelDictionary = this; } }
public ModelItemDictionaryImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) { Fx.Assert(modelTreeManager != null, "modelTreeManager cannot be null"); Fx.Assert(itemType != null, "item type cannot be null"); Fx.Assert(instance != null, "instance cannot be null"); this.itemType = itemType; this.instance = new DictionaryWrapper(instance); this.modelTreeManager = modelTreeManager; this.parents = new List <ModelItem>(1); this.sources = new List <ModelProperty>(1); this.helper = new ModelTreeItemHelper(); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary <string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List <ModelItem>(); this.modelItems = new NullableKeyDictionary <ModelItem, ModelItem>(); UpdateInstance(); if (ItemsCollectionObject != null) { ItemsCollectionModelItemCollection.CollectionChanged += new NotifyCollectionChangedEventHandler(itemsCollection_CollectionChanged); this.ItemsCollectionObject.ModelDictionary = this; } }
public ModelItemImpl(ModelTreeManager modelTreeManager, Type itemType, object instance, ModelItem parent) { this.itemType = itemType; this.instance = instance; this.modelTreeManager = modelTreeManager; this.parents = new ObservableCollection <ModelItem>(); this.internalParents = new ReadOnlyObservableCollection <ModelItem>(parents); this.sources = new ObservableCollection <ModelProperty>(); this.helper = new ModelTreeItemHelper(); this.internalSources = new ReadOnlyObservableCollection <ModelProperty>(sources); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary <string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List <ModelItem>(); }
public ModelItemImpl(ModelTreeManager modelTreeManager, Type itemType, object instance, ModelItem parent) { this.itemType = itemType; this.instance = instance; this.modelTreeManager = modelTreeManager; this.parents = new ObservableCollection<ModelItem>(); this.internalParents = new ReadOnlyObservableCollection<ModelItem>(parents); this.sources = new ObservableCollection<ModelProperty>(); this.helper = new ModelTreeItemHelper(); this.internalSources = new ReadOnlyObservableCollection<ModelProperty>(sources); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary<string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); }
public ModelItemCollectionImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) { Fx.Assert(modelTreeManager != null, "modelTreeManager cannot be null"); Fx.Assert(itemType != null, "item type cannot be null"); Fx.Assert(instance != null, "instance cannot be null"); this.itemType = itemType; this.instance = instance; this.modelTreeManager = modelTreeManager; this.parents = new List<ModelItem>(1); this.sources = new List<ModelProperty>(1); this.helper = new ModelTreeItemHelper(); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary<string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>(); this.modelItems = new List<ModelItem>(); UpdateInstance(instance); }
public ModelItemCollectionImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent) { Fx.Assert(modelTreeManager != null, "modelTreeManager cannot be null"); Fx.Assert(itemType != null, "item type cannot be null"); Fx.Assert(instance != null, "instance cannot be null"); this.itemType = itemType; this.instance = instance; this.modelTreeManager = modelTreeManager; this.parents = new List <ModelItem>(1); this.sources = new List <ModelProperty>(1); this.helper = new ModelTreeItemHelper(); if (parent != null) { this.manuallySetParent = parent; } this.modelPropertyStore = new Dictionary <string, ModelItem>(); this.subTreeNodesThatNeedBackLinkPatching = new List <ModelItem>(); this.modelItems = new List <ModelItem>(); UpdateInstance(instance); }