Microsoft.AspNet.SignalR.Hubs.HubMethodDispatcher.Execute C# (CSharp) Method

Execute() public method

public Execute ( IHub hub, object parameters ) : object
hub IHub
parameters object
return object
        public object Execute(IHub hub, object[] parameters)
        {
            return _executor(hub, parameters);
        }

Usage Example

        public void ExecuteWithStaticHubMethod()
        {
            // Arrange
            DispatcherHub hub = new DispatcherHub();
            object[] parameters = new object[0];
            MethodInfo methodInfo = typeof(DispatcherHub).GetMethod("StaticHubMethod");
            HubMethodDispatcher dispatcher = new HubMethodDispatcher(methodInfo);

            // Act
            object returnValue = dispatcher.Execute(hub, parameters);

            // Assert
            var intResult = Assert.IsType<int>(returnValue);
            Assert.Equal(89, intResult);
        }
All Usage Examples Of Microsoft.AspNet.SignalR.Hubs.HubMethodDispatcher::Execute