示例#1
0
        public static YNode AttachAnchor(YNode node, string anchor)
        {
            if (node == null)
            {
                throw new ArgumentNullException(nameof(node));
            }

            if (anchor != null)
            {
                node.Anchor = anchor.Substring(1);
            }

            return(node);
        }
示例#2
0
 public static YDocument FromBareNode(YNode node) => new YDocument(Array.Empty <YDirective>(), node);
示例#3
0
 public static YDocument Create(IList <YDirective> directives, YNode node) => new YDocument(directives, node);
示例#4
0
 public YDocument(IList <YDirective> directives, YNode body)
 {
     Directives = directives;
     Body       = body;
 }