public async Task <IActionResult> SetServerAddress([FromBody] SetupRequest setupRequest) { string result = await xServer.SetupServer(setupRequest); var setupResult = new SetupResponse() { SignAddress = result }; return(Json(setupResult)); }
public async Task <IActionResult> Setup() { string address = await xServer.SetupServer(); var setupResult = new SetupResponse() { SignAddress = address }; return(Json(setupResult)); }
public void Setup(string loginkey, SetupResponse done) { //Init Lists PendingRequests = new List <DReq>(); this.loginkey = loginkey; //Start Setup SetupResponse r = new SetupResponse(done); StartSetup(r); }
public void Setup(SetupResponse done) { //Init Lists PendingRequests = new List <DReq>(); loginkey = ""; //Start Setup SetupResponse r = new SetupResponse(done); StartSetup(r); }
private void StartSetup(SetupResponse done) { SendAPIRequest(BuildURL("api"), (res) => { isAvailable = !res.IsError; if (isAvailable) { SetupGame(done); } WriteDebug("API is " + (isAvailable ? "available" : "offline")); }); }
/// <inheritdoc/> public void AddMeetingResponseForExternalId(string externalId, SetupResponse meeting) { if (string.IsNullOrEmpty(externalId)) { throw new ArgumentException($"'{nameof(externalId)}' cannot be null or empty.", nameof(externalId)); } if (meeting is null) { throw new ArgumentNullException(nameof(meeting)); } this.responseDictionary.TryAdd(externalId, meeting); }
private void SetupGame(SetupResponse done) { SendAPIRequest(BuildURL("game"), (res) => { if (!res.IsError) { game = new DGame(res.GetMainDatas()); WriteDebug("game latest version: " + game.Version); } else { WriteDebug("couldn't get the game datas"); } done.Invoke(game); }); }