コード例 #1
0
ファイル: SignalRTarget.cs プロジェクト: Hdesai/NLogToSignalR
        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);
        }
コード例 #2
0
        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);
        }