protected ComponentParameterCollection(ComponentParameterCollection prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_parameters = new Dictionary <string, string>(prototype.m_parameters);
        }
Ejemplo n.º 2
0
        protected Component(Component prototype)
        {
            if (prototype == null)
            {
                throw new ArgumentNullException(nameof(prototype));
            }

            m_type         = prototype.m_type;
            m_name         = prototype.m_name;
            m_category     = prototype.Category;
            m_parameters   = prototype.m_parameters.Clone();
            m_fabricStyles = prototype.m_fabricStyles.Clone();
        }
Ejemplo n.º 3
0
        protected Component(JToken json)
        {
            if (json == null)
            {
                throw new ArgumentNullException(nameof(json));
            }

            m_type         = (string)json[JsonNames.TypeName];
            m_category     = (string)json[JsonNames.Category];
            m_name         = (string)json[JsonNames.Name];
            m_parameters   = new ComponentParameterCollection(json[JsonNames.Parameters]);
            m_fabricStyles = new FabricStyleList(json[JsonNames.FabricStyleList]);
        }
Ejemplo n.º 4
0
        protected Component(string type, string category, string name, FabricStyleList fabricStyles, ComponentParameterCollection parameters)
        {
            if (string.IsNullOrEmpty(type))
            {
                throw new ArgumentNullException(nameof(type));
            }
            if (string.IsNullOrEmpty(category))
            {
                throw new ArgumentNullException(nameof(category));
            }
            if (string.IsNullOrEmpty(name))
            {
                throw new ArgumentNullException(nameof(name));
            }

            m_type       = type;
            m_category   = category;
            m_name       = name;
            m_parameters = parameters != null?parameters.Clone() : new ComponentParameterCollection();

            m_fabricStyles = fabricStyles != null?fabricStyles.Clone() : new FabricStyleList();
        }
Ejemplo n.º 5
0
 public Component Create(string typeName, string category, string name, FabricStyleList fabricStyles, ComponentParameterCollection parameters)
 {
     return(Lookup(typeName).Create(category, name, fabricStyles, parameters));
 }
Ejemplo n.º 6
0
 public Component Create(string category, string name, FabricStyleList fabricStyles, ComponentParameterCollection parameters)
 {
     return((Component)m_parameterConstructor.Invoke(new object[] { category, name, fabricStyles, parameters }));
 }