This is the online documentation for PostSharp 4.3.
Download PDF or CHM. Go to v4.3 or v5.0
LocationInfo Class
Represents a FieldInfo, PropertyInfo or ParameterInfo, which all have the semantics of a location (get value, set value).
Inheritance Hierarchy
System.Object
  PostSharp.Reflection.LocationInfo

Namespace: PostSharp.Reflection
Assembly: PostSharp (in PostSharp.dll) Version: 4.3.31.0 (4.3.31.0)
Syntax
C#
[SerializableAttribute]
public sealed class LocationInfo : IEquatable<LocationInfo>, 
	ISerializable

The LocationInfo type exposes the following members.

Constructors
  NameDescription
Public methodLocationInfo(FieldInfo)
Initializes a new LocationInfo from a FieldInfo.
Public methodLocationInfo(ParameterInfo)
Initializes a new LocationInfo from a ParameterInfo.
Public methodLocationInfo(PropertyInfo)
Initializes a new LocationInfo from a PropertyInfo.
Top
Properties
  NameDescription
Public propertyDeclaringType
Gets the declaring type of the underlying field, property, parameter, or return value.
Public propertyFieldInfo
Gets the underlying FieldInfo, or null if the underlying code element is not a property.
Public propertyIsStatic
Determines whether the underlying field or property is static.
Public propertyLocationKind
Gets the location kind (Field, Property, Parameter or ReturnValue).
Public propertyLocationType
Gets the type of values that can be stored in the location.
Public propertyName
Gets the name of the underlying field, property, parameter, or return value.
Public propertyParameterInfo
Gets the underlying ParameterInfo, or null if the underlying code element is not a property.
Public propertyPropertyInfo
Gets the underlying PropertyInfo, or null if the underlying code element is not a property.
Top
Methods
  NameDescription
Public methodEquals(Object)
Determines whether the specified object is equal to the current object.
(Overrides Object.Equals(Object).)
Public methodEquals(LocationInfo)
Indicates whether the current object is equal to another object of the same type.
Public methodGetHashCode
Serves as the default hash function.
(Overrides Object.GetHashCode().)
Public methodGetValue(Object)
Returns the value of the field or property represented by the current object.
Public methodGetValue(Object, Object[])
Returns the value of the field or property represented by the current object with optional index values for indexed properties.
Public methodSetValue(Object, Object)
Sets the value of the field or property represented by the current object to a given value.
Public methodSetValue(Object, Object, Object[])
Sets the value of the field or property represented by the current object to a given value with optional index values for indexed properties.
Public methodStatic memberToLocationInfo
Initializes a new LocationInfo from a FieldInfo, PropertyInfo, or ParameterInfo.
Public methodStatic memberToLocationInfoArray(ICollection<FieldInfo>)
Converts a collection of FieldInfo into an array of LocationInfo.
Public methodStatic memberToLocationInfoArray(ICollection<ParameterInfo>)
Converts a collection of ParameterInfo into an array of LocationInfo.
Public methodStatic memberToLocationInfoArray(ICollection<PropertyInfo>)
Converts a collection of PropertyInfo into an array of LocationInfo.
Public methodToString
Returns a string that represents the current object.
(Overrides Object.ToString().)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Determines whether two instances of LocationInfo represent the same element of code.
Public operatorStatic memberInequality
Determines whether two instances of LocationInfo represent different elements of code.
Top
Extension Methods
  NameDescription
Public Extension MethodQueryInterface<T>
Gets the implementation of a specified interface for the specified object.
(Defined by QueryInterfaceExtensions.)
Top
See Also