internal NativeIntegerTypeMap(NativeIntegerTypeSymbol type) { _type = type; _specialType = _type.UnderlyingNamedType.SpecialType; Debug.Assert(_specialType == SpecialType.System_IntPtr || _specialType == SpecialType.System_UIntPtr); }
public override bool Equals(Symbol?other, TypeCompareKind comparison) => NativeIntegerTypeSymbol.EqualsHelper( this, other, comparison, symbol => symbol._underlyingProperty );
private TopLevel AsNativeInteger(bool asNativeInt) { Debug.Assert( this.SpecialType == SpecialType.System_IntPtr || this.SpecialType == SpecialType.System_UIntPtr ); if (asNativeInt == _isNativeInt) { return(this); } var other = new TopLevel( _containingModule, _namespaceName, name, arity, mangleName, isNativeInt: asNativeInt, _lazyErrorInfo, _lazyContainingNamespace, _lazyTypeId, TupleData ); NativeIntegerTypeSymbol.VerifyEquality(this, other); Debug.Assert(other.SpecialType == this.SpecialType); return(other); }
internal NativeIntegerMethodSymbol(NativeIntegerTypeSymbol container, MethodSymbol underlyingMethod, NativeIntegerPropertySymbol?associatedSymbol) { Debug.Assert(!underlyingMethod.IsGenericMethod); _container = container; _associatedSymbol = associatedSymbol; UnderlyingMethod = underlyingMethod; NativeIntegerTypeSymbol.VerifyEquality(this, underlyingMethod); }
internal NativeIntegerParameterSymbol(NativeIntegerTypeSymbol containingType, NativeIntegerMethodSymbol container, ParameterSymbol underlyingParameter) : base(underlyingParameter) { Debug.Assert(container != null); _containingType = containingType; _container = container; NativeIntegerTypeSymbol.VerifyEquality(this, underlyingParameter); }
internal NativeIntegerPropertySymbol( NativeIntegerTypeSymbol container, PropertySymbol underlyingProperty, Func <NativeIntegerTypeSymbol, NativeIntegerPropertySymbol, MethodSymbol?, NativeIntegerMethodSymbol?> getAccessor) : base(underlyingProperty) { Debug.Assert(underlyingProperty.ParameterCount == 0); _container = container; GetMethod = getAccessor(container, this, underlyingProperty.GetMethod); SetMethod = getAccessor(container, this, underlyingProperty.SetMethod); NativeIntegerTypeSymbol.VerifyEquality(this, underlyingProperty); }