/// <summary> /// Class constructor. /// </summary> /// <param name="localActorName">Local Actor Name.</param> /// <param name="remoteActorName">Remote Actor Name.</param> /// <param name="message">Message.</param> public MessageAvailableEventArgs(ActorName localActorName, ActorName remoteActorName, BaseMessage message) { _localActorName = localActorName; _remoteActorName = remoteActorName; _message = message; }
/// <summary> /// Publish the Message Available Event. /// </summary> /// <param name="localActorName">Local Actor Name.</param> /// <param name="remoteActorName">Remote Actor Name.</param> /// <param name="message">Message.</param> /// <param name="direction">Message direction.></param> public void PublishMessageAvailableEvent(ActorName localActorName, ActorName remoteActorName, Message message, MessageDirectionEnum direction) { BaseMessage baseMessage = new BaseMessage(message, direction); MessageAvailableEventArgs messageAvailableEvent = new MessageAvailableEventArgs(localActorName, remoteActorName, baseMessage); if (OnMessageAvailable != null) { OnMessageAvailable(this, messageAvailableEvent); } }