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); }
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); }
public void Dispose() { if (this.importInterface == null) { Marshal.ReleaseComObject(this.importInterface); } this.importInterface = null; GC.SuppressFinalize(this); }
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); }
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); }