public static async Task SaveAsync() { var file = await FileStorageProvider.GetFileAsync(); var lines = Actions.OrderBy(i => i.Index).Select(i => ActionItemAdapter.ToString(i)); await FileIO.WriteLinesAsync(file, lines); }
public ActionItem(string raw, int index) { this.raw = string.Empty; this.body = string.Empty; this.priority = string.Empty; this.completionDate = DateTime.MaxValue; this.creationDate = DateTime.Today; this.isComplete = false; this.Index = index; this.Contexts = new List <string>(); this.PrimaryContext = string.Empty; this.Projects = new List <string>(); this.PrimaryProject = string.Empty; this.DueDate = DateTime.MaxValue; ActionItemAdapter.Parse(raw, this); }
public void Restring() { this.Raw = ActionItemAdapter.ToString(this); }
public void Reparse() { ActionItemAdapter.Parse(this.Raw, this); }
public static ActionItem Create() { return(new ActionItem(ActionItemAdapter.ToString(DateTime.Today, string.Empty), 0)); }