C# Class MongoDB.Bson.GuidConverter

A static class containing methods to convert to and from Guids and byte arrays in various byte orders.
Datei anzeigen Open project: CloudMetal/mongo-csharp-driver Class Usage Examples

Public Methods

Method Description
FromBytes ( byte bytes, GuidRepresentation representation ) : System.Guid

Converts a byte array to a Guid.

ToBytes ( System.Guid guid, GuidRepresentation representation ) : byte[]

Converts a Guid to a byte array.

Method Details

FromBytes() public static method

Converts a byte array to a Guid.
public static FromBytes ( byte bytes, GuidRepresentation representation ) : System.Guid
bytes byte The byte array.
representation GuidRepresentation The representation of the Guid in the byte array.
return System.Guid

ToBytes() public static method

Converts a Guid to a byte array.
public static ToBytes ( System.Guid guid, GuidRepresentation representation ) : byte[]
guid System.Guid The Guid.
representation GuidRepresentation The representation of the Guid in the byte array.
return byte[]