public BaseManager() { _pbconnectionisvalid = false; _fbconnectionisvalid = false; if (Settings.Default.ServerType == FbServerType.Embedded.ToString()) { _servertype = FbServerType.Embedded; } else { _servertype = FbServerType.Default; } _serverip = Settings.Default.ServerIP; _pdatabase = Settings.Default.pBaseAlias; _fdatabase = Settings.Default.fBaseAlias; string pconnstring = pConnectionString(); string fconnstring = fConnectionString(); if (_pbconnectionisvalid == true & _fbconnectionisvalid == true) { _ge = new pBaseEntities(pconnstring); _fe = new fBaseEntities(fconnstring); } else { _ge = null; _fe = null; } }
public FbTestsBase(FbServerType serverType, bool compression, FbWireCrypt wireCrypt, bool insertTestData = true) { ServerType = serverType; Compression = compression; WireCrypt = wireCrypt; _insertTestData = insertTestData; }
private FbServerType GetServerType(string keyword, FbServerType defaultValue) { object value; if (!TryGetValue(GetKey(keyword), out value)) { return(defaultValue); } if (value is FbServerType) { return((FbServerType)value); } else if (value is string) { switch ((string)value) { case "Default": return(FbServerType.Default); case "Embedded": return(FbServerType.Embedded); } } return((FbServerType)GetInt32(keyword, (int)defaultValue)); }
public CalorimeterDatabase(FbServerType type = FbServerType.Default) : base(type) { UserSet = new UserDataSet(connect, null, null); CalibratorSet = new CalibratorDataSet(connect, null, null); CalibratorRowSet = new CalibratorRowDataSet(connect, null, null); CalibPointSet = new CalibPointDataSet(connect, null, null); }
public static void SetUp(FbServerType serverType) { if (!_initalized.Contains(serverType)) { Prepare(serverType); _initalized.Add(serverType); } }
private static void Prepare(FbServerType serverType) { string cs = TestsBase.BuildConnectionString(serverType); CreateDatabase(cs); CreateTables(cs); CreateProcedures(cs); CreateTriggers(cs); }
static TestFixtureData CreateTestFixtureData(FbServerType serverType, bool compression, FbWireCrypt wireCrypt) { var result = new TestFixtureData(serverType, compression, wireCrypt); result.Properties.Set(nameof(FbTestsBase.ServerType), serverType.ToString()); result.Properties.Set(nameof(FbTestsBase.Compression), compression.ToString()); result.Properties.Set(nameof(FbTestsBase.WireCrypt), wireCrypt.ToString()); return(result); }
private static void Prepare(FbServerType serverType, bool compression) { string cs = TestsBase.BuildConnectionString(serverType, compression); CreateDatabase(cs); CreateTables(cs); CreateProcedures(cs); CreateTriggers(cs); }
protected bool EnsureServerType(FbServerType type) { if (FbServerType == type) { return(true); } Assert.Inconclusive("Not supported on this server type."); return(false); }
protected bool EnsureServerType(FbServerType serverType) { if (ServerType == serverType) { return(true); } Assert.Inconclusive($"Not supported on this {nameof(FbServerType)}."); return(false); }
public static void SetUp(FbServerType serverType, bool compression) { var item = Tuple.Create(serverType, compression); if (!_initalized.Contains(item)) { Prepare(serverType, compression); _initalized.Add(item); } }
public static string BuildServicesConnectionString(FbServerType serverType, bool compression, bool includeDatabase) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.UserID = FbTestsSetup.UserID; cs.Password = FbTestsSetup.Password; cs.DataSource = FbTestsSetup.DataSource; if (includeDatabase) { cs.Database = FbTestsSetup.Database(serverType, compression); } cs.ServerType = serverType; return(cs.ToString()); }
public static void SetUp(FbServerType serverType, bool compression) { var item = Tuple.Create(serverType, compression); if (!_initalized.Contains(item)) { var cs = FbTestsBase.BuildConnectionString(serverType, compression); FbConnection.CreateDatabase(cs, PageSize, ForcedWrite, true); CreateTables(cs); CreateProcedures(cs); CreateTriggers(cs); _initalized.Add(item); } }
public static FbConnectionStringBuilder BuildConnectionStringBuilder(FbServerType serverType) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.UserID = TestsSetup.UserID; cs.Password = TestsSetup.Password; cs.DataSource = TestsSetup.DataSource; cs.Database = TestsSetup.Database; cs.Port = TestsSetup.Port; cs.Charset = TestsSetup.Charset; cs.Pooling = TestsSetup.Pooling; cs.ServerType = serverType; return(cs); }
public static FbConnectionStringBuilder BuildServicesConnectionStringBuilder(FbServerType serverType, bool compression, FbWireCrypt wireCrypt, bool includeDatabase) { var builder = new FbConnectionStringBuilder(); builder.UserID = FbTestsSetup.UserID; builder.Password = FbTestsSetup.Password; builder.DataSource = FbTestsSetup.DataSource; if (includeDatabase) { builder.Database = FbTestsSetup.Database(serverType, compression, wireCrypt); } builder.ServerType = serverType; return(builder); }
public static FbConnectionStringBuilder BuildConnectionStringBuilder(FbServerType serverType, bool compression) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.UserID = FbTestsSetup.UserID; cs.Password = FbTestsSetup.Password; cs.DataSource = FbTestsSetup.DataSource; cs.Database = FbTestsSetup.Database(serverType, compression); cs.Port = FbTestsSetup.Port; cs.Charset = FbTestsSetup.Charset; cs.Pooling = FbTestsSetup.Pooling; cs.Compression = compression; cs.ServerType = serverType; return(cs); }
public static FbConnectionStringBuilder BuildConnectionStringBuilder(FbServerType serverType, bool compression) { var builder = new FbConnectionStringBuilder(); builder.UserID = FbTestsSetup.UserID; builder.Password = FbTestsSetup.Password; builder.DataSource = FbTestsSetup.DataSource; builder.Database = FbTestsSetup.Database(serverType, compression); builder.Port = FbTestsSetup.Port; builder.Charset = FbTestsSetup.Charset; builder.Pooling = FbTestsSetup.Pooling; builder.Compression = compression; builder.ServerType = serverType; return(builder); }
private FbServerType GetServerType(string keyword, FbServerType defaultValue) { var key = GetKey(keyword); if (!TryGetValue(key, out var value)) { return(defaultValue); } switch (value) { case FbServerType fbServerType: return(fbServerType); case string s when Enum.TryParse <FbServerType>(s, true, out var enumResult): return(enumResult); default: return(Common.ConnectionString.GetServerType(key, base.TryGetValue, defaultValue)); } }
//---------------------------------------------------------------------- public UlFirebird(FbServerType type = FbServerType.Default) { connect = new FbConnection(); connectStrings = new FbConnectionStringBuilder(); command = new FbCommand("", connect); command.Transaction = null; dataAdapter = new FbDataAdapter("", connect); trans = null; connectStrings.Clear(); connectStrings.DataSource = ""; connectStrings.Database = ""; connectStrings.UserID = "SYSDBA"; connectStrings.Password = "******"; connectStrings.Charset = "NONE"; connectStrings.Dialect = 3; connectStrings.Port = 3050; connectStrings.Pooling = false; connectStrings.ServerType = type; }
private FbServerType GetServerType(string keyword, FbServerType defaultValue) { if (!TryGetValue(GetKey(keyword), out var value)) { return(defaultValue); } switch (value) { case FbServerType fbServerType: return(fbServerType); case string s when s == "Default": return(FbServerType.Default); case string s when s == "Embedded": return(FbServerType.Embedded); default: return((FbServerType)GetInt32(keyword, (int)defaultValue)); } }
public FbDatabaseInfoTests(FbServerType serverType) : base(serverType, false) { }
public FbCommandTests(FbServerType serverType, bool compression) : base(serverType, compression) { }
public GuidTests(FbServerType serverType) : base(serverType, false) { }
public FbConnectionTests(FbServerType serverType) : base(serverType, false) { }
public FbDataReaderTests(FbServerType serverType) : base(serverType, false) { }
public static string BuildServicesConnectionString(FbServerType serverType) { return BuildServicesConnectionString(serverType, true); }
public FbBlobTests(FbServerType serverType) : base(serverType) { }
private static void Drop(FbServerType serverType) { string cs = TestsBase.BuildConnectionString(serverType); DropDatabase(cs); }
public FbScriptTests(FbServerType serverType) : base(serverType) { }
public TestsBase(FbServerType serverType, bool withTransaction) { _fbServerType = serverType; _withTransaction = withTransaction; }
public FbDatabaseSchemaTests(FbServerType serverType) : base(serverType, false) { }
public TestsBase(FbServerType serverType) : this(serverType, false) { }
public static FbConnectionStringBuilder BuildConnectionStringBuilder(FbServerType serverType) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.UserID = TestsSetup.UserID; cs.Password = TestsSetup.Password; cs.DataSource = TestsSetup.DataSource; cs.Database = TestsSetup.Database; cs.Port = TestsSetup.Port; cs.Charset = TestsSetup.Charset; cs.Pooling = TestsSetup.Pooling; cs.ServerType = serverType; return cs; }
public static string BuildServicesConnectionString(FbServerType serverType, bool includeDatabase) { FbConnectionStringBuilder cs = new FbConnectionStringBuilder(); cs.UserID = TestsSetup.UserID; cs.Password = TestsSetup.Password; cs.DataSource = TestsSetup.DataSource; if (includeDatabase) { cs.Database = TestsSetup.Database; } cs.ServerType = serverType; return cs.ToString(); }
public FbImplicitTransactionTests(FbServerType serverType, bool compression) : base(serverType, compression) { }
public TransactionScopeTests(FbServerType serverType) : base(serverType) { }
public static string BuildConnectionString(FbServerType serverType) { return BuildConnectionStringBuilder(serverType).ToString(); }
public FbDataAdapterTests(FbServerType serverType) : base(serverType, false) { }
public TestsBase(FbServerType serverType, bool withTransaction) { this.fbServerType = serverType; this.withTransaction = withTransaction; }
public TrackerIssuesTests(FbServerType serverType) : base(serverType, false) { }
public FbArrayTests(FbServerType serverType) : base(serverType, true) { }
public FbStoredProcCallsTests(FbServerType serverType) : base(serverType, false) { }
public FbImplicitTransactionTests(FbServerType serverType) : base(serverType) { }
public FbBlobTests(FbServerType serverType) : base(serverType, false) { }
public FbBooleanSupportTests(FbServerType serverType, bool compression, FbWireCrypt wireCrypt) : base(serverType, compression, wireCrypt) { _shouldTearDown = false; }
public FbCommandTests(FbServerType serverType) : base(serverType, false) { }
public FbConnectionTests(FbServerType serverType, bool compression) : base(serverType, compression) { }
public FbTransactionTests(FbServerType serverType) : base(serverType, false) { }
public FbExceptionTests(FbServerType serverType) : base(serverType) { }
public FbDecFloat16SupportTests(FbServerType serverType, bool compression, FbWireCrypt wireCrypt) : base(serverType, compression, wireCrypt) { }
public FbParameterTests(FbServerType serverType) : base(serverType) { }
public FbDatabaseSchemaTests(FbServerType serverType, bool compression) : base(serverType, compression) { }
public FbParameterCollectionTests(FbServerType serverType) : base(serverType) { }
public EntityFrameworkTests(FbServerType serverType) : base(serverType) { }
public FbServicesTests(FbServerType serverType) : base(serverType, false) { }