Example #1
0
 private void LoadModelType()
 {
     try
     {
         List <ModelExtensionNode> list = AddinManager.GetExtensionNodes <ModelExtensionNode>(typeof(IModel)).ToList <ModelExtensionNode>();
         list.Sort();
         List <ModelMetaData> modelMetaDataList = new List <ModelMetaData>();
         foreach (ModelExtensionNode extensionNode in list)
         {
             if (extensionNode.Type.IsSubclassOf(typeof(NodeObject)))
             {
                 ModelMetaData modelMetaData = new ModelMetaData(extensionNode);
                 modelMetaDataList.Add(modelMetaData);
             }
         }
         this.ModelCollection = (IEnumerable <ModelMetaData>)modelMetaDataList;
     }
     catch (Exception ex)
     {
         LogConfig.Logger.Error((object)"Load model type failed.", ex);
     }
 }
Example #2
0
 private void LoadModelType()
 {
     try
     {
         ExtensionNodeList <ModelExtensionNode> extensionNodes = AddinManager.GetExtensionNodes <ModelExtensionNode>(typeof(IModel));
         List <ModelExtensionNode> list = extensionNodes.ToList <ModelExtensionNode>();
         list.Sort();
         List <ModelMetaData> list2 = new List <ModelMetaData>();
         foreach (ModelExtensionNode current in list)
         {
             if (current.Type.IsSubclassOf(typeof(NodeObject)))
             {
                 ModelMetaData item = new ModelMetaData(current);
                 list2.Add(item);
             }
         }
         this.ModelCollection = list2;
     }
     catch (Exception exception)
     {
         LogConfig.Logger.Error("Load model type failed.", exception);
     }
 }
Example #3
0
 public ModelDragData(ModelMetaData MetaData)
 {
     this.MetaData = MetaData;
 }