示例#1
0
 public WoopsaClient(string url, WoopsaContainer container,
     int notificationQueueSize = DefaultNotificationQueueSize)
 {
     Uri uri = new Uri(url);
     AuthorityUrl = uri.GetLeftPart(UriPartial.Authority);
     ClientProtocol = new WoopsaClientProtocol(url);
     _container = container;
     WoopsaUnboundClientObject unboundRoot = CreateUnboundRoot("");
     SubscriptionChannel = new WoopsaClientSubscriptionChannel(this,
         unboundRoot, notificationQueueSize);
     _remoteMethodMultiRequest = unboundRoot.GetMethod(
         WoopsaMultiRequestConst.WoopsaMultiRequestMethodName,
         WoopsaValueType.JsonData,
         new WoopsaMethodArgumentInfo[]
         {
             new WoopsaMethodArgumentInfo(WoopsaMultiRequestConst.WoopsaMultiRequestArgumentName, WoopsaValueType.JsonData)
         });
 }
示例#2
0
        public WoopsaClient(string url, WoopsaContainer container,
                            int notificationQueueSize = DefaultNotificationQueueSize)
        {
            Uri uri = new Uri(url);

            AuthorityUrl   = uri.GetLeftPart(UriPartial.Authority);
            ClientProtocol = new WoopsaClientProtocol(url);
            _container     = container;
            WoopsaUnboundClientObject unboundRoot = CreateUnboundRoot("");

            SubscriptionChannel = new WoopsaClientSubscriptionChannel(this,
                                                                      unboundRoot, notificationQueueSize);
            _remoteMethodMultiRequest = unboundRoot.GetMethod(
                WoopsaMultiRequestConst.WoopsaMultiRequestMethodName,
                WoopsaValueType.JsonData,
                new WoopsaMethodArgumentInfo[]
            {
                new WoopsaMethodArgumentInfo(WoopsaMultiRequestConst.WoopsaMultiRequestArgumentName, WoopsaValueType.JsonData)
            });
        }