private static async Task CreateSessionAsync()
 {
     //TODO: Add validation and failure handling
     var request = new CreateSessionRequest() { ApiKey = AppacitiveContext.ApiKey };
     var response = await request.ExecuteAsync();
     _sessionToken = response.Session.SessionKey;
 }
 private static async Task CreateSessionAsync()
 {
     //TODO: Add validation and failure handling
     var request = new CreateSessionRequest() { ApiKey = AppacitiveContext.ApiKey };
     var service = ObjectFactory.Build<ISessionService>();
     var response = await service.CreateSessionAsync(request);
     _sessionToken = response.Session.SessionKey;
 }
 public async Task<CreateSessionResponse> CreateSessionAsync(CreateSessionRequest request)
 {
     var bytes = await HttpOperation
         .WithUrl(Urls.For.CreateSession(request.DebugEnabled, request.Verbosity))
         .PutAsyc(request.ToBytes());
     var response = CreateSessionResponse.Parse(bytes);
     return response;
 }