public EditMethodCodeVM(IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, MethodDef methodToEdit, IList <MethodSourceStatement> statementsInMethodToEdit) : base(openFromGAC, openAssembly, languageCompiler, decompiler, methodToEdit.Module) { this.methodToEdit = methodToEdit; this.methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
EditCodeVMCreator(IOpenFromGAC openFromGAC, IDocumentTreeView documentTreeView, IDecompilerService decompilerService, [ImportMany] IEnumerable <ILanguageCompilerProvider> languageCompilerProviders) { this.openFromGAC = openFromGAC; this.openAssembly = new OpenAssembly(documentTreeView.DocumentService); this.decompilerService = decompilerService; this.languageCompilerProviders = languageCompilerProviders.OrderBy(a => a.Order).ToArray(); }
EditCodeVMCreator(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IDocumentTreeView documentTreeView, IDecompilerService decompilerService, [ImportMany] IEnumerable<ILanguageCompilerProvider> languageCompilerProviders) { this.rawModuleBytesProvider = rawModuleBytesProvider; this.openFromGAC = openFromGAC; openAssembly = new OpenAssembly(documentTreeView.DocumentService); this.decompilerService = decompilerService; this.languageCompilerProviders = languageCompilerProviders.OrderBy(a => a.Order).ToArray(); }
EditCodeVMCreator(IImageManager imageManager, IOpenFromGAC openFromGAC, IFileTreeView fileTreeView, ILanguageManager languageManager, [ImportMany] IEnumerable <ILanguageCompilerProvider> languageCompilerProviders) { this.imageManager = imageManager; this.openFromGAC = openFromGAC; this.openAssembly = new OpenAssembly(fileTreeView.FileManager); this.languageManager = languageManager; this.languageCompilerProviders = languageCompilerProviders.OrderBy(a => a.Order).ToArray(); }
EditCodeVMCreator(RawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IPickFilename pickFilename, IDocumentTreeView documentTreeView, IDecompilerService decompilerService, [ImportMany] IEnumerable <ILanguageCompilerProvider> languageCompilerProviders) { this.rawModuleBytesProvider = rawModuleBytesProvider; this.openFromGAC = openFromGAC; openAssembly = new OpenAssembly(documentTreeView.DocumentService); this.pickFilename = pickFilename; this.decompilerService = decompilerService; this.languageCompilerProviders = languageCompilerProviders.OrderBy(a => a.Order).ToArray(); }
public EditClassVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, IMemberDef defToEdit, IList<MethodSourceStatement> statementsInMethodToEdit) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, defToEdit.Module) { this.defToEdit = defToEdit; nonNestedTypeToEdit = defToEdit as TypeDef ?? defToEdit.DeclaringType; while (nonNestedTypeToEdit.DeclaringType != null) nonNestedTypeToEdit = nonNestedTypeToEdit.DeclaringType; methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
protected EditCodeVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef sourceModule) { Debug.Assert(decompiler.CanDecompile(DecompilationType.TypeMethods)); this.openFromGAC = openFromGAC; this.openAssembly = openAssembly; this.languageCompiler = languageCompiler; this.decompiler = decompiler; this.sourceModule = sourceModule; this.assemblyReferenceResolver = new AssemblyReferenceResolver(rawModuleBytesProvider, sourceModule.Context.AssemblyResolver, sourceModule, makeEverythingPublic); }
public EditCodeVMOptions(RawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, IPickFilename pickFilename, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef sourceModule, ImageReference addDocumentsImage) { RawModuleBytesProvider = rawModuleBytesProvider ?? throw new ArgumentNullException(nameof(rawModuleBytesProvider)); OpenFromGAC = openFromGAC ?? throw new ArgumentNullException(nameof(openFromGAC)); OpenAssembly = openAssembly ?? throw new ArgumentNullException(nameof(openAssembly)); PickFilename = pickFilename ?? throw new ArgumentNullException(nameof(pickFilename)); LanguageCompiler = languageCompiler ?? throw new ArgumentNullException(nameof(languageCompiler)); Decompiler = decompiler ?? throw new ArgumentNullException(nameof(decompiler)); SourceModule = sourceModule ?? throw new ArgumentNullException(nameof(sourceModule)); AddDocumentsImage = addDocumentsImage; }
public EditCodeVM(IImageManager imageManager, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, ILanguage language, MethodDef methodToEdit) { Debug.Assert(language.CanDecompile(DecompilationType.TypeMethods)); this.imageManager = imageManager; this.openFromGAC = openFromGAC; this.openAssembly = openAssembly; this.languageCompiler = languageCompiler; this.language = language; this.methodToEdit = methodToEdit; this.assemblyReferenceResolver = new AssemblyReferenceResolver(methodToEdit.Module.Context.AssemblyResolver, methodToEdit.Module, makeEverythingPublic); StartDecompileAsync(methodToEdit).ContinueWith(t => { var ex = t.Exception; Debug.Assert(ex == null); }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()); }
public EditCodeVM(IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, MethodDef methodToEdit, IList <MethodSourceStatement> statementsInMethodToEdit) { Debug.Assert(decompiler.CanDecompile(DecompilationType.TypeMethods)); this.openFromGAC = openFromGAC; this.openAssembly = openAssembly; this.languageCompiler = languageCompiler; this.decompiler = decompiler; this.methodToEdit = methodToEdit; var methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; this.assemblyReferenceResolver = new AssemblyReferenceResolver(methodToEdit.Module.Context.AssemblyResolver, methodToEdit.Module, makeEverythingPublic); StartDecompileAsync(methodToEdit, methodSourceStatement).ContinueWith(t => { var ex = t.Exception; Debug.Assert(ex == null); }, CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext()); }
public EditClassVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, IMemberDef defToEdit, IList <MethodSourceStatement> statementsInMethodToEdit) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, defToEdit.Module) { this.defToEdit = defToEdit; nonNestedTypeToEdit = defToEdit as TypeDef ?? defToEdit.DeclaringType; while (nonNestedTypeToEdit.DeclaringType != null) { nonNestedTypeToEdit = nonNestedTypeToEdit.DeclaringType; } methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
public AddClassVM(IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module) : base(openFromGAC, openAssembly, languageCompiler, decompiler, module) { StartDecompile(); }
public AddClassVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module) => StartDecompile();
public AddClassVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module) { StartDecompile(); }
public EditMethodCodeVM(IRawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, MethodDef methodToEdit, IList<MethodSourceStatement> statementsInMethodToEdit) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, methodToEdit.Module) { this.methodToEdit = methodToEdit; methodSourceStatement = statementsInMethodToEdit.Count == 0 ? (MethodSourceStatement?)null : statementsInMethodToEdit[0]; StartDecompile(); }
public EditAssemblyVM(RawModuleBytesProvider rawModuleBytesProvider, IOpenFromGAC openFromGAC, IOpenAssembly openAssembly, ILanguageCompiler languageCompiler, IDecompiler decompiler, ModuleDef module) : base(rawModuleBytesProvider, openFromGAC, openAssembly, languageCompiler, decompiler, module, null) => StartDecompile();