private Scope(Scope original, Cloner cloner) : base(original, cloner) { if (original.variables.Count > 0) { variables = cloner.Clone(original.variables); } else { variables = new VariableCollection(); } if (original.subScopes.Count > 0) { subScopes = cloner.Clone(original.subScopes); foreach (IScope child in SubScopes) { child.Parent = this; } } else { subScopes = new ScopeList(); } RegisterSubScopesEvents(); }
/// <summary> /// Initializes a new instance of <see cref="Scope"/> having "Anonymous" as default name. /// </summary> public Scope() : base("Anonymous") { parent = null; variables = new VariableCollection(); subScopes = new ScopeList(); RegisterSubScopesEvents(); }
public Scope(string name, string description) : base(name, description) { parent = null; variables = new VariableCollection(); subScopes = new ScopeList(); RegisterSubScopesEvents(); }
private ScopeList(ScopeList original, Cloner cloner) : base(original, cloner) { }
private ScopeList(ScopeList original, Cloner cloner) : base(original, cloner) { list = new List <IScope>(original.Select(x => cloner.Clone(x))); }