Version 3.3.1.2

PropertyInfoExtensions class

Namespace: Sirenix.Utilities
Assembly: Sirenix.Utilities
public static class PropertyInfoExtensions
PropertyInfo method extensions.
Inheritance
  • System.Object
  • PropertyInfoExtensions

Methods

DeAliasProperty(PropertyInfo, Boolean)
Returns the original, backing property of an alias property if the property is an alias.
public static PropertyInfo DeAliasProperty(this PropertyInfo propertyInfo, bool throwOnNotAliased = false)
Parameters
System.Reflection.PropertyInfo propertyInfo

The property to check.

System.Boolean throwOnNotAliased

if set to true an exception will be thrown if the property is not aliased.

Returns
System.Reflection.PropertyInfo

Exceptions
System.ArgumentException

The property was not aliased; this only occurs if throwOnNotAliased is true.

IsAliasProperty(PropertyInfo)
Determines whether the specified property is an alias.
public static bool IsAliasProperty(this PropertyInfo propertyInfo)
Parameters
System.Reflection.PropertyInfo propertyInfo

The property to check.

Returns
System.Boolean

true if the specified property is an alias; otherwise, false.

IsAutoProperty(PropertyInfo, Boolean)
Determines whether a property is an auto property.
public static bool IsAutoProperty(this PropertyInfo propInfo, bool allowVirtual = false)
Parameters
System.Reflection.PropertyInfo propInfo

System.Boolean allowVirtual

Returns
System.Boolean