Struct PropertyDataModel
Represents the data model for either an instance property or an instance field.
public readonly struct PropertyDataModel
- Inherited Members
Constructors
PropertyDataModel(IFieldSymbol)
Creates a new instance of PropertyDataModel from a field symbol.
public PropertyDataModel(IFieldSymbol field)
Parameters
fieldIFieldSymbol
PropertyDataModel(IPropertySymbol)
Creates a new instance of PropertyDataModel from a property symbol.
public PropertyDataModel(IPropertySymbol property)
Parameters
propertyIPropertySymbol
Properties
BaseSymbol
For virtual properties, returns the symbol corresponding to the base property.
public ISymbol? BaseSymbol { get; }
Property Value
DeclaringType
The declaring type of the property or field.
public INamedTypeSymbol DeclaringType { get; }
Property Value
IncludeGetter
Whether the getter is part of the data model.
public required bool IncludeGetter { get; init; }
Property Value
IncludeSetter
Whether the setter is part of the data model.
public required bool IncludeSetter { get; init; }
Property Value
IsAmbiguous
Gets a value indicating whether the member is ambiguous due to diamond inheritance.
public bool IsAmbiguous { get; init; }
Property Value
IsField
Whether this model represents a field.
public bool IsField { get; }
Property Value
IsGetterAccessible
Whether we can access the property getter.
public required bool IsGetterAccessible { get; init; }
Property Value
IsGetterNonNullable
Whether the getter method output is non-nullable.
public required bool IsGetterNonNullable { get; init; }
Property Value
IsInitOnly
Whether the property is init-only.
public bool IsInitOnly { get; }
Property Value
IsRequiredByPolicy
Whether the property or field is considered required by policy (e.g. syntax, overridden by attribute).
public bool? IsRequiredByPolicy { get; init; }
Property Value
- bool?
IsRequiredBySyntax
Whether the property or field is declared with the required modifier.
public bool IsRequiredBySyntax { get; init; }
Property Value
IsSetterAccessible
Whether we can access the property setter.
public required bool IsSetterAccessible { get; init; }
Property Value
IsSetterNonNullable
Whether the setter method requires a non-nullable input.
public required bool IsSetterNonNullable { get; init; }
Property Value
LogicalName
A logical name overwriting the underlying name.
public string? LogicalName { get; init; }
Property Value
Name
The declared name of the property or field.
public string Name { get; }
Property Value
Order
The declared order of the property or field.
public int Order { get; init; }
Property Value
PropertySymbol
Either an IPropertySymbol or an IFieldSymbol.
public ISymbol PropertySymbol { get; }
Property Value
PropertyType
The type exposed by this property.
public ITypeSymbol PropertyType { get; }