Dynamo.Graph.Workspaces.WorkspaceModel.SetModelEventOnAnnotation C# (CSharp) Метод

SetModelEventOnAnnotation() приватный Метод

this sets the event on Annotation. This event return the model from the workspace. When a model is ungrouped from a group, that model will be deleted from that group. So, when UNDO execution, cannot get that model from that group, it has to get from the workspace. The below method will set the event on every annotation model, that will return the specific model from workspace.
private SetModelEventOnAnnotation ( ) : void
Результат void
        private void SetModelEventOnAnnotation()
        {
            foreach (var model in this.Annotations)
            {
                model.ModelBaseRequested += annotationModel_GetModelBase;
                model.Disposed += (_) => model.ModelBaseRequested -= annotationModel_GetModelBase;
            }
        }
WorkspaceModel