void Decompile(ModuleDef module, BamlDocument document, IDecompiler lang,
			IDecompilerOutput output, CancellationToken token) {
			var decompiler = new XamlDecompiler();
			var xaml = decompiler.Decompile(module, document, token, BamlDecompilerOptions.Create(lang), null);
			var xamlText = new XamlOutputCreator(xamlOutputOptionsProvider.Default).CreateText(xaml);
			documentWriterService.Write(output, xamlText, ContentTypes.Xaml);
		}
Beispiel #2
0
		public IList<string> Decompile(ModuleDef module, byte[] data, CancellationToken token, BamlDecompilerOptions bamlDecompilerOptions, Stream output, XamlOutputOptions outputOptions) {
			var doc = BamlReader.ReadDocument(new MemoryStream(data), token);
			var asmRefs = new List<string>();
			var xaml = new XamlDecompiler().Decompile(module, doc, token, bamlDecompilerOptions, asmRefs);
			var resData = Encoding.UTF8.GetBytes(new XamlOutputCreator(outputOptions).CreateText(xaml));
			output.Write(resData, 0, resData.Length);
			return asmRefs;
		}
Beispiel #3
0
        void Decompile(ModuleDef module, BamlDocument document, ILanguage lang,
                       IDecompilerOutput output, CancellationToken token)
        {
            var decompiler = new XamlDecompiler();
            var xaml       = decompiler.Decompile(module, document, token, BamlDecompilerOptions.Create(lang), null);

            output.Write(xaml.ToString(), BoxedTextColor.Text);
        }
Beispiel #4
0
		void Decompile(ModuleDef module, BamlDocument document, Language lang,
			ITextOutput output, out IHighlightingDefinition highlight, CancellationToken token) {
			var decompiler = new XamlDecompiler();
			var xaml = decompiler.Decompile(module, document, token);

			output.Write(xaml.ToString(), TextTokenType.Text);
			highlight = HighlightingManager.Instance.GetDefinitionByExtension(".xml");
		}
		void Decompile(ModuleDef module, BamlDocument document, ILanguage lang,
			ITextOutput output, out string ext, CancellationToken token) {
			var decompiler = new XamlDecompiler();
			var xaml = decompiler.Decompile(module, document, token, BamlDecompilerOptions.Create(lang), null);

			output.Write(xaml.ToString(), TextTokenKind.Text);
			ext = ".xml";
		}
Beispiel #6
0
        void Decompile(ModuleDef module, BamlDocument document, IDecompiler lang,
                       IDecompilerOutput output, CancellationToken token)
        {
            var decompiler = new XamlDecompiler();
            var xaml       = decompiler.Decompile(module, document, token, BamlDecompilerOptions.Create(lang), null);
            var xamlText   = new XamlOutputCreator(xamlOutputOptionsProvider.Default).CreateText(xaml);

            documentWriterService.Write(output, xamlText, ContentTypes.Xaml);
        }
Beispiel #7
0
        void Decompile(ModuleDef module, BamlDocument document, Language lang,
                       ITextOutput output, out IHighlightingDefinition highlight, CancellationToken token)
        {
            var decompiler = new XamlDecompiler();
            var xaml       = decompiler.Decompile(module, document, token);

            output.Write(xaml.ToString(), TextTokenType.Text);
            highlight = HighlightingManager.Instance.GetDefinitionByExtension(".xml");
        }
Beispiel #8
0
        void Decompile(ModuleDef module, BamlDocument document, ILanguage lang,
                       ITextOutput output, out string ext, CancellationToken token)
        {
            var decompiler = new XamlDecompiler();
            var xaml       = decompiler.Decompile(module, document, token, BamlDecompilerOptions.Create(lang), null);

            output.Write(xaml.ToString(), TextTokenKind.Text);
            ext = ".xml";
        }
Beispiel #9
0
        public IList <string> Decompile(ModuleDef module, byte[] data, CancellationToken token, BamlDecompilerOptions bamlDecompilerOptions, Stream output, XamlOutputOptions outputOptions)
        {
            var doc     = BamlReader.ReadDocument(new MemoryStream(data), token);
            var asmRefs = new List <string>();
            var xaml    = new XamlDecompiler().Decompile(module, doc, token, bamlDecompilerOptions, asmRefs);
            var resData = Encoding.UTF8.GetBytes(new XamlOutputCreator(outputOptions).CreateText(xaml));

            output.Write(resData, 0, resData.Length);
            return(asmRefs);
        }