Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

IBinarySerialize Interface

Provides custom implementation for user-defined type (UDT) and user-defined aggregate serialization and deserialization.

Namespace:  Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)
public interface IBinarySerialize

The IBinarySerialize type exposes the following members.

  NameDescription
Public methodReadGenerates a user-defined type (UDT) or user-defined aggregate from its binary form.
Public methodWriteConverts a user-defined type (UDT) or user-defined aggregate into its binary format so that it may be persisted.
Top

User-defined types (UDTs) and user-defined aggregates are required to define a storage format, which can be either Format.Native or Format.UserDefined.

Format.Native allows SQL Server to handle serialization and deserialization automatically, but the format has restrictions on the kind of types it can handle. Format.UserDefined allows user-defined types and aggregates to handle their own serialization. User-defined types and aggregates must be marked with Format.UserDefined in the SqlUserDefinedType or SqlUserDefinedAggregate attribute, and must implement the IBinarySerialize interface.

Note that even with custom serialization, the total size of each instance must be under the maximum allowed limit, currently 8000 bytes.

.NET Framework

Supported in: 4.5.1, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft. All rights reserved.