Exemple #1
0
        protected Kit(Kit prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_design           = prototype.m_design.Clone();
            m_kitSpecification = prototype.m_kitSpecification.Clone();
        }
        protected KitSpecification(KitSpecification prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_width              = prototype.m_width;
            m_height             = prototype.m_height;
            m_borderWidth        = prototype.m_borderWidth;
            m_bindingWidth       = prototype.m_bindingWidth;
            m_hasBacking         = prototype.m_hasBacking;
            m_trimTriangles      = prototype.m_trimTriangles;
            m_borderFabricStyle  = prototype.m_borderFabricStyle.Clone();
            m_bindingFabricStyle = prototype.m_bindingFabricStyle.Clone();
            m_backingFabricStyle = prototype.m_backingFabricStyle.Clone();
        }
Exemple #3
0
        public Kit(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            var jsonDesign = json[JsonNames.Design];

            if (jsonDesign != null)
            {
                m_design = new Design(jsonDesign);
            }

            var jsonKitSpecification = json[JsonNames.KitSpecification];

            if (jsonKitSpecification != null)
            {
                m_kitSpecification = new KitSpecification(jsonKitSpecification);
            }
        }
Exemple #4
0
        private KitPartList m_parts; // derived -- see RefreshOuputs

        public Kit(Design design, KitSpecification kitSpecification)
        {
            m_design           = design ?? throw new ArgumentNullException(nameof(design));
            m_kitSpecification = kitSpecification ?? throw new ArgumentNullException(nameof(kitSpecification));
        }