IConductor.cs 1.3 KB

123456789101112131415161718192021222324252627282930313233
  1. namespace Caliburn.Micro.Core {
  2. using System;
  3. /// <summary>
  4. /// Denotes an instance which conducts other objects by managing an ActiveItem and maintaining a strict lifecycle.
  5. /// </summary>
  6. /// <remarks>Conducted instances can optin to the lifecycle by impelenting any of the follosing <see cref="IActivate"/>, <see cref="IDeactivate"/>, <see cref="IGuardClose"/>.</remarks>
  7. public interface IConductor : IParent, INotifyPropertyChangedEx {
  8. /// <summary>
  9. /// Activates the specified item.
  10. /// </summary>
  11. /// <param name="item">The item to activate.</param>
  12. void ActivateItem(object item);
  13. /// <summary>
  14. /// Deactivates the specified item.
  15. /// </summary>
  16. /// <param name="item">The item to close.</param>
  17. /// <param name="close">Indicates whether or not to close the item after deactivating it.</param>
  18. void DeactivateItem(object item, bool close);
  19. /// <summary>
  20. /// Occurs when an activation request is processed.
  21. /// </summary>
  22. event EventHandler<ActivationProcessedEventArgs> ActivationProcessed;
  23. }
  24. /// <summary>
  25. /// An <see cref="IConductor"/> that also implements <see cref="IHaveActiveItem"/>.
  26. /// </summary>
  27. public interface IConductActiveItem : IConductor, IHaveActiveItem { }
  28. }