protected override void FreezeInternal()
 {
     base.FreezeInternal();
     rootUsingScope.Freeze();
     topLevelTypeDefinitions = FreezableHelper.FreezeListAndElements(topLevelTypeDefinitions);
     assemblyAttributes      = FreezableHelper.FreezeListAndElements(assemblyAttributes);
     moduleAttributes        = FreezableHelper.FreezeListAndElements(moduleAttributes);
     usingScopes             = FreezableHelper.FreezeListAndElements(usingScopes);
 }
Пример #2
0
        protected override void FreezeInternal()
        {
            usings        = FreezableHelper.FreezeList(usings);
            usingAliases  = FreezableHelper.FreezeList(usingAliases);
            externAliases = FreezableHelper.FreezeList(externAliases);

            // In current model (no child scopes), it makes sense to freeze the parent as well
            // to ensure the whole lookup chain is immutable.
            if (parent != null)
            {
                parent.Freeze();
            }

            base.FreezeInternal();
        }