Esempio 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);
        }
Esempio n. 2
0
 protected LanguageScope(LanguageScope parentScope, string scopeName)
     : base(parentScope)
 {
     ObjectName = scopeName;
 }
Esempio n. 3
0
 protected LanguageScope(LanguageScope parentScope)
     : base(parentScope)
 {
     ObjectName = "scope_" + ObjectId.ToString("X");
 }