public virtual void Add(CSharpConstruct construct) { if (construct == this) { throw new InvalidOperationException(); } if (construct is Property property) { if (!Properties.Contains(property)) { Properties.Add(property); } } if (construct is Method method) { if (!Methods.Contains(method)) { Methods.Add(method); } } if (construct is Object @object) { if (!InnerObjects.Contains(@object)) { InnerObjects.Add(@object); } } }
public void Remove(CSharpConstruct construct) { if (construct is MethodParameter param) { Parameters.Remove(param); } }
public void Add(CSharpConstruct construct) { if (construct is MethodParameter param) { Parameters.Add(param); } else { Closure?.Add(construct); } }
public override void Add(CSharpConstruct construct) { if (construct is Type type) { if (!EnumeratedTypes.Contains(type)) { EnumeratedTypes.Add(type); } } base.Add(construct); }
public void Remove(CSharpConstruct construct) { if (construct is Namespace @namespace) { Childs.Remove(@namespace); } else if (construct is Type @object) { Objects.Remove(@object); } }
public void Add(CSharpConstruct construct) { if (construct is Namespace @namespace) { if (!Childs.Contains(@namespace)) { Childs.Add(@namespace); } } else if (construct is Type @object) { if (!Objects.Contains(@object)) { Objects.Add(@object); } } }
public virtual void Remove(CSharpConstruct construct) { if (construct == this) { throw new InvalidOperationException(); } if (construct is Property property) { Properties.Remove(property); } if (construct is Method method) { Methods.Remove(method); } if (construct is Object @object) { InnerObjects.Remove(@object); } }