Example #1
0
        private void GetParsingSessionId(IHubProxyProvider logFileParserHubProxyProvider)
        {
            var loggedRemoteUserUsername = this.GetLoggedRemoteUserUsername();

            logFileParserHubProxyProvider.Invoke("GetParsingSessionId", loggedRemoteUserUsername).Wait();
            Thread.Sleep(500);
        }
Example #2
0
 protected void VerifyGetParsingSessionId(IHubProxyProvider logFileParserHubProxyProvider)
 {
     while (string.IsNullOrEmpty(this.parsingSessionId))
     {
         this.GetParsingSessionId(this.logFileParserHubProxyProvider);
     }
 }
Example #3
0
        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);
        }
Example #4
0
 private void InitializeLogFileParserHubProxy(IHubProxyProvider logFileParserHubProxyProvider)
 {
     logFileParserHubProxyProvider.On <string>("UpdateStatus", (update) => this.commandUtilizationUpdateStrategy.DisplayUpdate(update));
     logFileParserHubProxyProvider.On <string>("UpdateParsingSessionId", this.OnUpdateParsingSessionId);
 }