public void MaybeReplaceHighestIdentifier(Identifier potentialHighestIdentifier) { if (potentialHighestIdentifier >= HighestFreeIdentifier) { HighestFreeIdentifier = potentialHighestIdentifier.NextIdentifier(); } }
public Identifier GetNextIdentifier(bool increment = false) { var ident = HighestFreeIdentifier; if (increment) { HighestFreeIdentifier = HighestFreeIdentifier.NextIdentifier(); } return(ident); }