Initialize() 공개 메소드

public Initialize ( object emitter, string filename, bool fFullBuild ) : void
emitter object
filename string
fFullBuild bool
리턴 void
예제 #1
0
        public static ISymbolWriter CreateWriter(string assembly, string pdb)
        {
            SymWriter writer = new SymWriter(false);

            object objDispenser, objImporter;

            CoCreateInstance(ref s_dispenserClassID, null, 1, ref s_dispenserIID, out objDispenser);

            IMetaDataDispenser dispenser = (IMetaDataDispenser)objDispenser;

            dispenser.OpenScope(assembly, 1, ref s_importerIID, out objImporter);

            IntPtr importerPtr = Marshal.GetComInterfaceForObject(objImporter, typeof(IMetadataImport));

            try {
                if (File.Exists(pdb))
                {
                    File.Delete(pdb);
                }

                writer.Initialize(importerPtr, pdb, false);
            } finally {
                if (importerPtr != IntPtr.Zero)
                {
                    Marshal.Release(importerPtr);
                    Marshal.ReleaseComObject(objDispenser);
                    Marshal.ReleaseComObject(objImporter);
                    Marshal.ReleaseComObject(dispenser);
                }
            }

            return(writer);
        }
예제 #2
0
파일: PdbHelper.cs 프로젝트: uvbs/Confuser
		public static SymWriter CreateWriter (ModuleDefinition module, string path, Stream pdb)
		{
			var writer = new SymWriter ();

			writer.Initialize (new ModuleMetadata (module), path, pdb, true);

			return writer;
		}
예제 #3
0
		public static SymWriter CreateWriter (ModuleDefinition module, string pdb)
		{
			var writer = new SymWriter ();

			if (File.Exists (pdb))
				File.Delete (pdb);

			writer.Initialize (new ModuleMetadata (module), pdb, true);

			return writer;
		}
예제 #4
0
파일: PdbHelper.cs 프로젝트: uvbs/Confuser
		public static SymWriter CreateWriter (ModuleDefinition module, string pdb)
		{
			var writer = new SymWriter ();

			if (File.Exists (pdb))
				File.Delete (pdb);

			writer.Initialize (new ModuleMetadata (module), pdb, true);

			return writer;
		}
예제 #5
0
        public static SymWriter CreateWriter(string pdb)
        {
            SymWriter writer = new SymWriter ();

            object objDispenser;
            CoCreateInstance (ref s_dispenserClassID, null, 1, ref s_dispenserIID, out objDispenser);

            object emitter;
            IMetaDataDispenser dispenser = (IMetaDataDispenser) objDispenser;
            dispenser.DefineScope (ref CLSID_CorMetaDataRuntime, 0, ref IID_IMetaDataEmit, out emitter);

            try {
                if (File.Exists (pdb))
                    File.Delete (pdb);

                writer.Initialize (emitter, pdb, true);
            } finally {
                Marshal.ReleaseComObject (dispenser);
            }

            return writer;
        }