コード例 #1
0
        public RelationalDatabaseDataSet GetAll(ICatalogGateway gateway)
        {
            _logger.Trace(Strings.TableModuleCall);
            Guard.Against.Null(gateway, nameof(gateway));

            return(gateway.FindAllCatalogs());
        }
コード例 #2
0
        public RelationalDatabaseDataSet GetBy(ITableGateway tableGateway, CatalogName[] catalogNameCollection)
        {
            _logger.Trace(Strings.TableModuleCall);
            Guard.Against.Null(tableGateway, nameof(tableGateway));
            Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection));

            return(tableGateway.FindTablesBy(catalogNameCollection));
        }
コード例 #3
0
 public void FillBy(RelationalDatabaseDataSet dataSet, IDomainGateway domainGateway, CatalogName[] catalogNameCollection)
 {
     _logger.Trace(Strings.TableModuleCall);
     Guard.Against.Null(domainGateway, nameof(domainGateway));
     Guard.Against.NullOrEmptyCollection(catalogNameCollection, nameof(catalogNameCollection));
     domainGateway.FillDomainsBy(dataSet, catalogNameCollection);
 }
コード例 #4
0
 public void Try()
 {
     _appLogger.Debug("DDDDDDDD" + " " + DateTime.Now);
     _appLogger.Error("EEEEEEEE" + " " + DateTime.Now);
     _appLogger.Info("IIIIIIIIII" + " " + DateTime.Now);
     _appLogger.Trace("TTTTTTTT" + " " + DateTime.Now);
     _appLogger.Fatal("FFFFFFFFF" + " " + DateTime.Now);
 }
コード例 #5
0
        public void FillBy(RelationalDatabaseDataSet dataSet,
                           IServerGateway gateway)
        {
            _logger.Trace(Strings.TableModuleCall);
            Guard.Against.Null(dataSet, nameof(dataSet));
            Guard.Against.Null(gateway, nameof(gateway));

            RelationalDatabaseDataSet results = gateway.FindServer();

            dataSet.Merge(results);
        }
コード例 #6
0
        public async Task <bool> AuthorizeAsync <T>(ClaimsPrincipal claimsPrincipal, OperationAuthorizationRequirement authorizationRequirement, T finalValue, bool throwException) where T : class
        {
            var result = await _authorizationService.AuthorizeAsync(claimsPrincipal, finalValue, authorizationRequirement);

            if (throwException && !result.Succeeded)
            {
                string message = $"{finalValue} {authorizationRequirement.Name} authorization failure";
                _logger.Trace(message);
                throw new AuthorizationException(message);
            }
            return(result.Succeeded);
        }
コード例 #7
0
 public void Configure(string connectionString)
 {
     _logger.Trace(Strings.TableGatewayCall, args: connectionString);
     Guard.Against.NullOrEmpty(connectionString, nameof(connectionString));
     ConnectionString = connectionString;
 }