예제 #1
0
        public async static Task AddNewIssueAsync(IssueData issueData)
        {
            await Task.Delay(300).ConfigureAwait(false);

            AllIssues.Value.Insert(0, issueData);
            issueData.Id = AllIssues.Value.Max(x => x.Id) + 1;
        }
예제 #2
0
        public async static Task UpdateRowAsync(IssueData row)
        {
            if (row == null)
            {
                return;
            }
            IssueData data = AllIssues.Value.FirstOrDefault(x => x.Id == row.Id);

            if (data == null)
            {
                return;
            }
            data.Priority = row.Priority;
            data.Subject  = row.Subject;
            data.Votes    = row.Votes;
            data.Created  = row.Created;
            data.User     = row.User;
            await Task.Delay(500).ConfigureAwait(false);
        }
예제 #3
0
        public async static Task DeleteIssueAsync(IssueData issueData)
        {
            await Task.Delay(300).ConfigureAwait(false);

            AllIssues.Value.Remove(AllIssues.Value.Find(x => x.Id == issueData.Id));
        }