public EditMethodCodeVM(EditCodeVMOptions options, MethodDef methodToEdit, IList <MethodSourceStatement> statementsInMethodToEdit) : base(options, methodToEdit.DeclaringType) { this.methodToEdit = methodToEdit; methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
public AddMembersCodeVM(EditCodeVMOptions options, IMemberDef defToEdit) : base(options, defToEdit as TypeDef ?? defToEdit.DeclaringType) { this.defToEdit = defToEdit; nonNestedType = defToEdit as TypeDef ?? defToEdit.DeclaringType; while (!(nonNestedType.DeclaringType is null)) { nonNestedType = nonNestedType.DeclaringType; } StartDecompile(); }
public EditClassVM(EditCodeVMOptions options, IMemberDef defToEdit, IList <MethodSourceStatement> statementsInMethodToEdit) : base(options, defToEdit as TypeDef ?? defToEdit.DeclaringType) { this.defToEdit = defToEdit; nonNestedTypeToEdit = defToEdit as TypeDef ?? defToEdit.DeclaringType; while (nonNestedTypeToEdit.DeclaringType is not null) { nonNestedTypeToEdit = nonNestedTypeToEdit.DeclaringType; } methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
public EditAssemblyVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();
public AddClassVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();