protected override Task<DecompileAsyncResult> DecompileAsync(DecompileCodeState decompileCodeState) { var state = (EditAssemblyDecompileCodeState)decompileCodeState; state.CancellationToken.ThrowIfCancellationRequested(); var options = new DecompileAssemblyInfo(state.MainOutput, state.DecompilationContext, sourceModule); options.KeepAllAttributes = true; decompiler.Decompile(DecompilationType.AssemblyInfo, options); state.CancellationToken.ThrowIfCancellationRequested(); var result = new DecompileAsyncResult(); result.AddDocument(MAIN_CODE_NAME, state.MainOutput.ToString(), null); return Task.FromResult(result); }
void DecompileAssemblyInfo(DecompileAssemblyInfo info) { var state = CreateAstBuilder(info.Context, langSettings.Settings, currentModule: info.Module); try { state.AstBuilder.AddAssembly(info.Module, true, info.Module.IsManifestModule, true); RunTransformsAndGenerateCode(ref state, info.Output, info.Context, info.KeepAllAttributes ? null : new AssemblyInfoTransform()); } finally { state.Dispose(); } }