PostSharpAPI ReferencePost­Sharp.​SerializationSerialization­ServicesGet­Serialization­Exception
Open sandboxFocus

SerializationServices.GetSerializationException Method

GetSerializationException(MemberInfo)

Checks whether a given MethodInfo, ConstructorInfo, System.Reflection.FieldInfo, System.Reflection.PropertyInfo, EventInfo or System.Type can be safely serialized.

Declaration
public static PortableSerializationException GetSerializationException(MemberInfo memberInfo)
Parameters
Type Name Description
System.Reflection.MemberInfo memberInfo

The declaration to be serialized.

Returns
Type Description
PortableSerializationException

null if memberInfo can be safely serialized, otherwise an exception where the text describes the reason why the declaration is not serializable.

GetSerializationException(LocationInfo)

Checks whether a given LocationInfo can be safely serialized.

Declaration
public static PortableSerializationException GetSerializationException(LocationInfo locationInfo)
Parameters
Type Name Description
LocationInfo locationInfo

The declaration to be serialized.

Returns
Type Description
PortableSerializationException

null if locationInfo can be safely serialized, otherwise an exception where the text describes the reason why the declaration is not serializable.

GetSerializationException(ParameterInfo)

Checks whether a given ParameterInfo can be safely serialized.

Declaration
public static PortableSerializationException GetSerializationException(ParameterInfo parameterInfo)
Parameters
Type Name Description
ParameterInfo parameterInfo

The declaration to be serialized.

Returns
Type Description
PortableSerializationException

null if parameterInfo can be safely serialized, otherwise an exception where the text describes the reason why the declaration is not serializable.