Exemplo n.º 1
0
 public void Init(Byte[] assemblyByteArray)
 {
     assemblyLoadContext = new CollectibleAssemblyLoadContext();
     using (var ms = new MemoryStream(assemblyByteArray))
         this.assembly = assemblyLoadContext.LoadFromStream(ms);
     attributeDataList = CustomAttributeData.GetCustomAttributes(assembly);
 }
Exemplo n.º 2
0
 public void Dispose()
 {
     this.assembly     = null;
     attributeDataList = null;
     assemblyLoadContext?.Unload();
     assemblyLoadContext = null;
     GC.Collect();
 }