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) { } }); } }
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()); } }); }
public void Send(OutgoingPackage package) { _productCacheSending.AddTail(package); this.CheckOutgoingCacheThreshold(); }