/// <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());
            }
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 4
0
        internal GenericJdfBuilder(JdfNodeBuilder parentJdfBuilder, XElement element) {
            ParameterCheck.ParameterRequired(parentJdfBuilder, "parentJdfBuilder");
            ParameterCheck.ParameterRequired(element, "element");

            jdfNodeBuilder = parentJdfBuilder;
            this.element = element;
        }
Ejemplo n.º 5
0
        internal GenericJdfBuilder(JdfNodeBuilder parentJdfBuilder, XElement element)
        {
            ParameterCheck.ParameterRequired(parentJdfBuilder, "parentJdfBuilder");
            ParameterCheck.ParameterRequired(element, "element");

            jdfNodeBuilder = parentJdfBuilder;
            this.element   = element;
        }
Ejemplo n.º 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());
            }
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 10
0
        internal JdfNodeAttributeBuilder(JdfNodeBuilder jdfNodeBuilder)
        {
            ParameterCheck.ParameterRequired(jdfNodeBuilder, "jdfNodeBuilder");

            this.jdfNodeBuilder = jdfNodeBuilder;
        }
Ejemplo n.º 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);
        }