Example #1
0
        private PhpCompilation(
            string assemblyName,
            PhpCompilationOptions options,
            ImmutableArray <MetadataReference> references,
            bool isSubmission,
            ReferenceManager referenceManager = null,
            bool reuseReferenceManager        = false,
            //SyntaxAndDeclarationManager syntaxAndDeclarations
            AsyncQueue <CompilationEvent> eventQueue = null
            )
            : base(assemblyName, references, SyntaxTreeCommonFeatures(ImmutableArray <SyntaxTree> .Empty), isSubmission, eventQueue)
        {
            _wellKnownMemberSignatureComparer = new WellKnownMembersSignatureComparer(this);

            _options              = options;
            _tables               = new SourceSymbolCollection(this);
            _coreTypes            = new CoreTypes(this);
            _coreMethods          = new CoreMethods(_coreTypes);
            _anonymousTypeManager = new AnonymousTypeManager(this);

            this.Conversions = new Semantics.Conversions(this);

            _referenceManager = (reuseReferenceManager && referenceManager != null)
                ? referenceManager
                : new ReferenceManager(MakeSourceAssemblySimpleName(), options.AssemblyIdentityComparer, referenceManager?.ObservedMetadata, options.SdkDirectory);
        }
Example #2
0
 internal override bool HasCodeToEmit()
 {
     return(SourceSymbolCollection.GetFiles().Any());
 }
 public SourceSymbolProvider(SourceSymbolCollection table)
 {
     Contract.ThrowIfNull(table);
     _table = table;
 }