Sage Modeling and Simulation Library

UniqueNameGenerator Class

Class UniqueNameGenerator creates unique names. When asked for GetNextName("Dog") the first time, it produces "Dog:0". When asked for GetNextName("Dog") the second time, it produces "Dog:1". When asked for GetNextName("Cat") the first time, it produces "Cat:0". And so on. It is intended when automatically creating, say, 100 objects of type Restaurant, one would call myUniqueNameGenerator.GetNextName(typeof(Restaurant).Name, 3, false) to create Restaurant:001, Restaurant:002, Restaurant:003, etc.

Namespace:  Highpoint.Sage.Utility
Assembly:  Sage4 (in Sage4.dll)

Syntax


public class UniqueNameGenerator

Inheritance Hierarchy


Object
  Highpoint.Sage.Utility..::..UniqueNameGenerator