protected override async Task <Result> InitializeInternal() { this.channel = await this.GetCurrentChannel(); if (this.channel != null) { if (await this.ConnectSocket()) { this.TrackServiceTelemetry("StreamElements"); return(new Result()); } return(new Result(Resources.StreamElementsSocketFailed)); } return(new Result(Resources.StreamElementsUserDataFailed)); }
protected override async Task <Result> InitializeInternal() { this.channel = await this.GetCurrentChannel(); if (this.channel != null) { foreach (StreamElementsDonation seDonation in await this.GetDonations()) { donationsReceived[seDonation._id] = seDonation; } MixItUp.Base.Util.AsyncRunner.RunBackgroundTask(this.cancellationTokenSource.Token, 60000, this.BackgroundDonationCheck); this.TrackServiceTelemetry("StreamElements"); return(new Result()); } return(new Result("Failed to get user information")); }
protected override async Task <Result> InitializeInternal() { this.channel = await this.GetCurrentChannel(); if (this.channel != null) { foreach (StreamElementsDonation seDonation in await this.GetDonations()) { donationsReceived[seDonation._id] = seDonation; } #pragma warning disable CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed AsyncRunner.RunAsyncBackground(this.BackgroundDonationCheck, this.cancellationTokenSource.Token, 60000); #pragma warning restore CS4014 // Because this call is not awaited, execution of the current method continues before the call is completed this.TrackServiceTelemetry("StreamElements"); return(new Result()); } return(new Result("Failed to get user information")); }