Exemple #1
0
 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();
 }
Exemple #2
0
 /// <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();
 }
Exemple #3
0
 public Scope(string name, string description)
     : base(name, description)
 {
     parent    = null;
     variables = new VariableCollection();
     subScopes = new ScopeList();
     RegisterSubScopesEvents();
 }
Exemple #4
0
 private ScopeList(ScopeList original, Cloner cloner) : base(original, cloner)
 {
 }
Exemple #5
0
 private ScopeList(ScopeList original, Cloner cloner)
     : base(original, cloner)
 {
     list = new List <IScope>(original.Select(x => cloner.Clone(x)));
 }