/// <summary> /// Sends parcel notification /// </summary> /// <param name="parcel">The parcel</param> private void SendNotification(Parcel parcel) { var notification = new ParcelNotification { Host = this.host, Port = this.port, Uid = parcel.Uid, PayloadTypeName = parcel.Payload.GetType().AssemblyQualifiedName }; object envelope = null; foreach (var notificationEnveloper in this.envelopers) { envelope = notificationEnveloper.Envelope(parcel, notification); if (envelope != null) { break; } } parcel.Recipient.Tell(envelope ?? notification, this.Sender); }
/// <summary> /// Handles the <see cref="Parcel"/> message /// </summary> /// <param name="parcel">The parcel</param> private void OnSetLargeObjectMessage(Parcel parcel) { parcel.Sender = this.Sender; Parcels[parcel.Uid] = parcel; this.SendNotification(parcel); }