示例#1
0
		public void Save(string newFilename, MetaDataFlags mdFlags, IModuleWriterListener writerListener) {
			if (module.IsILOnly) {
				var writerOptions = new ModuleWriterOptions(module, writerListener);
				writerOptions.MetaDataOptions.Flags |= mdFlags;
				writerOptions.Logger = Logger.Instance;
				module.Write(newFilename, writerOptions);
			}
			else {
				var writerOptions = new NativeModuleWriterOptions(module, writerListener);
				writerOptions.MetaDataOptions.Flags |= mdFlags;
				writerOptions.Logger = Logger.Instance;
				writerOptions.KeepExtraPEData = true;
				writerOptions.KeepWin32Resources = true;
				module.NativeWrite(newFilename, writerOptions);
			}
		}
示例#2
0
		bool GetFlagValue(MetaDataFlags flag) {
			return (Flags & flag) != 0;
		}
示例#3
0
		void SetFlagValue(MetaDataFlags flag, bool value, string prop1, string prop2 = null) {
			bool origValue = (Flags & flag) != 0;
			if (origValue == value)
				return;

			if (value)
				Flags |= flag;
			else
				Flags &= ~flag;

			OnPropertyChanged(prop1);
			if (prop2 != null)
				OnPropertyChanged(prop2);
		}
示例#4
0
		bool GetFlagValue(MetaDataFlags flag) => (Flags & flag) != 0;