Open sandboxFocus

Method GetSerializationException

GetSerializationException(MemberInfo)

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

Declaration
public static PortableSerializationException GetSerializationException(MemberInfo memberInfo)
Parameters
Type Name Description
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.