示例#1
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());
            }
        }
        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());
            }
        }