protected override async Task <Result> InitializeInternal() { this.user = await this.GetUser(); if (this.user != null) { this.apiKey = await this.GetAPIKey(); if (!string.IsNullOrEmpty(this.apiKey)) { this.socketAddress = await this.GetSocketAddress(); if (!string.IsNullOrEmpty(this.socketAddress)) { if (await this.ConnectSocket()) { this.TrackServiceTelemetry("TipeeeStream"); return(new Result()); } return(new Result(Resources.TipeeeStreamSocketFailed)); } return(new Result(Resources.TipeeeStreamSocketUrlFailed)); } return(new Result(Resources.TipeeStreamSocketKeyFailed)); } return(new Result(Resources.TipeeeStreamUserDataFailed)); }
protected override async Task <Result> InitializeInternal() { this.user = await this.GetUser(); if (this.user != null) { this.apiKey = await this.GetAPIKey(); if (!string.IsNullOrEmpty(this.apiKey)) { this.socketAddress = await this.GetSocketAddress(); if (!string.IsNullOrEmpty(this.socketAddress)) { if (await this.ConnectSocket()) { this.TrackServiceTelemetry("TipeeeStream"); return(new Result()); } return(new Result("Failed to connect to socket")); } return(new Result("Unable to get Socket URL address")); } return(new Result("Unable to get Socket API key")); } return(new Result("Unable to get User information")); }