本文整理匯總了C#中ProtoCore.Namespace.ElementResolver.CopyResolutionMap方法的典型用法代碼示例。如果您正苦於以下問題:C# ElementResolver.CopyResolutionMap方法的具體用法?C# ElementResolver.CopyResolutionMap怎麽用?C# ElementResolver.CopyResolutionMap使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ProtoCore.Namespace.ElementResolver
的用法示例。
在下文中一共展示了ElementResolver.CopyResolutionMap方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: WorkspaceModel
protected WorkspaceModel(
IEnumerable<NodeModel> e,
IEnumerable<NoteModel> n,
IEnumerable<AnnotationModel> a,
WorkspaceInfo info,
NodeFactory factory,
IEnumerable<PresetModel> presets)
{
guid = Guid.NewGuid();
nodes = new ObservableCollection<NodeModel>(e);
notes = new ObservableCollection<NoteModel>(n);
annotations = new ObservableCollection<AnnotationModel>(a);
// Set workspace info from WorkspaceInfo object
Name = info.Name;
X = info.X;
Y = info.Y;
FileName = info.FileName;
Zoom = info.Zoom;
HasUnsavedChanges = false;
LastSaved = DateTime.Now;
WorkspaceVersion = AssemblyHelper.GetDynamoVersion();
undoRecorder = new UndoRedoRecorder(this);
NodeFactory = factory;
this.presets = new List<PresetModel>(presets);
// Update ElementResolver from nodeGraph.Nodes (where node is CBN)
ElementResolver = new ElementResolver();
foreach (var node in nodes)
{
RegisterNode(node);
var cbn = node as CodeBlockNodeModel;
if (cbn != null && cbn.ElementResolver != null)
{
ElementResolver.CopyResolutionMap(cbn.ElementResolver);
}
}
foreach (var connector in Connectors)
RegisterConnector(connector);
SetModelEventOnAnnotation();
}