Пример #1
0
        void Save(SaveModuleOptionsVM vm)
        {
            fileProgress = new ModuleFileProgress();
            var opts = vm.CreateWriterOptions();

            opts.Listener = this;
            opts.Logger   = this;
            var filename = vm.FileName;

            if (opts is NativeModuleWriterOptions)
            {
                ((ModuleDefMD)vm.Module).NativeWrite(filename, (NativeModuleWriterOptions)opts);
            }
            else
            {
                vm.Module.Write(filename, (ModuleWriterOptions)opts);
            }
        }
Пример #2
0
        void Save(SaveModuleOptionsVM vm)
        {
            fileProgress = new ModuleFileProgress();
            var opts = vm.CreateWriterOptions();

            opts.ProgressUpdated += ModuleWriter_ProgressUpdated;
            opts.Logger           = this;
            // Make sure the order of the interfaces don't change, see https://github.com/dotnet/roslyn/issues/3905
            opts.MetadataOptions.Flags |= MetadataFlags.RoslynSortInterfaceImpl;
            var filename = vm.FileName;

            if (opts is NativeModuleWriterOptions)
            {
                ((ModuleDefMD)vm.Module).NativeWrite(filename, (NativeModuleWriterOptions)opts);
            }
            else
            {
                vm.Module.Write(filename, (ModuleWriterOptions)opts);
            }
        }
Пример #3
0
		void Save(SaveModuleOptionsVM vm) {
			fileProgress = new ModuleFileProgress();
			var opts = vm.CreateWriterOptions();
			opts.Listener = this;
			opts.Logger = this;
			var filename = vm.FileName;
			if (opts is NativeModuleWriterOptions)
				((ModuleDefMD)vm.Module).NativeWrite(filename, (NativeModuleWriterOptions)opts);
			else
				vm.Module.Write(filename, (ModuleWriterOptions)opts);
		}