Exemplo n.º 1
0
		DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations) {
			this.fileManager = fileManager;
			this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
			this.languageManager = languageManager;
			this.decompilationCache = decompilationCache;
			this.methodAnnotations = methodAnnotations;
		}
Exemplo n.º 2
0
 MethodBodySettingsCommand(IMethodAnnotations methodAnnotations, IMethodNode methodNode, MethodBodyOptions options)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     this.newOptions        = options;
     this.origMethodBody    = methodNode.MethodDef.MethodBody;
 }
Exemplo n.º 3
0
            SolveAllMethods(IMethodAnnotations methodAnnotations, IModuleDocumentNode moduleNode, List <DeadInstr> deadInstructions, CancellationToken token)
            {
                this.methodAnnotations = methodAnnotations;
                this.moduleNode        = moduleNode;

                this.methods = new List <MethodDef>();

                var module = moduleNode.GetModule();

                if (module.HasTypes)
                {
                    foreach (TypeDef type in (IEnumerable <TypeDef>)module.Types)
                    {
                        AddMethods(methods, type);
                    }
                }

                this.origMethodBodys = new List <MethodBody>();
                foreach (var method in this.methods)
                {
                    this.origMethodBodys.Add(method.MethodBody);
                }

                this.deadInstructions = new DeadInstr[deadInstructions.Count];
                deadInstructions.CopyTo(this.deadInstructions);

                this.isBodyModified = new List <bool>();

                this.token = token;
            }
Exemplo n.º 4
0
 EditMethodBodyILCommand(IMethodAnnotations methodAnnotations, MethodNode methodNode, MethodBodyOptions options)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     newOptions             = options;
     origMethodBody         = methodNode.MethodDef.MethodBody;
 }
Exemplo n.º 5
0
 public void CopyTo(MethodDef method, IMethodAnnotations methodAnnotations)
 {
     method.MethodBody     = body;
     method.ImplAttributes = implAttributes;
     method.CustomAttributes.Clear();
     method.CustomAttributes.AddRange(customAttributes);
     methodAnnotations.SetBodyModified(method, isBodyModified);
 }
Exemplo n.º 6
0
 DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations)
 {
     this.fileManager            = fileManager;
     this.fileTreeNodeDecompiler = fileTreeNodeDecompiler;
     this.languageManager        = languageManager;
     this.decompilationCache     = decompilationCache;
     this.methodAnnotations      = methodAnnotations;
 }
Exemplo n.º 7
0
 SolveMethod(IMethodAnnotations methodAnnotations, IMethodNode methodNode, List <DeadInstr> deadInstructions, CancellationToken token)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     this.origMethodBody    = methodNode.MethodDef.MethodBody;
     this.deadInstructions  = new DeadInstr[deadInstructions.Count];
     deadInstructions.CopyTo(this.deadInstructions);
     this.token = token;
 }
Exemplo n.º 8
0
 public SolveBlock(IMethodAnnotations methodAnnotations, IMethodNode methodNode, Context ctx, BoolExpr expr, Block block)
 {
     this.methodAnnotations = methodAnnotations;
     this.methodNode        = methodNode;
     this.origMethodBody    = methodNode.MethodDef.MethodBody;
     this.ctx   = ctx;
     this.expr  = expr;
     this.block = block;
 }
		DecompileDocumentTabContentFactory(IDsDocumentService documentService, IDocumentTreeNodeDecompiler documentTreeNodeDecompiler, IDecompilerService decompilerService, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations, IContentTypeRegistryService contentTypeRegistryService, IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider, IDocumentWriterService documentWriterService) {
			DocumentService = documentService;
			DocumentTreeNodeDecompiler = documentTreeNodeDecompiler;
			DecompilerService = decompilerService;
			DecompilationCache = decompilationCache;
			MethodAnnotations = methodAnnotations;
			ContentTypeRegistryService = contentTypeRegistryService;
			DocumentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
			DocumentWriterService = documentWriterService;
		}
Exemplo n.º 10
0
            ProxyMethod(IMethodAnnotations methodAnnotations, IMethodNode methodNode, CancellationToken token)
            {
                this.methodAnnotations = methodAnnotations;
                this.methodNode        = methodNode;
                this.token             = token;

                this.methods         = new List <MethodDef>();
                this.origMethodBodys = new List <MethodBody>();
                this.isBodyModified  = new List <bool>();
            }
