예제 #1
0
        public AuditRecord Add(string action, string itemId, Dino.Reddit.Data.OneItemData post)
        {
            var r = new AuditRecord(action, itemId, post);

            this.Records.Add(r);
            return(r);
        }
예제 #2
0
        private string DesiredUrl(AuditRecord rec, int flavor)
        {
            if ((flavor == 1) && !String.IsNullOrEmpty(rec.Url))
            {
                return rec.Url;
            }

            if (flavor == 2)
                return Dino.Reddit.Client.GetAuthorUrl(rec.Author);

            if (flavor == 3)
                return Dino.Reddit.Client.GetItemUrl(rec.ItemId, rec.PostId, rec.Reddit);

            return null;
        }
예제 #3
0
        private string DesiredUrl(AuditRecord rec, int flavor)
        {
            if ((flavor == 1) && !String.IsNullOrEmpty(rec.Url))
            {
                return(rec.Url);
            }

            if (flavor == 2)
            {
                return(Dino.Reddit.Client.GetAuthorUrl(rec.Author));
            }

            if (flavor == 3)
            {
                return(Dino.Reddit.Client.GetItemUrl(rec.ItemId, rec.PostId, rec.Reddit));
            }

            return(null);
        }
예제 #4
0
 public AuditRecord Add(string action, string itemId, Dino.Reddit.Data.OneItemData post)
 {
     var r = new AuditRecord(action, itemId, post);
     this.Records.Add(r);
     return r;
 }