/// <summary> /// Get database descriptor object. /// </summary> /// <returns>Database Descriptor Object</returns> public DatabaseDescriptor GetDatabaseDescriptor() { if (databaseDescriptor.GetType() == null || databaseDescriptor.GetType().Length <= 0) { databaseDescriptor.SetType(Constants.SQLITE_DATABASE); } return(this.databaseDescriptor); }
/// <summary> /// Get IDatabase Instance /// </summary> /// <param name="databaseDescriptor">DatabaseDescriptor Object</param> /// <returns>IDatabase Object</returns> /// <exception cref="Siminov.Core.Exception.DatabaseException">If not able to create IDatabase instance</exception> public DatabaseBundle GetDatabaseBundle(DatabaseDescriptor databaseDescriptor) { if (databaseBundles.ContainsKey(databaseDescriptor.GetDatabaseName())) { return(databaseBundles[databaseDescriptor.GetDatabaseName()]); } String type = databaseDescriptor.GetType(); String packageName = DATABASE_PACKAGE_NAME + "." + type; DatabaseBundle databaseBundle = GetDatabaseBundle(packageName); databaseBundles.Add(databaseDescriptor.GetDatabaseName(), databaseBundle); return(databaseBundle); }