public static async Task <ServersResponseCollection> GetMcp2DeployedServers( this IComputeApiClient client, ServerListOptions options = null, PageableRequest pagingOptions = null) { return(await client.ServerManagement.Server.GetMcp2DeployedServers(options, pagingOptions)); }
public async Task <ServersResponseCollection> GetMcp2DeployedServers(ServerListOptions filteringOptions = null, IPageableRequest pagingOptions = null) { ServersResponseCollection servers = await _apiClient.GetAsync <ServersResponseCollection>( ApiUris.GetMcp2Servers(_apiClient.OrganizationId), pagingOptions, filteringOptions); return(servers); }
public ServerlistService(ILogger <ServerlistService> logger, ISessionManager sessionManager, ISchedulerService scheduler, IMessageBus messageBus, IOptions <NetworkOptions> networkOptions, IOptions <ServerListOptions> serverOptions) { _logger = logger; _sessionManager = sessionManager; _scheduler = scheduler; _messageBus = messageBus; _networkOptions = networkOptions.Value; _serverOptions = serverOptions.Value; }
/// <summary> /// The get deployed servers. /// </summary> /// <param name="filteringOptions"> /// The filtering options. /// </param> /// <param name="pagingOptions"> /// The paging options. /// </param> /// <returns> /// The <see cref="Task"/>. /// </returns> public async Task <IEnumerable <ServerWithBackupType> > GetDeployedServers( ServerListOptions filteringOptions = null, IPageableRequest pagingOptions = null) { ServersWithBackup servers = await _apiClient.GetAsync <ServersWithBackup>( ApiUris.DeployedServers(_apiClient.OrganizationId), pagingOptions, filteringOptions); return(servers.server); }
private static ConsoleCommandStatusCode ListServers(ILifetimeScope scope, ServerListOptions opts) => ExecuteConsoleCommand(() => { if (!opts.Local) { var onlineServerList = scope.Resolve <IRemoteServerProvider>().GetServersAsync().Result; scope.Resolve <IServerRepository>().StoreServersAsync(onlineServerList).Wait(); } scope.Resolve <IServerDisplayer>().DisplayServers(); });
public void AppendToUriWithoutExistingQuery() { var uri = new Uri("/resource", UriKind.Relative); var options = new ServerListOptions { Name = "Test", CreateTimeAfter = new DateTime(2010, 10, 10, 10, 10, 10, DateTimeKind.Utc) }; var result = FilterableRequestExtensions.AppendToUri(options, uri); Assert.AreEqual("/resource?name=Test&createTime.GT=" + HttpUtility.UrlEncode("2010-10-10T10:10:10Z"), result.ToString()); }
public void AppendToUriWithExistingQuery() { var uri = new Uri("/resource?id=12", UriKind.Relative); var options = new ServerListOptions { DatacenterId = "XY12", Name = "Test" }; var result = FilterableRequestExtensions.AppendToUri(options, uri); Assert.AreEqual("/resource?id=12&datacenterId=XY12&name=Test", result.ToString()); }
public IpcService(IMessageBus messageBus, PlayerManager playerManager, ChannelService channelService, IOptions <ServerListOptions> serverListOptions) { _messageBus = messageBus; _playerManager = playerManager; _channelService = channelService; _serverListOptions = serverListOptions.Value; _cts = new CancellationTokenSource(); _channelService.PlayerJoined += ChannelOnPlayerJoined; _channelService.PlayerLeft += ChannelOnPlayerLeft; _playerManager.PlayerDisconnected += OnPlayerDisconnected; }
/// <summary>The get mcp 2 deployed servers.</summary> /// <param name="filteringOptions">The filtering options.</param> /// <param name="pagingOptions">The paging options.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task <PagedResponse <ServerSummaryType> > ListServersPaginated(ServerListOptions filteringOptions = null, IPageableRequest pagingOptions = null) { var response = await _apiClient.GetAsync <ServersSummaryResposeType>( ApiUris.ListServers(_apiClient.OrganizationId), pagingOptions, filteringOptions); return(new PagedResponse <ServerSummaryType> { items = response.server, totalCount = response.totalCountSpecified ? response.totalCount : (int?)null, pageCount = response.pageCountSpecified ? response.pageCount : (int?)null, pageNumber = response.pageNumberSpecified ? response.pageNumber : (int?)null, pageSize = response.pageSizeSpecified ? response.pageSize : (int?)null }); }
public void AppendToUriWithArray() { var uri = new Uri("/resource", UriKind.Relative); var options = new ServerListOptions { Filters = { new Filter { Field = ServerListOptions.IdField, Value = new Guid("00000000-0000-0000-0000-000000000001") }, new Filter { Field = ServerListOptions.IdField, Value = new Guid("00000000-0000-0000-0000-000000000002") } } }; var result = FilterableRequestExtensions.AppendToUri(options, uri); Assert.AreEqual("/resource?id=00000000-0000-0000-0000-000000000001&id=00000000-0000-0000-0000-000000000002", result.ToString()); }
/// <summary>The get mcp 2 deployed servers.</summary> /// <param name="filteringOptions">The filtering options.</param> /// <returns>The <see cref="Task"/>.</returns> public async Task <IEnumerable <ServerSummaryType> > ListServers(ServerListOptions filteringOptions = null) { var response = await ListServersPaginated(filteringOptions, null); return(response.items); }
/// <inheritdoc cref="ComputeService.ListServersAsync" /> public static IPage <Server> ListServers(this ComputeService service, ServerListOptions options = null) { return(service.ListServersAsync(options).ForceSynchronous()); }
/// <inheritdoc cref="v2_1.Serialization.ComputeApi.ListServerSummariesAsync{TPage}" /> public virtual async Task <IPage <ServerReference> > ListServerReferencesAsync(ServerListOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { return(await _computeApi.ListServerSummariesAsync <ServerCollection>(options, cancellationToken)); }
/// <summary /> public virtual async Task<IPage<ServerReference>> ListServerReferencesAsync(ServerListOptions options = null, CancellationToken cancellationToken = default(CancellationToken)) { return await _computeApi.ListServerSummariesAsync<ServerCollection>(options, cancellationToken); }
/// <inheritdoc cref="ComputeService.ListServersAsync" /> public static IPage<Server> ListServers(this ComputeService service, ServerListOptions options = null) { return service.ListServersAsync(options).ForceSynchronous(); }