コード例 #1
0
 public GetServersInfoHandler(IDbContextLocator dbContextLocator, IServerQueryFactory sqf,
                              IRequestScopeLocator scopeLocator)
     : base(dbContextLocator)
 {
     _sqf          = sqf;
     _scopeLocator = scopeLocator;
 }
コード例 #2
0
 public async Task<BatchResult> GetServers(IServerQueryFactory factory, CancellationToken cancelToken,
     Action<List<IPEndPoint>> act) {
     var master = new SourceMasterQuery(ServerFilterBuilder.Build().FilterByGame("starbound").Value);
     return new BatchResult(await master.GetParsedServersObservable(cancelToken)
         .Do(x => act(x.Items))
         .SelectMany(x => x.Items)
         .Count());
 }
コード例 #3
0
        public ServerQuery(IDatabaseGateway databaseGateway, IServerQueryFactory queryFactory)
        {
            Guard.AgainstNull(databaseGateway, nameof(databaseGateway));
            Guard.AgainstNull(queryFactory, nameof(queryFactory));

            _databaseGateway = databaseGateway;
            _queryFactory    = queryFactory;
        }
コード例 #4
0
        public async Task <BatchResult> GetServers(IServerQueryFactory factory, CancellationToken cancelToken,
                                                   Action <List <IPEndPoint> > act)
        {
            var master = new SourceMasterQuery(ServerFilterBuilder.Build().FilterByGame("starbound").Value);

            return(new BatchResult(await master.GetParsedServersObservable(cancelToken)
                                   .Do(x => act(x.Items))
                                   .SelectMany(x => x.Items)
                                   .Count()));
        }
コード例 #5
0
 public Task <BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection <IPEndPoint> addresses,
                                          Action <Server> act, ServerQueryOptions options)
 => factory.Create(this).GetServerInfo(SteamInfo.AppId, addresses, options, act);
コード例 #6
0
 public Task <BatchResult> GetServers(IServerQueryFactory factory, CancellationToken cancelToken, Action <List <IPEndPoint> > act)
 => factory.Create(this).GetServerAddresses(SteamInfo.AppId, act, cancelToken);
コード例 #7
0
ファイル: GetServers.cs プロジェクト: dkv01/withSIX.Desktop
 public GetServerAddressesHandler(IDbContextLocator dbContextLocator, IServerQueryFactory sqf,
                                  IRequestScopeLocator scopeLoc) : base(dbContextLocator)
 {
     _sqf      = sqf;
     _scopeLoc = scopeLoc;
 }
コード例 #8
0
 public Task <BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection <IPEndPoint> addresses,
                                          Action <Server> act, ServerQueryOptions options)
 => GetFromGameServerQuery(addresses, options, act);
コード例 #9
0
 public Task<BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection<IPEndPoint> addresses,
         Action<Server> act, ServerQueryOptions options)
     => GetFromGameServerQuery(addresses, options, act);