Exemple #1
0
 public DmdAssemblyImpl(DmdAppDomainImpl appDomain, DmdMetadataReader metadataReader, string location)
 {
     modules             = new List <DmdModuleImpl>();
     this.appDomain      = appDomain ?? throw new ArgumentNullException(nameof(appDomain));
     this.metadataReader = metadataReader ?? throw new ArgumentNullException(nameof(metadataReader));
     Location            = location ?? throw new ArgumentNullException(nameof(location));
 }
Exemple #2
0
 public DmdAssemblyImpl(DmdAppDomainImpl appDomain, DmdMetadataReader metadataReader, string location, string assemblySimpleNameOrNull, bool isExe)
 {
     modules             = new List <DmdModuleImpl>();
     this.appDomain      = appDomain ?? throw new ArgumentNullException(nameof(appDomain));
     this.metadataReader = metadataReader ?? throw new ArgumentNullException(nameof(metadataReader));
     Location            = location ?? throw new ArgumentNullException(nameof(location));
     assemblySimpleName  = assemblySimpleNameOrNull;
     this.isExe          = isExe;
 }
 DmdMetadataReader InitializeMetadataReader()
 {
     lock (lockObj) {
         var reader = __metadataReader_DONT_USE;
         if (reader != null)
         {
             return(reader);
         }
         if (module == null)
         {
             throw new InvalidOperationException();
         }
         reader                    = metadataReaderFactory(module, getMetadata());
         module                    = null;
         getMetadata               = null;
         metadataReaderFactory     = null;
         reader.TypesUpdated      += DmdMetadataReader_TypesUpdated;
         __metadataReader_DONT_USE = reader;
         return(reader);
     }
 }