Class ObjectExtension
Inheritance
System.Object
ObjectExtension
Namespace: Appearition.Common.ObjectExtensions
Assembly: Appearition.SDK.dll
Syntax
public static class ObjectExtension
Methods
Checksum(Stream)
Declaration
public static string Checksum(this Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream |
Returns
Type | Description |
---|---|
System.String |
ToByteArray(Stream)
Converts a Stream to a byte array.
Declaration
public static byte[] ToByteArray(this Stream stream)
Parameters
Type | Name | Description |
---|---|---|
System.IO.Stream | stream | Stream. |
Returns
Type | Description |
---|---|
System.Byte[] | The byte array. |
ToObject(Byte[])
Deserializes a binary stream to an object.
Declaration
public static object ToObject(this byte[] data)
Parameters
Type | Name | Description |
---|---|---|
System.Byte[] | data |
Returns
Type | Description |
---|---|
System.Object | The object. |
ToStream(Object)
Serializes an object to a binary stream.
Declaration
public static Stream ToStream(this object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | Object. |
Returns
Type | Description |
---|---|
System.IO.Stream | The stream. |