Example #1
0
        public SrmDocument SetDocNodeAnnotations(SrmDocument document, NodeRef nodeRef, Annotations annotations)
        {
            var identityPath = ToIdentityPath(nodeRef);
            var docNode      = document.FindNode(identityPath);

            docNode  = docNode.ChangeAnnotations(annotations);
            document = (SrmDocument)document.ReplaceChild(identityPath.Parent, docNode);
            return(document);
        }
Example #2
0
        private IdentityPath ToIdentityPath(NodeRef nodeRef)
        {
            IdentityPath identityPath;

            if (_identityPaths.TryGetValue(nodeRef, out identityPath))
            {
                return(identityPath);
            }
            identityPath = nodeRef.ToIdentityPath(Document);
            if (identityPath == null)
            {
                throw ElementNotFoundException(nodeRef);
            }
            _identityPaths.Add(nodeRef, identityPath);
            return(identityPath);
        }
Example #3
0
 protected NodeRef(NodeRef parent)
     : base(parent)
 {
 }
Example #4
0
        // Resharper restore NonLocalizedString

        protected ResultRef(NodeRef parent) : base(parent)
        {
        }