Beispiel #1
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 #2
0
 public XamlOutputCreator(XamlOutputOptions options)
 {
     if (options == null)
     {
         throw new ArgumentNullException(nameof(options));
     }
     this.options = options;
 }
Beispiel #3
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 #4
0
 public XamlOutputCreator(XamlOutputOptions options) => this.options = options ?? throw new ArgumentNullException(nameof(options));
Beispiel #5
0
		public XamlOutputCreator(XamlOutputOptions options) {
			if (options == null)
				throw new ArgumentNullException(nameof(options));
			this.options = options;
		}