Changes

Sequence Generator

170 bytes added, 09:44, 14 November 2019
ContentClass myContent;
UBIK.Kernel.Utility.SequenceGenerator seqGenerator = new UBIK.Kernel.Utility.SequenceGenerator(this.Environment, "GROUP01");
if (seqGenerator.TryCreateNewSequentialID(myContent, out int seqID)) // handing over myContent is optional. But the reference to the object is persisted with the sequnce (documentationcan be used to navigate from the sequence to the owner)if (seqGenerator.TryCreateNewSequentialID(myContent, out int seqID))
{
myContent.TrySetValue<int>("SEQUENCE", seqID);
<source lang="csharp">
UBIK.Kernel.Utility.SequenceGenerator seqGenerator = new UBIK.Kernel.Utility.SequenceGenerator(this.Environment, "GROUP01");
if (seqGenerator.TrySetSequentialID(myContent, "SEQUENCE", out int seqID))
{
1,514
edits