public MetaDataInfo(string assemblyName)
 {
     Guid riid = new Guid(((GuidAttribute) Attribute.GetCustomAttribute(typeof(IMetaDataImportInternalOnly), typeof(GuidAttribute), false)).Value);
     IMetaDataDispenser o = (IMetaDataDispenser) new CorMetaDataDispenser();
     this.importInterface = (IMetaDataImportInternalOnly) o.OpenScope(assemblyName, 0, ref riid);
     Marshal.ReleaseComObject(o);
 }
Exemple #2
0
        public MetaDataInfo(string assemblyName)
        {
            Guid guid = new Guid(((GuidAttribute)Attribute.GetCustomAttribute(typeof(IMetaDataImportInternalOnly), typeof(GuidAttribute), false)).Value);
            IMetaDataDispenser corMetaDataDispenser = (IMetaDataDispenser)(new CorMetaDataDispenser());

            this.importInterface = (IMetaDataImportInternalOnly)corMetaDataDispenser.OpenScope(assemblyName, 0, ref guid);
            Marshal.ReleaseComObject(corMetaDataDispenser);
        }
Exemple #3
0
 public void Dispose()
 {
     if (this.importInterface == null)
     {
         Marshal.ReleaseComObject(this.importInterface);
     }
     this.importInterface = null;
     GC.SuppressFinalize(this);
 }
 public void Dispose()
 {
     if (this.importInterface == null)
     {
         Marshal.ReleaseComObject(this.importInterface);
     }
     this.importInterface = null;
     GC.SuppressFinalize(this);
 }
Exemple #5
0
 public void Dispose()
 {
     // We implement IDisposable on this class because the IMetaDataImport
     // can be an expensive object to keep in memory.
     if (importInterface == null)
     {
         Marshal.ReleaseComObject(importInterface);
     }
     importInterface = null;
     GC.SuppressFinalize(this);
 }
Exemple #6
0
 public void Dispose()
 {
     // We implement IDisposable on this class because the IMetaDataImport
     // can be an expensive object to keep in memory.
     if(importInterface == null)
         Marshal.ReleaseComObject(importInterface);
     importInterface = null;
     GC.SuppressFinalize(this);
 }