Exemple #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();
 }
Exemple #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();
 }
Exemple #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();
 }
Exemple #4
0
 public EditAssemblyVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();
Exemple #5
0
 public AddClassVM(EditCodeVMOptions options) : base(options, null) => StartDecompile();