Files
2026-08-27 10:56:38 -06:00

52 lines
2.0 KiB
C#

using System;
using System.Collections.Immutable;
using Microsoft.Cci;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.CSharp.Symbols;
internal sealed class NativeIntegerPropertySymbol : WrappedPropertySymbol, IReference
{
private readonly NativeIntegerTypeSymbol _container;
public override Symbol ContainingSymbol => _container;
public override TypeWithAnnotations TypeWithAnnotations => _container.SubstituteUnderlyingType(_underlyingProperty.TypeWithAnnotations);
public override ImmutableArray<CustomModifier> RefCustomModifiers => base.UnderlyingProperty.RefCustomModifiers;
public override ImmutableArray<ParameterSymbol> Parameters => ImmutableArray<ParameterSymbol>.Empty;
public override MethodSymbol? GetMethod { get; }
public override MethodSymbol? SetMethod { get; }
public override ImmutableArray<PropertySymbol> ExplicitInterfaceImplementations => ImmutableArray<PropertySymbol>.Empty;
internal override bool MustCallMethodsDirectly => _underlyingProperty.MustCallMethodsDirectly;
internal NativeIntegerPropertySymbol(NativeIntegerTypeSymbol container, PropertySymbol underlyingProperty, Func<NativeIntegerTypeSymbol, NativeIntegerPropertySymbol, MethodSymbol?, NativeIntegerMethodSymbol?> getAccessor)
: base(underlyingProperty)
{
_container = container;
GetMethod = getAccessor(container, this, underlyingProperty.GetMethod);
SetMethod = getAccessor(container, this, underlyingProperty.SetMethod);
}
public override bool Equals(Symbol? other, TypeCompareKind comparison)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
return NativeIntegerTypeSymbol.EqualsHelper(this, other, comparison, (NativeIntegerPropertySymbol symbol) => symbol._underlyingProperty);
}
public override int GetHashCode()
{
return _underlyingProperty.GetHashCode();
}
void IReference.Dispatch(MetadataVisitor visitor)
{
throw ExceptionUtilities.Unreachable("/_/src/Compilers/CSharp/Portable/Symbols/NativeIntegerTypeSymbol.cs", 480);
}
}