Exemplo n.º 11
0
 DecompileDocumentTabContentFactory(IDsDocumentService documentService, IDocumentTreeNodeDecompiler documentTreeNodeDecompiler, IDecompilerService decompilerService, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations, IContentTypeRegistryService contentTypeRegistryService, IDocumentViewerContentFactoryProvider documentViewerContentFactoryProvider)
 {
     DocumentService                      = documentService;
     DocumentTreeNodeDecompiler           = documentTreeNodeDecompiler;
     DecompilerService                    = decompilerService;
     DecompilationCache                   = decompilationCache;
     MethodAnnotations                    = methodAnnotations;
     ContentTypeRegistryService           = contentTypeRegistryService;
     DocumentViewerContentFactoryProvider = documentViewerContentFactoryProvider;
 }
Exemplo n.º 12
0
            SolveMethods(IMethodAnnotations methodAnnotations, ITypeNode typeNode, List <DeadInstr> deadInstructions, CancellationToken token)
            {
                this.methodAnnotations = methodAnnotations;
                this.typeNode          = typeNode;

                this.methods = new List <MethodDef>();
                AddMethods(this.methods, typeNode.TypeDef);

                this.origMethodBodys = new List <MethodBody>();
                foreach (var method in this.methods)
                {
                    this.origMethodBodys.Add(method.MethodBody);
                }

                this.deadInstructions = new DeadInstr[deadInstructions.Count];
                deadInstructions.CopyTo(this.deadInstructions);

                this.isBodyModified = new List <bool>();

                this.token = token;
            }
Exemplo n.º 13
0
		MethodBodySettingsCommand(IMethodAnnotations methodAnnotations, IMethodNode methodNode, MethodBodyOptions options) {
			this.methodAnnotations = methodAnnotations;
			this.methodNode = methodNode;
			this.newOptions = options;
			this.origMethodBody = methodNode.MethodDef.MethodBody;
		}
Exemplo n.º 14
0
 public void CopyTo(MethodDef method, IMethodAnnotations methodAnnotations)
 {
     method.MethodBody     = body;
     method.ImplAttributes = implAttributes;
     methodAnnotations.SetBodyModified(method, isBodyModified);
 }
Exemplo n.º 15
0
		EditMethodBodyILCommand(IMethodAnnotations methodAnnotations, MethodNode methodNode, MethodBodyOptions options) {
			this.methodAnnotations = methodAnnotations;
			this.methodNode = methodNode;
			newOptions = options;
			origMethodBody = methodNode.MethodDef.MethodBody;
		}
Exemplo n.º 16
0
 public void CopyTo(MethodDef method, IMethodAnnotations methodAnnotations)
 {
     method.MethodBody = body;
     methodDefOptions.CopyTo(method);
     methodAnnotations.SetBodyModified(method, isBodyModified);
 }
Exemplo n.º 17
0
 DecompileFileTabContentFactory(IFileManager fileManager, IFileTreeNodeDecompiler fileTreeNodeDecompiler, ILanguageManager languageManager, IDecompilationCache decompilationCache, IMethodAnnotations methodAnnotations, IContentTypeRegistryService contentTypeRegistryService, [ImportMany] IEnumerable <Lazy <IDocumentViewerCustomDataProvider, IDocumentViewerCustomDataProviderMetadata> > documentViewerCustomDataProviders)
 {
     this.FileManager                       = fileManager;
     this.FileTreeNodeDecompiler            = fileTreeNodeDecompiler;
     this.LanguageManager                   = languageManager;
     this.DecompilationCache                = decompilationCache;
     this.MethodAnnotations                 = methodAnnotations;
     this.ContentTypeRegistryService        = contentTypeRegistryService;
     this.DocumentViewerCustomDataProviders = documentViewerCustomDataProviders.OrderBy(a => a.Metadata.Order).ToArray();
 }
Exemplo n.º 18
0
			public void CopyTo(MethodDef method, IMethodAnnotations methodAnnotations) {
				method.MethodBody = body;
				methodDefOptions.CopyTo(method);
				methodAnnotations.SetBodyModified(method, isBodyModified);
			}