Пример #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)
                    {
                    }
                });
            }
        }
Пример #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());
                }
            });
        }
Пример #3
0
        public void Send(OutgoingPackage package)
        {
            _productCacheSending.AddTail(package);

            this.CheckOutgoingCacheThreshold();
        }