Cascade
Loading...
Searching...
No Matches
Buzzware.Cascade.CascadePropertyInfo Class Reference

Public Member Functions

 CascadePropertyInfo (PropertyInfo pi, CascadePropertyKind kind, Attribute? attr)
 CascadePropertyInfo Constructor.
object? GetValue (object aInstance)
 Gets the value of the property from an instance of the class.
void SetValue (object aInstance, object? aValue)
 Sets the value of the property for an instance of a class.

Static Public Member Functions

static CascadePropertyInfo FromPropertyInfo (PropertyInfo pi)
 Generates a CascadePropertyInfo object from a PropertyInfo object. Determines the kind of property it is based on attributes and naming conventions. The dotnet PropertyInfo instance is encapsulated and private so we know what we need from it in case we want to not store it.

Public Attributes

readonly CascadePropertyKind Kind

Properties

string Name [get]
Type Type [get]
Type NotNullType [get]
Type? InnerType [get]
Type? InnerNotNullType [get]
bool IsTypeEnumerable [get]
Attribute? KindAttribute [get]
bool CanRead [get]
bool CanWrite [get]

Constructor & Destructor Documentation

◆ CascadePropertyInfo()

Buzzware.Cascade.CascadePropertyInfo.CascadePropertyInfo ( PropertyInfo pi,
CascadePropertyKind kind,
Attribute? attr )
inline

CascadePropertyInfo Constructor.

Parameters
piPropertyInfo object from which this instance is constructed.
kindThe kind of property as determined by attributes or metadata.
attrThe attribute associated with the kind of this property.

Member Function Documentation

◆ FromPropertyInfo()

CascadePropertyInfo Buzzware.Cascade.CascadePropertyInfo.FromPropertyInfo ( PropertyInfo pi)
inlinestatic

Generates a CascadePropertyInfo object from a PropertyInfo object. Determines the kind of property it is based on attributes and naming conventions. The dotnet PropertyInfo instance is encapsulated and private so we know what we need from it in case we want to not store it.

Parameters
piThe PropertyInfo to extract CascadePropertyInfo from.
Returns
A CascadePropertyInfo object representing properties of the parameter.

◆ GetValue()

object? Buzzware.Cascade.CascadePropertyInfo.GetValue ( object aInstance)
inline

Gets the value of the property from an instance of the class.

Parameters
aInstanceThe object instance from which to get the property value.
Returns
The value of the property from the instance.

◆ SetValue()

void Buzzware.Cascade.CascadePropertyInfo.SetValue ( object aInstance,
object? aValue )
inline

Sets the value of the property for an instance of a class.

Parameters
aInstanceThe object instance for which to set the property value.
aValueThe value to set to the property in the instance.

The documentation for this class was generated from the following file:
  • Buzzware.Cascade/FastReflection.cs