public GetServersInfoHandler(IDbContextLocator dbContextLocator, IServerQueryFactory sqf, IRequestScopeLocator scopeLocator) : base(dbContextLocator) { _sqf = sqf; _scopeLocator = scopeLocator; }
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()); }
public ServerQuery(IDatabaseGateway databaseGateway, IServerQueryFactory queryFactory) { Guard.AgainstNull(databaseGateway, nameof(databaseGateway)); Guard.AgainstNull(queryFactory, nameof(queryFactory)); _databaseGateway = databaseGateway; _queryFactory = queryFactory; }
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())); }
public Task <BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection <IPEndPoint> addresses, Action <Server> act, ServerQueryOptions options) => factory.Create(this).GetServerInfo(SteamInfo.AppId, addresses, options, act);
public Task <BatchResult> GetServers(IServerQueryFactory factory, CancellationToken cancelToken, Action <List <IPEndPoint> > act) => factory.Create(this).GetServerAddresses(SteamInfo.AppId, act, cancelToken);
public GetServerAddressesHandler(IDbContextLocator dbContextLocator, IServerQueryFactory sqf, IRequestScopeLocator scopeLoc) : base(dbContextLocator) { _sqf = sqf; _scopeLoc = scopeLoc; }
public Task <BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection <IPEndPoint> addresses, Action <Server> act, ServerQueryOptions options) => GetFromGameServerQuery(addresses, options, act);
public Task<BatchResult> GetServerInfos(IServerQueryFactory factory, IReadOnlyCollection<IPEndPoint> addresses, Action<Server> act, ServerQueryOptions options) => GetFromGameServerQuery(addresses, options, act);