public async Task <IDictionary <string, object> > Do(
            IDictionary <string, object> stepParameters,
            IDictionary <string, object> pluginParameters)
        {
            try
            {
                Log.Information($"Create connections...");
                if (SignalRUtils.isUsingInternalApp(stepParameters))
                {
                    // Setup the internal app server for simple local perf test
                    await SignalRUtils.StartInternalAppServer(stepParameters, pluginParameters);

                    // rewrite the url
                    stepParameters[SignalRConstants.HubUrls] = SignalRConstants.LocalhostUrl;
                }

                SignalRUtils.AgentCreateConnection(stepParameters, pluginParameters, ClientType.AspNetCore);
                return(null);
            }
            catch (Exception ex)
            {
                var message = $"Fail to create connections: {ex}";
                Log.Error(message);
                throw;
            }
        }
 public Task <IDictionary <string, object> > Do(
     IDictionary <string, object> stepParameters,
     IDictionary <string, object> pluginParameters)
 {
     try
     {
         Log.Information($"Create connections...");
         SignalRUtils.AgentCreateConnection(stepParameters, pluginParameters, ClientType.AspNet);
         return(Task.FromResult <IDictionary <string, object> >(null));
     }
     catch (Exception ex)
     {
         var message = $"Fail to create connections: {ex}";
         Log.Error(message);
         throw;
     }
 }
Esempio n. 3
0
        public async Task <IDictionary <string, object> > Do(
            IDictionary <string, object> stepParameters,
            IDictionary <string, object> pluginParameters)
        {
            try
            {
                Log.Information($"Create connections...");
                await SignalRUtils.StartNegotiationServer(stepParameters, pluginParameters);

                SignalRUtils.AgentCreateConnection(stepParameters, pluginParameters, ClientType.DirectConnect);
                SignalRUtils.CreateHttpClientManagerAndSaveToContext(stepParameters, pluginParameters);
                return(null);
            }
            catch (Exception ex)
            {
                var message = $"Fail to create connections: {ex}";
                Log.Error(message);
                throw;
            }
        }