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); } }
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); } }
public ModelDragData(ModelMetaData MetaData) { this.MetaData = MetaData; }