Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 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();
 }
Esempio n. 4
0
 public EditAssemblyVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();
Esempio n. 5
0
 public AddClassVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();