using System;
using System.Collections.Generic;
using System.Text;
namespace InABox.Core
{
public enum PostedStatus
{
NeverPosted,
PostFailed,
RequiresRepost,
Posted
}
///
/// Flags an as "Postable"; that is, it can be processed by an .
///
public interface IPostable : IPostableFragment
{
///
/// At what time this was processed. Set to if not processed yet.
/// When the is processed, this should be updated, so that we don't process things twice.
///
DateTime Posted { get; set; }
PostedStatus PostedStatus { get; set; }
string PostedNote { get; set; }
public void Post()
{
Posted = DateTime.Now;
PostedStatus = PostedStatus.Posted;
PostedNote = "";
}
public void FailPost(string note)
{
Posted = DateTime.Now;
PostedStatus = PostedStatus.PostFailed;
PostedNote = note;
}
}
}