public void ShutdownWindowsAsync(IClientData client, Action <ResponseBase, Exception> callback) { SignatureRequest innerRequest = new SignatureRequest { LoginName = SingleUser.LoginName }; innerRequest.SignIt(SingleUser.GetRemotePassword(client.ClientId)); WrapperRequest <SignatureRequest> request = new WrapperRequest <SignatureRequest> { ObjectId = client.GetId(), ClientId = client.ClientId, LoginName = SingleUser.LoginName, InnerRequest = innerRequest, ClientIp = client.MinerIp }; request.SignIt(SingleUser.PasswordSha1); PostAsync(SControllerName, nameof(IWrapperMinerClientController.ShutdownWindows), null, request, callback); }
// ReSharper disable once InconsistentNaming public void UpgradeNTMinerAsync(IClientData client, string ntminerFileName, Action <ResponseBase, Exception> callback) { UpgradeNTMinerRequest innerRequest = new UpgradeNTMinerRequest { LoginName = SingleUser.LoginName, NTMinerFileName = ntminerFileName }; innerRequest.SignIt(SingleUser.GetRemotePassword(client.ClientId)); WrapperRequest <UpgradeNTMinerRequest> request = new WrapperRequest <UpgradeNTMinerRequest> { ObjectId = client.GetId(), ClientId = client.ClientId, LoginName = SingleUser.LoginName, InnerRequest = innerRequest, ClientIp = client.MinerIp }; request.SignIt(SingleUser.PasswordSha1); PostAsync(SControllerName, nameof(IWrapperMinerClientController.UpgradeNTMiner), null, request, callback); }
public void SetClientMinerProfilePropertyAsync(IClientData client, string propertyName, object value, Action <ResponseBase, Exception> callback) { SetClientMinerProfilePropertyRequest innerRequest = new SetClientMinerProfilePropertyRequest { LoginName = SingleUser.LoginName, PropertyName = propertyName, Value = value }; innerRequest.SignIt(SingleUser.GetRemotePassword(client.ClientId)); WrapperRequest <SetClientMinerProfilePropertyRequest> request = new WrapperRequest <SetClientMinerProfilePropertyRequest> { ObjectId = client.GetId(), ClientId = client.ClientId, LoginName = SingleUser.LoginName, ClientIp = client.MinerIp, InnerRequest = innerRequest }; request.SignIt(SingleUser.PasswordSha1); PostAsync(SControllerName, nameof(IWrapperMinerClientController.SetClientMinerProfileProperty), null, request, callback); }