Show / Hide Table of Contents

Class GuidExtensions

Useful extension methods for System.Guid.

Inheritance
Object
GuidExtensions
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
Assembly: IRM.dll
Syntax
public static class GuidExtensions

Properties

Optimization

Gets or sets the type of sequential System.Guid that should be generated.

Declaration
public static GuidOptimization Optimization { get; set; }
Property Value
GuidOptimization

Methods

NewSequentialGuid()

Creates a sequential GUID according to Optimization ordering rules.

Declaration
public static Guid NewSequentialGuid()
Returns
System.Guid

SplitWork(IEnumerable<Guid>, Int32)

Splits a collection of unique identifiers into a list with a tuple of to and from System.Guids.

Declaration
public static List<Tuple<Guid, Guid>> SplitWork(this IEnumerable<Guid> source, int size = 250)
Parameters
IEnumerable<System.Guid> source

A collection of System.Guid identifiers that are sortable (aka created with NewSequentialGuid() or by SQL Server).

System.Int32 size

The number of System.Guids in each tuple returned.

Returns
List<System.Tuple<System.Guid, System.Guid>>

A splited collection of to and from System.Guids.

Remarks

This method is useful if you need to split the work of a big collecion of identifiers that should be handled. It requires the System.Guids to be sortable, which means they must be created with NewSequentialGuid() or by SQL Server.

Back to top Generated by DocFX