Show / Hide Table of Contents

Class SerializeExtensions

Useful extension methods for ISerialize.

Inheritance
Object
SerializeExtensions
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.Messaging
Assembly: IRM.dll
Syntax
public static class SerializeExtensions

Methods

AsString(Byte[])

Returns the serialized byte array as a string.

Declaration
public static string AsString(this byte[] bytes)
Parameters
System.Byte[] bytes

The byte array to convert to a string.

Returns
String

Returns the serialized byte array as a string.

Deserialize<T>(IDeserializeUntyped, IDataRecord, Int32, String)

Deserializes a field from the provided System.Data.IDataRecord.

Declaration
public static T Deserialize<T>(this IDeserializeUntyped serializer, IDataRecord record, int index, string typeName)
Parameters
IDeserializeUntyped serializer

The serializer to use.

System.Data.IDataRecord record

The System.Data.IDataRecord to get the field to deserialize from.

System.Int32 index

The index of the field to deserialize.

String typeName

The full name of the type.

Returns
T

The reconstituted object, if any.

Type Parameters
T

Remarks

This method supports that the column is a string or a byte array.

Deserialize<T>(ISerialize, Byte[])

Deserializes the array of bytes provided.

Declaration
public static T Deserialize<T>(this ISerialize serializer, byte[] serialized)
Parameters
ISerialize serializer

The serializer to use.

System.Byte[] serialized

The serialized array of bytes.

Returns
T

The reconstituted object, if any.

Type Parameters
T

The type of object to be deserialized.

Deserialize<T>(ISerialize, IDataRecord, Int32)

Deserializes a field from the provided System.Data.IDataRecord.

Declaration
public static T Deserialize<T>(this ISerialize serializer, IDataRecord record, int index)
Parameters
ISerialize serializer

The serializer to use.

System.Data.IDataRecord record

The System.Data.IDataRecord to get the field to deserialize from.

System.Int32 index

The index of the field to deserialize.

Returns
T

The reconstituted object, if any.

Type Parameters
T

The type of object to be deserialized.

Remarks

This method supports that the column is a string or a byte array.

Deserialize<T>(ISerialize, String)

Deserializes the array of bytes provided.

Declaration
public static T Deserialize<T>(this ISerialize serializer, string serialized)
Parameters
ISerialize serializer

The serializer to use.

String serialized

The serialized array of bytes.

Returns
T

The reconstituted object, if any.

Type Parameters
T

The type of object to be deserialized.

Serialize<T>(ISerialize, T)

Serializes the object provided.

Declaration
public static byte[] Serialize<T>(this ISerialize serializer, T value)
Parameters
ISerialize serializer

The serializer to use.

T value

The object graph to be serialized.

Returns
System.Byte[]

A serialized representation of the object graph provided.

Type Parameters
T

The type of object to be serialized

Back to top Generated by DocFX