Esempio n. 1
0
        private void NotityfyOutgoingUserDataEvent(OutgoingPackage package)
        {
            if (this.UserDataOutgoing != null)
            {
                var args = new UserDataOutgoingEventArgs(package);

                this.UserDataOutgoing.GetInvocationList().ToList().ForEach(handler =>
                {
                    try
                    {
                        handler.DynamicInvoke(null, args);
                    }
                    catch (System.Exception)
                    {
                    }
                });
            }
        }
Esempio n. 2
0
        private void SendOutgoingPackage(OutgoingPackage package)
        {
            package.DestID.ToList().ForEach(remoteID =>
            {
                try
                {
                    var saiID = this.BuildSaiConnectionID(_rsspConfig.LocalID, remoteID);

                    var theSaiConnection = this.GetSaiConnection(saiID);

                    if (theSaiConnection != null && theSaiConnection.Connected)
                    {
                        theSaiConnection.SendUserData(package);
                    }
                }
                catch (System.Exception ex)
                {
                    LogUtility.Error(ex.ToString());
                }
            });
        }
Esempio n. 3
0
        public void Send(OutgoingPackage package)
        {
            _productCacheSending.AddTail(package);

            this.CheckOutgoingCacheThreshold();
        }