private void CallViaHub() { if (string.IsNullOrEmpty(GroupName) || string.IsNullOrEmpty(MethodToCall) || string.IsNullOrEmpty(HubName)) { throw new ArgumentException( "GroupName,MethodToCall & HubName are mandatory when CallViaPersistentConnection is set to false"); } var hubconnection = new HubConnectionProxy(Uri); PublishToSignalR = new PublishToHub(hubconnection, GroupName, MethodToCall, HubName); }