Exemplo n.º 1
0
        /// <summary>
        /// Add a child scope to a parent scope. This should be called in the constructor of the child scope
        /// </summary>
        /// <param name="parentScope">The parent scope</param>
        /// <param name="childScope">The child scope</param>
        protected static void RegisterChildScope(LanguageScope parentScope, LanguageScope childScope)
        {
            if (ReferenceEquals(parentScope._childScopes, null))
            {
                parentScope._childScopes = new List <LanguageScope>();
            }

            parentScope._childScopes.Add(childScope);
        }
Exemplo n.º 2
0
 protected LanguageScope(LanguageScope parentScope, string scopeName)
     : base(parentScope)
 {
     ObjectName = scopeName;
 }
Exemplo n.º 3
0
 protected LanguageScope(LanguageScope parentScope)
     : base(parentScope)
 {
     ObjectName = "scope_" + ObjectId.ToString("X");
 }