/// <summary>
        /// Initialize from an element.
        /// </summary>
        /// <param name="element"></param>
        protected void InitializeFromElement(XElement element) {
            Element = element;

            if (element.GetJdfParentOrNull() != null) {
                ParentJdfNode = new JdfNodeBuilder(element.JdfParent());
            }
        }
Пример #2
0
        void Initalize(Ticket ticket, bool isGrayBox, string[] types)
        {
            if (ticket.Root != null)
            {
                ticket.Root.ThrowExceptionIfNotJdfElement();
            }

            if (ticket.Root == null)
            {
                if (isGrayBox)
                {
                    Element = ticket.AddGrayBoxJdfElement(types);
                }
                else
                {
                    Element = ticket.AddProcessJdfElement(types);
                }
            }
            else
            {
                Element = ticket.Root;
            }

            if (Element.GetJdfParentOrNull() != null)
            {
                ParentJdfNode = new JdfNodeBuilder(Element.JdfParent());
            }
        }
Пример #3
0
        internal ResourceNodeBuilder(JdfNodeBuilder parent, XName resourceName, ResourceUsage usage, string id = null)
            : base(parent)
        {
            ParameterCheck.ParameterRequired(resourceName, "resourceName");

            Element = ParentJdfNode.Element.LinkResource(usage, resourceName, id);
        }
        internal GenericJdfBuilder(JdfNodeBuilder parentJdfBuilder, XElement element) {
            ParameterCheck.ParameterRequired(parentJdfBuilder, "parentJdfBuilder");
            ParameterCheck.ParameterRequired(element, "element");

            jdfNodeBuilder = parentJdfBuilder;
            this.element = element;
        }
Пример #5
0
        internal GenericJdfBuilder(JdfNodeBuilder parentJdfBuilder, XElement element)
        {
            ParameterCheck.ParameterRequired(parentJdfBuilder, "parentJdfBuilder");
            ParameterCheck.ParameterRequired(element, "element");

            jdfNodeBuilder = parentJdfBuilder;
            this.element   = element;
        }
Пример #6
0
        /// <summary>
        /// Initialize from an element.
        /// </summary>
        /// <param name="element"></param>
        protected void InitializeFromElement(XElement element)
        {
            Element = element;

            if (element.GetJdfParentOrNull() != null)
            {
                ParentJdfNode = new JdfNodeBuilder(element.JdfParent());
            }
        }
Пример #7
0
        void Initalize(Ticket ticket, bool isGrayBox, string[] types) {
            if (ticket.Root != null) {
                ticket.Root.ThrowExceptionIfNotJdfElement();
            }

            if (ticket.Root == null) {
                if (isGrayBox) {
                    Element = ticket.AddGrayBoxJdfElement(types);
                } else {
                    Element = ticket.AddProcessJdfElement(types);
                }
            }
            else {
                Element = ticket.Root;
            }

            if (Element.GetJdfParentOrNull() != null) {
                ParentJdfNode = new JdfNodeBuilder(Element.JdfParent());
            }
        }
 internal JdfNodeBuilderBase(JdfNodeBuilder parentJdfBuilder) {
     ParentJdfNode = parentJdfBuilder;
 }
        internal JdfNodeAttributeBuilder(JdfNodeBuilder jdfNodeBuilder) {
            ParameterCheck.ParameterRequired(jdfNodeBuilder, "jdfNodeBuilder");

            this.jdfNodeBuilder = jdfNodeBuilder;
        }
Пример #10
0
        internal JdfNodeAttributeBuilder(JdfNodeBuilder jdfNodeBuilder)
        {
            ParameterCheck.ParameterRequired(jdfNodeBuilder, "jdfNodeBuilder");

            this.jdfNodeBuilder = jdfNodeBuilder;
        }
Пример #11
0
 internal JdfNodeBuilderBase(JdfNodeBuilder parentJdfBuilder)
 {
     ParentJdfNode = parentJdfBuilder;
 }
        internal ResourceNodeNameBuilder(JdfNodeBuilder jdfNodeBuilder, ResourceUsage usage) {
            ParameterCheck.ParameterRequired(jdfNodeBuilder, "jdfNodeBuilder");

            ParentJdf = jdfNodeBuilder;
            this.usage = usage;
        }
        internal ResourceNodeBuilder(JdfNodeBuilder parent, XName resourceName, ResourceUsage usage, string id = null)
            : base(parent) {
            ParameterCheck.ParameterRequired(resourceName, "resourceName");

            Element = ParentJdfNode.Element.LinkResource(usage, resourceName, id);
        }