Class SequentialIntegerIdGeneratorStrategy
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
idstringThe identifier that is already in use.
Exceptions
- FormatException
Thrown when
idis not a valid integer value.
GenerateId(Element)
Generates the next sequential identifier for an element.
public string GenerateId(Element element)
Parameters
elementElementThe 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
relationshipRelationshipThe relationship receiving an identifier.
Returns
- string
The next identifier as a string.