Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename type for clarity #74824

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ namespace Microsoft.CodeAnalysis.Serialization;
internal partial class SerializerService
{
[DebuggerDisplay("{" + nameof(Display) + ",nq}")]
private sealed class SerializedMetadataReference : PortableExecutableReference, ISupportTemporaryStorage
private sealed class SerializedPortableExecutableReference : PortableExecutableReference, ISupportTemporaryStorage
{
private readonly Metadata _metadata;
private readonly ImmutableArray<TemporaryStorageStreamHandle> _storageHandles;
private readonly DocumentationProvider _provider;

public IReadOnlyList<ITemporaryStorageStreamHandle> StorageHandles => _storageHandles;

public SerializedMetadataReference(
public SerializedPortableExecutableReference(
MetadataReferenceProperties properties,
string? fullPath,
Metadata metadata,
Expand All @@ -49,15 +49,15 @@ protected override Metadata GetMetadataImpl()
=> _metadata;

protected override PortableExecutableReference WithPropertiesImpl(MetadataReferenceProperties properties)
=> new SerializedMetadataReference(properties, FilePath, _metadata, _storageHandles, _provider);
=> new SerializedPortableExecutableReference(properties, FilePath, _metadata, _storageHandles, _provider);

public override string ToString()
{
var metadata = TryGetMetadata(this);
var modules = GetModules(metadata);

return $"""
{nameof(SerializedMetadataReference)}
{nameof(PortableExecutableReference)}
FilePath={this.FilePath}
Kind={this.Properties.Kind}
Aliases={this.Properties.Aliases.Join(",")}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ private PortableExecutableReference ReadPortableExecutableReferenceFrom(ObjectRe
// should we shadow copy xml doc comment?

// image doesn't exist
return new MissingMetadataReference(properties, filePath, XmlDocumentationProvider.Default);
return new MissingMetadataReference(properties, filePath, DocumentationProvider.Default);
}

// for now, we will use IDocumentationProviderService to get DocumentationProvider for metadata
Expand All @@ -306,7 +306,7 @@ private PortableExecutableReference ReadPortableExecutableReferenceFrom(ObjectRe
var documentProvider = filePath != null && _documentationService != null ?
_documentationService.GetDocumentationProvider(filePath) : XmlDocumentationProvider.Default;

return new SerializedMetadataReference(
return new SerializedPortableExecutableReference(
properties, filePath, metadata, storageHandles, documentProvider);
}

Expand Down
Loading