Beispiel #1
0
        public Guid Create(SequentialGuidGenerator.SequentialGuidDatabaseType databaseType)
        {
            switch (databaseType)
            {
            case SequentialGuidGenerator.SequentialGuidDatabaseType.SqlServer:
                return(this.Create(SequentialGuidGenerator.SequentialGuidType.SequentialAtEnd));

            case SequentialGuidGenerator.SequentialGuidDatabaseType.Oracle:
                return(this.Create(SequentialGuidGenerator.SequentialGuidType.SequentialAsBinary));

            case SequentialGuidGenerator.SequentialGuidDatabaseType.MySql:
                return(this.Create(SequentialGuidGenerator.SequentialGuidType.SequentialAsString));

            case SequentialGuidGenerator.SequentialGuidDatabaseType.PostgreSql:
                return(this.Create(SequentialGuidGenerator.SequentialGuidType.SequentialAsString));

            default:
                throw new InvalidOperationException();
            }
        }
Beispiel #2
0
 /// <summary>
 /// Prevents a default instance of the SequentialGuidGenerator class from being created.
 /// Use SequentialGuidGenerator.Instance
 /// </summary>
 private SequentialGuidGenerator()
 {
     this.DatabaseType = SequentialGuidGenerator.SequentialGuidDatabaseType.SqlServer;
 }