Share via


SPUserCodeValidationFailedException.GetObjectData method

Adds information about the validation exception to the serialized information.

Namespace:  Microsoft.SharePoint.UserCode
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel := True)> _
<SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter := True)> _
Public Overrides Sub GetObjectData ( _
    info As SerializationInfo, _
    context As StreamingContext _
)
'Usage
Dim instance As SPUserCodeValidationFailedException
Dim info As SerializationInfo
Dim context As StreamingContext

instance.GetObjectData(info, context)
[SharePointPermissionAttribute(SecurityAction.Demand, ObjectModel = true)]
[SecurityPermissionAttribute(SecurityAction.Demand, SerializationFormatter = true)]
public override void GetObjectData(
    SerializationInfo info,
    StreamingContext context
)

Parameters

Implements

ISerializable.GetObjectData(SerializationInfo, StreamingContext)
_Exception.GetObjectData(SerializationInfo, StreamingContext)

Exceptions

Exception Condition
ArgumentNullException

info is a null reference (Nothing in Visual Basic).

Remarks

This override adds information about the validation exception to the serialized exception. During deserialization, the exception is reconstituted from the info transmitted over the stream.

See also

Reference

SPUserCodeValidationFailedException class

SPUserCodeValidationFailedException members

Microsoft.SharePoint.UserCode namespace