public override TransitAccountStoryPicture GetTransitInstance(ManagedSecurityContext sec) { TransitAccountStoryPicture t_instance = base.GetTransitInstance(sec); t_instance.Counter = ManagedStats.FindByUri(Session, "AccountStoryPictureView.aspx", mInstance.Id, sec); t_instance.SetWithinCollection(mInstance, mInstance.AccountStory.AccountStoryPictures); t_instance.CommentCount = ManagedDiscussion.GetDiscussionPostCount( Session, mInstance.AccountStory.Account.Id, typeof(AccountStoryPicture), mInstance.Id); return(t_instance); }
public override TransitAccountPicture GetTransitInstance(ManagedSecurityContext sec) { TransitAccountPicture t_instance = base.GetTransitInstance(sec); List <AccountPicture> collection = new List <AccountPicture>(); foreach (AccountPicture pic in Collection <AccountPicture> .GetSafeCollection(mInstance.Account.AccountPictures)) { if (!pic.Hidden) { collection.Add(pic); } } t_instance.SetWithinCollection(mInstance, collection); t_instance.CommentCount = ManagedDiscussion.GetDiscussionPostCount( Session, mInstance.Account.Id, typeof(AccountPicture), mInstance.Id); t_instance.Counter = ManagedStats.FindByUri(Session, "AccountPicture.aspx", mInstance.Id, sec); return(t_instance); }