Open sandboxFocus

Method Of

Of(SymbolSequencePoint)

Declaration
public static MessageLocation Of(SymbolSequencePoint symbolSequencePoint)
Parameters
Type Name Description
SymbolSequencePoint symbolSequencePoint

A SymbolSequencePoint.

Returns
Type Description
MessageLocation

A MessageLocation corresponding to symbolSequencePoint.

Of(object)

Builds a MessageLocation from an object representing an element of code (Type, MethodInfo, ConstructorInfo, FieldInfo, IExpression, Assembly, ParameterInfo, EventInfo, PropertyInfo or, if you are using PostSharp SDK, any Declaration).

Declaration
public static MessageLocation Of(object codeElement)
Parameters
Type Name Description
object codeElement

an object representing an element of code (Type, MethodInfo, ConstructorInfo, FieldInfo, Assembly, ParameterInfo, EventInfo, PropertyInfo, IExpression or, if you are using PostSharp SDK, any Declaration.

Returns
Type Description
MessageLocation

A MessageLocation representing codeElement.

Remarks

If codeElement is null or cannot mapped to a location of code, this method silently returns Unknown.

Of(MemberInfo)

Declaration
public static MessageLocation Of(MemberInfo member)
Parameters
Type Name Description
MemberInfo member

An element of code (Type, MethodInfo, ConstructorInfo, FieldInfo, PropertyInfo, EventInfo).

Returns
Type Description
MessageLocation

A MessageLocation.

Of(ParameterInfo)

Builds a MessageLocation from a ParameterInfo.

Declaration
public static MessageLocation Of(ParameterInfo parameter)
Parameters
Type Name Description
ParameterInfo parameter

A ParameterInfo.

Returns
Type Description
MessageLocation

A MessageLocation.

Of(LocationInfo)

Builds a MessageLocation from a LocationInfo.

Declaration
public static MessageLocation Of(LocationInfo location)
Parameters
Type Name Description
LocationInfo location

A LocationInfo.

Returns
Type Description
MessageLocation

A MessageLocation.

Of(Assembly)

Builds a MessageLocation from an Assembly.

Declaration
public static MessageLocation Of(Assembly assembly)
Parameters
Type Name Description
Assembly assembly

An Assembly (Assembly or its wrapper).

Returns
Type Description
MessageLocation

A MessageLocation.

Of(IExpression)

Builds a MessageLocation from an IExpression.

Declaration
public static MessageLocation Of(IExpression expression)
Parameters
Type Name Description
IExpression expression

An IExpression.

Returns
Type Description
MessageLocation

A MessageLocation.