public TypeSigCreatorVM(TypeSigCreatorOptions options, TypeSig defaultTypeSig = null) { this.options = options.Clone(); this.defaultTypeSig = defaultTypeSig; this.arrayRank = new UInt32VM(2, a => { }); this.arraySizes = new UInt32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_UINT32_MIN, Max = ModelUtils.COMPRESSED_UINT32_MAX, }; this.arrayLowerBounds = new Int32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_INT32_MIN, Max = ModelUtils.COMPRESSED_INT32_MAX, }; this.genericVariableNumber = new UInt32VM(0, a => { }); Reinitialize(); }
public TypeSigCreatorVM(TypeSigCreatorOptions options, TypeSig defaultTypeSig = null) { this.options = options.Clone(); this.defaultTypeSig = defaultTypeSig; ArrayRank = new UInt32VM(2, a => { }); ArraySizes = new UInt32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_UINT32_MIN, Max = ModelUtils.COMPRESSED_UINT32_MAX, }; ArrayLowerBounds = new Int32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_INT32_MIN, Max = ModelUtils.COMPRESSED_INT32_MAX, }; GenericVariableNumber = new UInt32VM(0, a => { }); Reinitialize(); }
public TypeSigCreatorVM(TypeSigCreatorOptions options, TypeSig defaultTypeSig = null) { this.options = options.Clone(); this.defaultTypeSig = defaultTypeSig; ArrayRank = new UInt32VM(2, a => { }); ArraySizes = new UInt32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_UINT32_MIN, Max = ModelUtils.COMPRESSED_UINT32_MAX, }; ArrayLowerBounds = new Int32ListDataFieldVM(a => { }) { Min = ModelUtils.COMPRESSED_INT32_MIN, Max = ModelUtils.COMPRESSED_INT32_MAX, }; GenericVariableNumber = new UInt32VM(0, a => { }); allDecompilers = new ObservableCollection <DecompilerVM>(options.DecompilerService.AllDecompilers.Select(a => new DecompilerVM(a))); Reinitialize(); }
public ConstantTypeVM(ModuleDef ownerModule, object value, ConstantType[] validConstants, bool allowNullString, bool arraysCanBeNull, TypeSigCreatorOptions options = null) { if (options == null) { IList<ConstantType> clist = validConstants; if (clist.IndexOf(ConstantType.Type) >= 0 || clist.IndexOf(ConstantType.TypeArray) >= 0 || clist.IndexOf(ConstantType.ObjectArray) >= 0) { throw new ArgumentNullException(); } } this.arraysCanBeNull = arraysCanBeNull; var list = validConstants.Select(a => typeToEnumVM[a]); this.constantTypeEnumListVM = new EnumListVM(list, (a, b) => OnConstantChanged()); this.boolean = new BooleanVM(a => FieldUpdated()); this.@char = new CharVM(a => FieldUpdated()); this.@sbyte = new SByteVM(a => FieldUpdated()); this.@byte = new ByteVM(a => FieldUpdated()); this.int16 = new Int16VM(a => FieldUpdated()); this.uint16 = new UInt16VM(a => FieldUpdated()); this.int32 = new Int32VM(a => FieldUpdated()); this.uint32 = new UInt32VM(a => FieldUpdated()); this.int64 = new Int64VM(a => FieldUpdated()); this.uint64 = new UInt64VM(a => FieldUpdated()); this.single = new SingleVM(a => FieldUpdated()); this.@double = new DoubleVM(a => FieldUpdated()); this.@string = new StringVM(a => FieldUpdated(), allowNullString); this.@enum = new EnumDataFieldVM(ownerModule, a => FieldUpdated()); this.type = new TypeSigVM(a => FieldUpdated(), options); this.objectArray = new ObjectListDataFieldVM(ownerModule, a => FieldUpdated(), options); this.booleanArray = new BooleanListDataFieldVM(a => FieldUpdated()); this.charArray = new CharListDataFieldVM(a => FieldUpdated()); this.sbyteArray = new SByteListDataFieldVM(a => FieldUpdated()); this.byteArray = new ByteListDataFieldVM(a => FieldUpdated()); this.int16Array = new Int16ListDataFieldVM(a => FieldUpdated()); this.uint16Array = new UInt16ListDataFieldVM(a => FieldUpdated()); this.int32Array = new Int32ListDataFieldVM(a => FieldUpdated()); this.uint32Array = new UInt32ListDataFieldVM(a => FieldUpdated()); this.int64Array = new Int64ListDataFieldVM(a => FieldUpdated()); this.uint64Array = new UInt64ListDataFieldVM(a => FieldUpdated()); this.singleArray = new SingleListDataFieldVM(a => FieldUpdated()); this.doubleArray = new DoubleListDataFieldVM(a => FieldUpdated()); this.stringArray = new StringListDataFieldVM(a => FieldUpdated()); this.enumArray = new EnumListDataFieldVM(ownerModule, a => FieldUpdated()); this.typeArray = new TypeSigListDataFieldVM(a => FieldUpdated(), options); this.Value = value; }