public bool CheckCompatibility(IUValueComponent uValueComponent) { if (Unrestricted) { return(true); } return(compatibleComponents.Contains(uValueComponent.GetType())); }
public Layer(string name, Material material, double thickness, IUValueComponent parentComponent) { Name = name; if (!material.CheckCompatibility(parentComponent)) { throw new ArgumentException("Incompatible material added to layer of component"); } this.Material = material; this.Thickness = thickness; }
public IEnumerable <Material> GetCompatibleMaterials(IUValueComponent uValueComponent) { //Get materials from file throw new NotImplementedException(); //Material material = new Material(); //material.CheckCompatibility(uValueComponent); }
public List <Material> GetCompatibleMaterials(IUValueComponent uValueComponent) { List <Material> compatibleMaterials = new List <Material>(); foreach (Material material in materials) { if (material.CheckCompatibility(uValueComponent)) { compatibleMaterials.Add(material); } } return(compatibleMaterials); }
public Layer(Material material, double thickness, IUValueComponent parentComponent) : this("Untitled Layer", material, thickness, parentComponent) { }
public void RemoveCompatibleComponentType(IUValueComponent component) { compatibleComponents.Add(component.GetType()); }
public void RemoveComponent(IUValueComponent component) { Components.Remove(component); }
public void AddComponent(IUValueComponent component) { Components.Add(component); }
public bool CheckCompatibility(IUValueComponent uValueComponent) { return(Compatibility.CheckCompatibility(uValueComponent)); }