Back to Devexpress

GuidGenerationMode Enum

xpo-devexpress-dot-xpo-47ab8459.md

latest2.2 KB
Original Source

GuidGenerationMode Enum

Contains values that specify how XPO generates new globally unique identifier values.

Namespace : DevExpress.Xpo

Assembly : DevExpress.Xpo.v25.2.dll

NuGet Package : DevExpress.Xpo

Declaration

csharp
public enum GuidGenerationMode
vb
Public Enum GuidGenerationMode

Members

NameDescription
FrameworkDefault

The Guid.NewGuid method is used.

| | UuidCreateSequential |

The UuidCreateSequential function is used.

| | Custom |

A custom algorithm specified by the XpoDefault.CustomGuidGenerationHandler delegate is used.

|

Remarks

You can pass these enumeration values to the XpoDefault.GuidGenerationMode property.

To use the Custom mode, assign a custom Func<Guid> delegate to the XpoDefault.CustomGuidGenerationHandler field:

csharp
using DevExpress.Xpo;
// ...
Func<Guid> myCustomGuidGenerationAlgorithm = () => { return Guid.NewGuid(); };
XpoDefault.CustomGuidGenerationHandler = myCustomGuidGenerationAlgorithm;
XpoDefault.GuidGenerationMode = GuidGenerationMode.Custom;
vb
Imports DevExpress.Xpo
' ...
Private myCustomGuidGenerationAlgorithm As Func(Of Guid) = Function() Guid.NewGuid()
XpoDefault.CustomGuidGenerationHandler = myCustomGuidGenerationAlgorithm
XpoDefault.GuidGenerationMode = GuidGenerationMode.Custom

See Also

DevExpress.Xpo Namespace