public bool AddProperty(ScriptProperty prop) { if (Properties.Exists(x => x.Name == prop.Name)) return false; Properties.Add(prop); return true; }
public bool AddProperty(ScriptProperty prop) { if (Properties.Exists(x => x.Name == prop.Name)) { return(false); } Properties.Add(prop); return(true); }
private void DeclareConditionProperties(Condition c) { if (c == null || c.IsEmpty) return; foreach (var condition in c.Inactives) { ScriptProperty property = new ScriptProperty(condition.Flag, "bool", false); property.IsPublic = true; property.IsStatic = true; if (!state.Properties.Exists(x => x.Name == condition.Flag)) state.Properties.Add(property); } foreach (var condition in c.Actives) { ScriptProperty property = new ScriptProperty(condition.Flag, "bool", false); property.IsPublic = true; property.IsStatic = true; if (!state.Properties.Exists(x => x.Name == condition.Flag)) state.Properties.Add(property); } }