public void UpdateClientsAsync(string propertyName, Dictionary<string, object> values, Action<ResponseBase, Exception> callback) { UpdateClientsRequest request = new UpdateClientsRequest { PropertyName = propertyName, Values = values }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.UpdateClients), data: request, callback); }
public void GetLatestSnapshotsAsync(int limit, Action <GetCoinSnapshotsResponse, Exception> callback) { GetCoinSnapshotsRequest request = new GetCoinSnapshotsRequest { Limit = limit }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(ICoinSnapshotController.LatestSnapshots), data: request, callback); }
public void RemoveClientsAsync(List <string> objectIds, Action <ResponseBase, Exception> callback) { var request = new MinerIdsRequest { ObjectIds = objectIds }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.RemoveClients), data: request, callback); }
public void RemoveMineWorkAsync(Guid id, Action <ResponseBase, Exception> callback) { DataRequest <Guid> request = new DataRequest <Guid> { Data = id }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.RemoveMineWork), data: request, callback); }
public void UpdateClientAsync(string objectId, string propertyName, object value, Action<ResponseBase, Exception> callback) { UpdateClientRequest request = new UpdateClientRequest { ObjectId = objectId, PropertyName = propertyName, Value = value }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.UpdateClient), data: request, callback); }
public void AddOrUpdateOverClockDataAsync(OverClockData entity, Action <ResponseBase, Exception> callback) { DataRequest <OverClockData> request = new DataRequest <OverClockData>() { Data = entity }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IOverClockDataController.AddOrUpdateOverClockData), data: request, callback); }
public void MarkDeleteServerMessageAsync(Guid id, Action <ResponseBase, Exception> callback) { DataRequest <Guid> request = new DataRequest <Guid>() { Data = id }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IServerMessageController.MarkDeleteServerMessage), data: request, callback); }
public void RemoveKernelOutputKeyword(Guid id, Action <ResponseBase, Exception> callback) { DataRequest <Guid> request = new DataRequest <Guid>() { Data = id }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.RemoveKernelOutputKeyword), data: request, callback); }
public void AddOrUpdateKernelOutputKeywordAsync(KernelOutputKeywordData entity, Action <ResponseBase, Exception> callback) { DataRequest <KernelOutputKeywordData> request = new DataRequest <KernelOutputKeywordData>() { Data = entity }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IKernelOutputKeywordController.AddOrUpdateKernelOutputKeyword), data: request, callback); }
public void AddOrUpdateMinerGroupAsync(MinerGroupData entity, Action <ResponseBase, Exception> callback) { entity.ModifiedOn = DateTime.Now; DataRequest <MinerGroupData> request = new DataRequest <MinerGroupData> { Data = entity }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMinerGroupController.AddOrUpdateMinerGroup), data: request, callback); }
public void GetLocalJsonAsync(Guid workId, Action <DataResponse <string>, Exception> callback) { DataRequest <Guid> request = new DataRequest <Guid>() { Data = workId }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.GetLocalJson), data: request, callback); }
// ReSharper disable once InconsistentNaming public void AddOrUpdateNTMinerFileAsync(NTMinerFileData entity, Action <ResponseBase, Exception> callback) { DataRequest <NTMinerFileData> request = new DataRequest <NTMinerFileData>() { Data = entity }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IFileUrlController.AddOrUpdateNTMinerFile), data: request, callback); }
public void SetAppSettingAsync(AppSettingData entity, Action <ResponseBase, Exception> callback) { DataRequest <AppSettingData> request = new DataRequest <AppSettingData>() { Data = entity }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IAppSettingController.SetAppSetting), data: request, callback); }
public void GetWorkJsonAsync(Guid workId, Guid clientId, Action <GetWorkJsonResponse, Exception> callback) { GetWorkJsonRequest request = new GetWorkJsonRequest() { WorkId = workId, ClientId = clientId }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.GetWorkJson), data: request, callback); }
public void ExportMineWorkAsync(Guid workId, string localJson, string serverJson, Action <ResponseBase, Exception> callback) { ExportMineWorkRequest request = new ExportMineWorkRequest { MineWorkId = workId, LocalJson = localJson, ServerJson = serverJson }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.ExportMineWork), data: request, callback); }
public void SaveCalcConfigsAsync(List <CalcConfigData> configs, Action <ResponseBase, Exception> callback) { if (configs == null || configs.Count == 0) { return; } SaveCalcConfigsRequest request = new SaveCalcConfigsRequest { Data = configs }; JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(ICalcConfigController.SaveCalcConfigs), data: request, callback); }
public void QueryUsersAsync(QueryUsersRequest request, Action <QueryUsersResponse, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.QueryUsers), data: request, callback: (QueryUsersResponse response, Exception e) => { if (response != null && response.Data != null && response.Data.Count != 0) { foreach (var user in response.Data) { user.Password = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.Password), RpcRoot.RpcUser.Password); user.PrivateKey = Cryptography.QuickUtil.TextDecrypt(Convert.FromBase64String(user.PrivateKey), RpcRoot.RpcUser.Password); } } callback?.Invoke(response, e); }, timeountMilliseconds: 5000); }
public void GetMineWorksAsync(Action <DataResponse <List <UserMineWorkData> >, Exception> callback) { object request = new object(); JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMineWorkController.MineWorks), data: request, callback, timeountMilliseconds: 5000); }
public void GetMinerGroupsAsync(Action <DataResponse <List <UserMinerGroupData> >, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserMinerGroupController.MinerGroups), data: new object(), callback, timeountMilliseconds: 5000); }
public void ChangePasswordAsync(ChangePasswordRequest request, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.ChangePassword), request, callback); }
public void UpdateUserAsync(UserUpdateData data, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.UpdateUser), data, callback); }
public void RemoveAdminRoleAsync(string loginName, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IUserController.RemoveAdminRole), new DataRequest <string> { Data = loginName }, callback); }
public void RemoveNodeAsync(string address, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.RemoveNode), new DataRequest <string> { Data = address }, callback); }
public void ReportNodeStateAsync(WsServerNodeState nodeState, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.ReportNodeState), nodeState, callback, timeountMilliseconds: 3000); }
public void GetNodeAddressesAsync(Action <DataResponse <string[]>, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWsServerNodeController.NodeAddresses), new object(), callback); }
public void GetServerStateAsync(Action <DataResponse <WebApiServerState>, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IWebApiServerNodeController.GetServerState), new object(), callback); }
public void GetGpuNamesAsync(Action <DataResponse <List <GpuName> >, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IGpuNameController.GpuNames), new object(), callback, timeountMilliseconds: 5 * 1000); }
public void RemoveGpuNameAsync(GpuName gpuName, Action <ResponseBase, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IGpuNameController.RemoveGpuName), new DataRequest <GpuName> { Data = gpuName }, callback, timeountMilliseconds: 5 * 1000); }
// 去调ClientDataBinaryService的方法了所以这个没人调了 public void QueryClientsAsync(QueryClientsRequest query, Action<QueryClientsResponse, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IClientDataController.QueryClients), data: query, callback); }
public void QueryGpuNameCountsAsync(QueryGpuNameCountsRequest request, Action <QueryGpuNameCountsResponse, Exception> callback) { JsonRpcRoot.SignPostAsync(RpcRoot.OfficialServerHost, RpcRoot.OfficialServerPort, _controllerName, nameof(IGpuNameController.QueryGpuNameCounts), request, callback, timeountMilliseconds: 5 * 1000); }