/
githubmirror
/
roslyn
Обзор
Документация
Войти
/
githubmirror
/
roslyn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/Compilers/CSharp/Portable/Emitter/Model/PENetModuleBuilder.cs
57 строк
2 KB
Tomáš Matoušek
EnC: Block additions to MethodImpl table when targeting .NET Framework (#81304)
03 дек 2025, 23:18
Не верифицирован
03 дек 2025, 23:18
264f04f
Код
Авторство
О чём код?
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System; using System.Collections.Generic; using System.Collections.Immutable; using Microsoft.CodeAnalysis.Collections; using Microsoft.CodeAnalysis.CSharp.Symbols; using Microsoft.CodeAnalysis.Emit; using Microsoft.CodeAnalysis.PooledObjects; using Microsoft.CodeAnalysis.Symbols; using Roslyn.Utilities; namespace Microsoft.CodeAnalysis.CSharp.Emit { internal sealed class PENetModuleBuilder : PEModuleBuilder { internal PENetModuleBuilder( SourceModuleSymbol sourceModule, EmitOptions emitOptions, Cci.ModulePropertiesForSerialization serializationProperties, IEnumerable<ResourceDescription> manifestResources) : base(sourceModule, emitOptions, OutputKind.NetModule, serializationProperties, manifestResources) { } internal override SynthesizedAttributeData SynthesizeEmbeddedAttribute() { // Embedded attributes should never be synthesized in modules. throw ExceptionUtilities.Unreachable(); } protected override void AddEmbeddedResourcesFromAddedModules(ArrayBuilder<Cci.ManagedResource> builder, DiagnosticBag diagnostics) { throw ExceptionUtilities.Unreachable(); } // Emitting netmodules is not supported by EnC. public override EmitBaseline? PreviousGeneration => null; public override SymbolChanges? EncSymbolChanges => null; public override bool FieldRvaSupported => true; public override bool MethodImplSupported => true; public override INamedTypeSymbolInternal? TryGetOrCreateSynthesizedHotReloadExceptionType() => null; public override IMethodSymbolInternal GetOrCreateHotReloadExceptionConstructorDefinition() => throw ExceptionUtilities.Unreachable(); public override INamedTypeSymbolInternal? GetUsedSynthesizedHotReloadExceptionType() => null; public override IEnumerable<Cci.IFileReference> GetFiles(EmitContext context) => SpecializedCollections.EmptyEnumerable<Cci.IFileReference>(); public override ISourceAssemblySymbolInternal? SourceAssemblyOpt => null; } }