Exemple #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);
        }
        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;
        }
Exemple #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);
        }
Exemple #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;
 }