Example #1
0
        public KitBuildStep(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            m_stepNumber  = json.Value <int?>(JsonNames.StepNumber) ?? 0;
            m_description = (string)json[JsonNames.Description];

            var jsonConsumes = json[JsonNames.Consumes];

            if (jsonConsumes != null)
            {
                m_consumes = new KitBuildItemList(jsonConsumes);
            }
            else
            {
                m_consumes = new KitBuildItemList();
            }

            var jsonProduces = json[JsonNames.Produces];

            if (jsonProduces != null)
            {
                m_produces = new KitBuildItemList(jsonProduces);
            }
            else
            {
                m_produces = new KitBuildItemList();
            }
        }
Example #2
0
        protected KitBuildStep(KitBuildStep prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_stepNumber  = prototype.m_stepNumber;
            m_description = prototype.m_description;

            m_consumes = prototype.m_consumes.Clone();
            m_produces = prototype.m_produces.Clone();
        }
Example #3
0
        public KitBuildStep(int stepNumber, string description)
        {
            if (string.IsNullOrEmpty(description))
            {
                throw new ArgumentNullException(nameof(description));
            }

            m_stepNumber  = stepNumber;
            m_description = description;

            m_consumes = new KitBuildItemList();
            m_produces = new KitBuildItemList();
        }