38 lines
1.4 KiB
C#
38 lines
1.4 KiB
C#
using System.Collections.Immutable;
|
|
using System.Diagnostics;
|
|
|
|
namespace Microsoft.CodeAnalysis.CSharp;
|
|
|
|
[DebuggerDisplay("{GetDebuggerDisplay(), nq}")]
|
|
internal sealed class CSharpCompilationReference : CompilationReference
|
|
{
|
|
public CSharpCompilation Compilation { get; }
|
|
|
|
internal override Compilation CompilationCore => (Compilation)(object)Compilation;
|
|
|
|
public CSharpCompilationReference(CSharpCompilation compilation, ImmutableArray<string> aliases = default(ImmutableArray<string>), bool embedInteropTypes = false)
|
|
: base(CompilationReference.GetProperties((Compilation)(object)compilation, aliases, embedInteropTypes))
|
|
{
|
|
//IL_0004: Unknown result type (might be due to invalid IL or missing references)
|
|
Compilation = compilation;
|
|
}
|
|
|
|
private CSharpCompilationReference(CSharpCompilation compilation, MetadataReferenceProperties properties)
|
|
: base(properties)
|
|
{
|
|
//IL_0001: Unknown result type (might be due to invalid IL or missing references)
|
|
Compilation = compilation;
|
|
}
|
|
|
|
internal override CompilationReference WithPropertiesImpl(MetadataReferenceProperties properties)
|
|
{
|
|
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
|
|
return (CompilationReference)(object)new CSharpCompilationReference(Compilation, properties);
|
|
}
|
|
|
|
private string GetDebuggerDisplay()
|
|
{
|
|
return CSharpResources.CompilationC + ((Compilation)Compilation).AssemblyName;
|
|
}
|
|
}
|