Skip to content

Commit

Permalink
TODO
Browse files Browse the repository at this point in the history
  • Loading branch information
tmat committed Jun 28, 2024
1 parent 6d65508 commit 33bc1f8
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,13 @@ internal class DecompilationMetadataAsSourceFileProvider(IImplementationAssembly
// We need to generate this. First, we'll need a temporary project to do the generation into. We
// avoid loading the actual file from disk since it doesn't exist yet.
var metadataSolution = metadataWorkspace.CurrentSolution;

//new CodeAndImportGenerationOptions()
//{
// GenerationOptions = options.GenerationOptions,
// AddImportOptions = options.CleanupOptions.AddImportOptions
//}.CreateProvider()

var (temporaryProjectInfo, temporaryDocumentId) = fileInfo.GetProjectInfoAndDocumentId(metadataSolution.Services, loadFileFromDisk: false);
var temporaryDocument = metadataSolution
.AddProject(temporaryProjectInfo)
Expand Down Expand Up @@ -144,7 +151,7 @@ internal class DecompilationMetadataAsSourceFileProvider(IImplementationAssembly
if (!useDecompiler)
{
var sourceFromMetadataService = temporaryDocument.Project.Services.GetRequiredService<IMetadataAsSourceService>();
temporaryDocument = await sourceFromMetadataService.AddSourceToAsync(temporaryDocument, compilation, symbol, options.GenerationOptions, cancellationToken).ConfigureAwait(false);
temporaryDocument = await sourceFromMetadataService.AddSourceToAsync(temporaryDocument, compilation, symbol, cancellationToken).ConfigureAwait(false);
}

// We have the content, so write it out to disk
Expand Down

0 comments on commit 33bc1f8

Please sign in to comment.