13 readonly PropertyInfo _underlyingProperty;
22 base(context, type.ContainingModule, type, underlyingProperty)
24 _underlyingProperty = underlyingProperty ??
throw new ArgumentNullException(nameof(underlyingProperty));
30 public global::System.Reflection.PropertyAttributes
Attributes => (global::System.Reflection.PropertyAttributes)_underlyingProperty.Attributes;
36 public bool CanRead => _underlyingProperty.CanRead;
39 public bool CanWrite => _underlyingProperty.CanWrite;
53 return _underlyingProperty.GetRawConstantValue();
59 return ResolveParameterSymbols(_underlyingProperty.GetIndexParameters());
65 throw new NotImplementedException();
71 return ResolveMethodSymbols(_underlyingProperty.GetAccessors());
77 throw new NotImplementedException();
83 return _underlyingProperty.GetGetMethod() is MethodInfo m ? ResolveMethodSymbol(m) :
null;
89 return _underlyingProperty.GetGetMethod(nonPublic) is MethodInfo m ? ResolveMethodSymbol(m) :
null;
95 return _underlyingProperty.GetSetMethod() is MethodInfo m ? ResolveMethodSymbol(m) :
null;
101 return _underlyingProperty.GetSetMethod(nonPublic) is MethodInfo m ? ResolveMethodSymbol(m) :
null;
107 return ResolveTypeSymbols(_underlyingProperty.GetOptionalCustomModifiers());
113 return ResolveTypeSymbols(_underlyingProperty.GetRequiredCustomModifiers());
object? GetRawConstantValue()
Returns a literal value associated with the property by a compiler.
PropertyInfo UnderlyingProperty
global::System.Reflection.PropertyAttributes Attributes
Gets the attributes for this property.
IMethodSymbol? GetSetMethod()
Returns the public set accessor for this property.
IMethodSymbol? GetMethod
Gets the get accessor for this property.
IMethodSymbol[] GetAccessors()
Returns an array whose elements reflect the public get and set accessors of the property reflected by...
IkvmReflectionPropertySymbol(IkvmReflectionSymbolContext context, IkvmReflectionTypeSymbol type, PropertyInfo underlyingProperty)
Initializes a new instance.
bool IsSpecialName
Gets a value indicating whether the property is the special name.
bool CanRead
Gets a value indicating whether the property can be read.
ITypeSymbol PropertyType
Gets the type of this property.
IParameterSymbol[] GetIndexParameters()
When overridden in a derived class, returns an array of all the index parameters for the property.
IMethodSymbol? GetSetMethod(bool nonPublic)
When overridden in a derived class, returns the set accessor for this property.
IMethodSymbol? SetMethod
Gets the set accessor for this property.
ITypeSymbol[] GetOptionalCustomModifiers()
Returns an array of types representing the optional custom modifiers of the property.
ITypeSymbol[] GetRequiredCustomModifiers()
Returns an array of types representing the required custom modifiers of the property.
ITypeSymbol GetModifiedPropertyType()
Gets the modified type of this property object.
IMethodSymbol[] GetAccessors(bool nonPublic)
Returns an array whose elements reflect the public and, if specified, non-public get and set accessor...
IMethodSymbol? GetGetMethod()
Returns the public get accessor for this property.
IMethodSymbol? GetGetMethod(bool nonPublic)
When overridden in a derived class, returns the public or non-public get accessor for this property.
bool CanWrite
Gets a value indicating whether the property can be written to.
Holds references to symbols derived from System.Reflection.
Discovers the attributes of a method and provides access to method metadata.
Discovers the attributes of a parameter and provides access to parameter metadata.
Discovers the attributes of a property and provides access to property metadata.
Represents type declarations: class types, interface types, array types, value types,...