IPostable.cs 789 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace InABox.Core
  5. {
  6. public enum PostedStatus
  7. {
  8. NeverPosted,
  9. PostFailed,
  10. Posted
  11. }
  12. /// <summary>
  13. /// Flags an <see cref="Entity"/> as "Postable"; that is, it can be processed by an <see cref="IPoster{TEntity,TSettings}"/>.
  14. /// </summary>
  15. public interface IPostable
  16. {
  17. /// <summary>
  18. /// At what time this <see cref="IPostable"/> was processed. Set to <see cref="DateTime.MinValue"/> if not processed yet.
  19. /// When the <see cref="IPostable"/> is processed, this should be updated, so that we don't process things twice.
  20. /// </summary>
  21. DateTime Posted { get; set; }
  22. PostedStatus PostedStatus { get; set; }
  23. }
  24. }