Beispiel #1
0
 private void Rebuild()
 {
     this.quickTypeList.Clear();
     if (this.quickTypeView != null)
     {
         this.quickTypeView.CurrentChanged -= new EventHandler(this.OnQuickTypeViewCurrentChanged);
     }
     if (this.PropertyValue != null)
     {
         SceneNodeProperty sceneNodeProperty = (SceneNodeProperty)this.PropertyValue.get_ParentProperty();
         using (IEnumerator <KeyValuePair <Type, IList <NewItemFactory> > > enumerator1 = ((IEnumerable <KeyValuePair <Type, IList <NewItemFactory> > >)ExtensibilityMetadataHelper.GetNewItemFactoriesFromAttributes(sceneNodeProperty.GetAttributes <NewItemTypesAttribute>(true), sceneNodeProperty.SceneNodeObjectSet.DesignerContext.MessageLoggingService)).GetEnumerator())
         {
             while (((IEnumerator)enumerator1).MoveNext())
             {
                 KeyValuePair <Type, IList <NewItemFactory> > current1 = enumerator1.Current;
                 using (IEnumerator <NewItemFactory> enumerator2 = ((IEnumerable <NewItemFactory>)current1.Value).GetEnumerator())
                 {
                     while (((IEnumerator)enumerator2).MoveNext())
                     {
                         NewItemFactory current2 = enumerator2.Current;
                         this.quickTypeList.Add((object)new NewItemFactoryTypeModel(current1.Key, current2, sceneNodeProperty.SceneNodeObjectSet.DesignerContext.MessageLoggingService));
                     }
                 }
             }
         }
         this.quickTypeView.CurrentChanged += new EventHandler(this.OnQuickTypeViewCurrentChanged);
     }
     this.OnPropertyChanged("PropertyValueTypeName");
     this.OnPropertyChanged("QuickTypeList");
 }
Beispiel #2
0
 private void Rebuild()
 {
     this.quickTypeList.Clear();
     if (this.quickTypeView != null)
     {
         this.quickTypeView.CurrentChanged -= new EventHandler(this.OnQuickTypeViewCurrentChanged);
     }
     if (this.PropertyValue != null)
     {
         SceneNodeProperty sceneNodeProperty = (SceneNodeProperty)this.PropertyValue.ParentProperty;
         foreach (KeyValuePair <Type, IList <NewItemFactory> > keyValuePair in (IEnumerable <KeyValuePair <Type, IList <NewItemFactory> > >)ExtensibilityMetadataHelper.GetNewItemFactoriesFromAttributes(sceneNodeProperty.GetAttributes <NewItemTypesAttribute>(true), sceneNodeProperty.SceneNodeObjectSet.DesignerContext.MessageLoggingService))
         {
             foreach (NewItemFactory factory in (IEnumerable <NewItemFactory>)keyValuePair.Value)
             {
                 this.quickTypeList.Add((object)new NewItemFactoryTypeModel(keyValuePair.Key, factory, sceneNodeProperty.SceneNodeObjectSet.DesignerContext.MessageLoggingService));
             }
         }
         this.quickTypeView.CurrentChanged += new EventHandler(this.OnQuickTypeViewCurrentChanged);
     }
     this.OnPropertyChanged("PropertyValueTypeName");
     this.OnPropertyChanged("QuickTypeList");
 }