Exemplo n.º 1
0
        /// <summary>
        /// Register remote connection
        /// </summary>
        public IRemoteInfo RegisterRemote(IRemoteInfo remote)
        {
            if (remote == null)
            {
                this.RegisterRemote(new DummyRemote());
            }

            return(Interlocked.Exchange(ref this.remote, remote));
        }
Exemplo n.º 2
0
        /// <summary>
        ///  初始化函数
        /// </summary>
        static RemoteInfoHelper()
        {
            String mqUrl = System.Configuration.ConfigurationManager.AppSettings.Get("MQUrl");

            _ActionDict = new Dictionary <string, List <RemoteInfoReceiver> >();

            if (mqUrl.Substring(0, 4).ToUpper().Equals("NATS"))
            {
                remoteInfo = new RemoteInfoNATS {
                };
            }
            else
            {
                //remoteInfo = new RemoteInfoMQ { };
            }
            if (remoteInfo.Init(mqUrl, CallBack))
            {
                _Connected = true;
            }
        }
Exemplo n.º 3
0
 /// <summary>
 /// Erzeugt eine neue Zugriffsinstanz.
 /// </summary>
 /// <param name="main">Die zugehörige Anwendung.</param>
 protected UDPAdaptor(IViewerSite main)
     : base(main)
 {
     // Alternate interfaces
     RemoteInfo = main as IRemoteInfo;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Erzeugt eine neue Zugriffsinstanz.
 /// </summary>
 /// <param name="main">Die zugehörige Anwendung.</param>
 protected UDPAdaptor( IViewerSite main )
     : base( main )
 {
     // Alternate interfaces
     RemoteInfo = main as IRemoteInfo;
 }