protected ComponentParameterCollection(ComponentParameterCollection prototype) { if (prototype == null) { throw new ArgumentNullException(nameof(prototype)); } m_parameters = new Dictionary <string, string>(prototype.m_parameters); }
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(); }
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]); }
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(); }
public Component Create(string typeName, string category, string name, FabricStyleList fabricStyles, ComponentParameterCollection parameters) { return(Lookup(typeName).Create(category, name, fabricStyles, parameters)); }
public Component Create(string category, string name, FabricStyleList fabricStyles, ComponentParameterCollection parameters) { return((Component)m_parameterConstructor.Invoke(new object[] { category, name, fabricStyles, parameters })); }