Table of Contents

Class SequentialIntegerIdGeneratorStrategy

Namespace
C4.Net
Assembly
C4.Net.Core.dll

An ID generator that simply uses a sequential number when generating IDs for model elements and relationships. This is the default ID generator.

public class SequentialIntegerIdGeneratorStrategy : IdGenerator
Inheritance
SequentialIntegerIdGeneratorStrategy
Implements
Inherited Members

Methods

Found(string)

Advances the generator when an existing identifier is discovered during hydration or deserialization.

public void Found(string id)

Parameters

id string

The identifier that is already in use.

Exceptions

FormatException

Thrown when id is not a valid integer value.

GenerateId(Element)

Generates the next sequential identifier for an element.

public string GenerateId(Element element)

Parameters

element Element

The element receiving an identifier.

Returns

string

The next identifier as a string.

GenerateId(Relationship)

Generates the next sequential identifier for a relationship.

public string GenerateId(Relationship relationship)

Parameters

relationship Relationship

The relationship receiving an identifier.

Returns

string

The next identifier as a string.