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
info
Type: System.Runtime.Serialization.SerializationInfoProvides the SerializationInfo instance the data required to serialized the object.
context
Type: System.Runtime.Serialization.StreamingContextThe destination for the serialization operation.
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