using System; using Common.Infrastructure.Commands; namespace Common.Infrastructure.Messaging { /// /// A message indicating to listeners that a modal window needs to be opened. /// public class ModalMessage : NavigationMessage { /// /// Gets the method called after a modal window closes. /// This method is passed the result of the modal window. /// /// The process modal result. public Action> ProcessModalResult { get; private set; } /// /// Initializes a new instance of the class. /// /// The name of the controller. /// The name action the modal window will initially navigate. public ModalMessage(string controller, string action) : this(controller, action, null, null) { } /// /// Initializes a new instance of the class. /// /// The name of the controller. /// The name action the modal window will initially navigate. /// /// Any values that will passed to the request in the form: /// new { parameterName = "value" } /// /// /// Gets the method called after a modal window closes. /// This method is passed the result of the modal window. /// public ModalMessage(string controller, string action, object routeValues, Action> processModalResult) : base(controller, action, routeValues) { ProcessModalResult = processModalResult; } } }