GetSchema() 개인적인 메소드

private GetSchema ( [ connectionName = null, bool forceReload = false, CancellationToken cancellationToken = default(CancellationToken) ) : Task
connectionName [
forceReload bool
cancellationToken System.Threading.CancellationToken
리턴 Task
예제 #1
0
        public Task <DatabaseSchema> GetSchema(
            [NotNull] string database,
            [CanBeNull] string connectionName = null,
            bool forceReload = false,
            CancellationToken cancellationToken = default(CancellationToken))
        {
            if (database == null)
            {
                throw new ArgumentNullException("database");
            }

            DatabaseElement db = Databases[database];

            if ((db == null) ||
                (!db.Enabled))
            {
                return(TaskResult <DatabaseSchema> .FromException(
                           new LoggingException(
                               () => Resources.DatabaseConfiguration_GetSqlProgram_DatabaseIdNotFound,
                               database)));
            }

            return(db.GetSchema(connectionName, forceReload, cancellationToken));
        }