private void GetParsingSessionId(IHubProxyProvider logFileParserHubProxyProvider) { var loggedRemoteUserUsername = this.GetLoggedRemoteUserUsername(); logFileParserHubProxyProvider.Invoke("GetParsingSessionId", loggedRemoteUserUsername).Wait(); Thread.Sleep(500); }
protected void VerifyGetParsingSessionId(IHubProxyProvider logFileParserHubProxyProvider) { while (string.IsNullOrEmpty(this.parsingSessionId)) { this.GetParsingSessionId(this.logFileParserHubProxyProvider); } }
public SignalRCommandUtilizationStrategy(ICommandUtilizationUpdateStrategy commandUtilizationUpdateStrategy, ISignalRHubConnectionService signalRHubConnectionService, ICommandJsonConvertProvider commandJsonConvertProvider, IRemoteUserProvider remoteUserProvider) { Guard.WhenArgument(signalRHubConnectionService, nameof(ISignalRHubConnectionService)).IsNull().Throw(); Guard.WhenArgument(commandUtilizationUpdateStrategy, nameof(ICommandUtilizationUpdateStrategy)).IsNull().Throw(); Guard.WhenArgument(commandJsonConvertProvider, nameof(IJsonConvertProvider)).IsNull().Throw(); Guard.WhenArgument(remoteUserProvider, nameof(IRemoteUserProvider)).IsNull().Throw(); this.commandUtilizationUpdateStrategy = commandUtilizationUpdateStrategy; this.commandJsonConvertProvider = commandJsonConvertProvider; this.remoteUserProvider = remoteUserProvider; this.logFileParserHubProxyProvider = signalRHubConnectionService.GetHubProxyProvider(SignalRCommandUtilizationStrategy.HubName); this.InitializeLogFileParserHubProxy(this.logFileParserHubProxyProvider); this.GetParsingSessionId(this.logFileParserHubProxyProvider); }
private void InitializeLogFileParserHubProxy(IHubProxyProvider logFileParserHubProxyProvider) { logFileParserHubProxyProvider.On <string>("UpdateStatus", (update) => this.commandUtilizationUpdateStrategy.DisplayUpdate(update)); logFileParserHubProxyProvider.On <string>("UpdateParsingSessionId", this.OnUpdateParsingSessionId); }