Ejemplo n.º 1
0
		public static void Initialize(Decoder decoder, OptionsProps property, object value) {
			switch (property) {
			case OptionsProps.IP:
				decoder.IP = (ulong)value;
				break;
			}
		}
Ejemplo n.º 2
0
		public static void Initialize(FormatterOptions options, OptionsProps property, object value) {
			switch (property) {
			case OptionsProps.AddLeadingZeroToHexNumbers: options.AddLeadingZeroToHexNumbers = (bool)value; break;
			case OptionsProps.AlwaysShowScale: options.AlwaysShowScale = (bool)value; break;
			case OptionsProps.AlwaysShowSegmentRegister: options.AlwaysShowSegmentRegister = (bool)value; break;
			case OptionsProps.BinaryDigitGroupSize: options.BinaryDigitGroupSize = (int)value; break;
			case OptionsProps.BinaryPrefix: options.BinaryPrefix = (string)value; break;
			case OptionsProps.BinarySuffix: options.BinarySuffix = (string)value; break;
			case OptionsProps.BranchLeadingZeroes: options.BranchLeadingZeroes = (bool)value; break;
			case OptionsProps.DecimalDigitGroupSize: options.DecimalDigitGroupSize = (int)value; break;
			case OptionsProps.DecimalPrefix: options.DecimalPrefix = (string)value; break;
			case OptionsProps.DecimalSuffix: options.DecimalSuffix = (string)value; break;
			case OptionsProps.DigitSeparator: options.DigitSeparator = (string)value; break;
			case OptionsProps.DisplacementLeadingZeroes: options.DisplacementLeadingZeroes = (bool)value; break;
			case OptionsProps.FirstOperandCharIndex: options.FirstOperandCharIndex = (int)value; break;
			case OptionsProps.GasNakedRegisters: options.GasNakedRegisters = (bool)value; break;
			case OptionsProps.GasShowMnemonicSizeSuffix: options.GasShowMnemonicSizeSuffix = (bool)value; break;
			case OptionsProps.GasSpaceAfterMemoryOperandComma: options.GasSpaceAfterMemoryOperandComma = (bool)value; break;
			case OptionsProps.HexDigitGroupSize: options.HexDigitGroupSize = (int)value; break;
			case OptionsProps.HexPrefix: options.HexPrefix = (string)value; break;
			case OptionsProps.HexSuffix: options.HexSuffix = (string)value; break;
			case OptionsProps.LeadingZeroes: options.LeadingZeroes = (bool)value; break;
			case OptionsProps.MasmAddDsPrefix32: options.MasmAddDsPrefix32 = (bool)value; break;
			case OptionsProps.MemorySizeOptions: options.MemorySizeOptions = (MemorySizeOptions)value; break;
			case OptionsProps.NasmShowSignExtendedImmediateSize: options.NasmShowSignExtendedImmediateSize = (bool)value; break;
			case OptionsProps.NumberBase: options.NumberBase = (NumberBase)value; break;
			case OptionsProps.OctalDigitGroupSize: options.OctalDigitGroupSize = (int)value; break;
			case OptionsProps.OctalPrefix: options.OctalPrefix = (string)value; break;
			case OptionsProps.OctalSuffix: options.OctalSuffix = (string)value; break;
			case OptionsProps.PreferST0: options.PreferST0 = (bool)value; break;
			case OptionsProps.RipRelativeAddresses: options.RipRelativeAddresses = (bool)value; break;
			case OptionsProps.ScaleBeforeIndex: options.ScaleBeforeIndex = (bool)value; break;
			case OptionsProps.ShowBranchSize: options.ShowBranchSize = (bool)value; break;
			case OptionsProps.ShowSymbolAddress: options.ShowSymbolAddress = (bool)value; break;
			case OptionsProps.ShowZeroDisplacements: options.ShowZeroDisplacements = (bool)value; break;
			case OptionsProps.SignedImmediateOperands: options.SignedImmediateOperands = (bool)value; break;
			case OptionsProps.SignedMemoryDisplacements: options.SignedMemoryDisplacements = (bool)value; break;
			case OptionsProps.SmallHexNumbersInDecimal: options.SmallHexNumbersInDecimal = (bool)value; break;
			case OptionsProps.SpaceAfterMemoryBracket: options.SpaceAfterMemoryBracket = (bool)value; break;
			case OptionsProps.SpaceAfterOperandSeparator: options.SpaceAfterOperandSeparator = (bool)value; break;
			case OptionsProps.SpaceBetweenMemoryAddOperators: options.SpaceBetweenMemoryAddOperators = (bool)value; break;
			case OptionsProps.SpaceBetweenMemoryMulOperators: options.SpaceBetweenMemoryMulOperators = (bool)value; break;
			case OptionsProps.TabSize: options.TabSize = (int)value; break;
			case OptionsProps.UppercaseAll: options.UppercaseAll = (bool)value; break;
			case OptionsProps.UppercaseDecorators: options.UppercaseDecorators = (bool)value; break;
			case OptionsProps.UppercaseHex: options.UppercaseHex = (bool)value; break;
			case OptionsProps.UppercaseKeywords: options.UppercaseKeywords = (bool)value; break;
			case OptionsProps.UppercaseMnemonics: options.UppercaseMnemonics = (bool)value; break;
			case OptionsProps.UppercasePrefixes: options.UppercasePrefixes = (bool)value; break;
			case OptionsProps.UppercaseRegisters: options.UppercaseRegisters = (bool)value; break;
			case OptionsProps.UsePseudoOps: options.UsePseudoOps = (bool)value; break;
			case OptionsProps.IP: break;
			default: throw new InvalidOperationException();
			}
		}
Ejemplo n.º 3
0
 public static bool TryOptionsProps(string value, out OptionsProps optionsProps) => optionsPropsDict.TryGetValue(value, out optionsProps);