Version 2.1.0.0

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)
Determines whether a property is an auto property.
public static bool IsAutoProperty(this PropertyInfo propInfo)
Parameters
System.Reflection.PropertyInfo propInfo

Returns
System.Boolean

This website is brand new and built with the Odin 2.1 beta in mind. This means you might discover some features such as attribute expressions that are only available in the beta.

You can download the 2.1 beta from here and read the patch-notes here.