Пример #1
0
 public Policy(MetadataBlockingPolicy blockingPolicy,
               AnalysisBasedMetadataManager parent)
 {
     _blockingPolicy     = blockingPolicy;
     _parent             = parent;
     _explicitScopeMixin = new ExplicitScopeAssemblyPolicyMixin();
 }
            public GeneratedTypesAndCodeMetadataPolicy(CompilerGeneratedMetadataManager parent)
            {
                _parent             = parent;
                _explicitScopeMixin = new ExplicitScopeAssemblyPolicyMixin();

                MetadataType systemAttributeType = parent._typeSystemContext.SystemModule.GetType("System", "Attribute", false);

                _isAttributeCache = new Dictionary <MetadataType, bool>();
                _isAttributeCache.Add(systemAttributeType, true);
            }
Пример #3
0
        public ModuleDesc GetModuleOfType(MetadataType typeDef)
        {
            if (_explicitScopePolicyMixin == null)
            {
                lock (s_lazyInitThreadSafetyLock)
                {
                    if (_explicitScopePolicyMixin == null)
                        _explicitScopePolicyMixin = new ExplicitScopeAssemblyPolicyMixin();
                }
            }

            return _explicitScopePolicyMixin.GetModuleOfType(typeDef);
        }
Пример #4
0
        public ModuleDesc GetModuleOfType(MetadataType typeDef)
        {
            if (_explicitScopePolicyMixin == null)
            {
                lock (s_lazyInitThreadSafetyLock)
                {
                    if (_explicitScopePolicyMixin == null)
                    {
                        _explicitScopePolicyMixin = new ExplicitScopeAssemblyPolicyMixin();
                    }
                }
            }

            return(_explicitScopePolicyMixin.GetModuleOfType(typeDef));
        }
 public GeneratedTypesAndCodeMetadataPolicy(MetadataBlockingPolicy blockingPolicy, NodeFactory factory)
 {
     _blockingPolicy     = blockingPolicy;
     _factory            = factory;
     _explicitScopeMixin = new ExplicitScopeAssemblyPolicyMixin();
 }
Пример #6
0
 public MultifileMetadataPolicy(params ModuleDesc[] modules)
 {
     _modules = new HashSet <ModuleDesc>(modules);
     _explicitScopePolicyMixin = new ExplicitScopeAssemblyPolicyMixin();
 }
Пример #7
0
 public GeneratedTypesAndCodeMetadataPolicy(CompilerGeneratedMetadataManager parent, NodeFactory factory)
 {
     _parent             = parent;
     _factory            = factory;
     _explicitScopeMixin = new ExplicitScopeAssemblyPolicyMixin();
 }
Пример #8
0
 public MultifileMetadataPolicy(params ModuleDesc[] modules)
 {
     _modules = new HashSet<ModuleDesc>(modules);
     _explicitScopePolicyMixin = new ExplicitScopeAssemblyPolicyMixin();
 }
Пример #9
0
 public DummyMetadataPolicy(MetadataGeneration parent)
 {
     _parent             = parent;
     _explicitScopeMixin = new ExplicitScopeAssemblyPolicyMixin();
 }