protected override async Task <HttpResponseMessage> SendAsync( HttpRequestMessage request, CancellationToken cancellationToken) { InputRequests.Add(request); NumberOfCalls++; return(new HttpResponseMessage { StatusCode = statusCode, Content = new StringContent(response) }); }
// returns if the player is handling the input request public bool ContainsInputRequest(InputRequest i) { return(InputRequests.Contains(i)); }
// called after the input request is dealt with // most just clean up/memory management public void FinishInputRequest(InputRequest i) { InputRequests.Remove(i); }
// INPUT REQUEST MANAGEMENT // adds in an Input Request for it to deal with // NOTE: THIS IS NECESSARY FOR EVERY INPUT REQUEST // And input request not added to a player will not get handled public void AssignInputRequest(InputRequest i) { InputRequests.Add(i); }