예제 #1
0
        public void AddEntryEditedEntry(Tag entry, EntryEditEvent editEvent, ArchivedTagVersion archivedVersion)
        {
            var user          = _ctx.OfType <User>().GetLoggedUser(_permissionContext);
            var activityEntry = new TagActivityEntry(entry, editEvent, user, archivedVersion);

            AddActivityfeedEntry(activityEntry);
        }
예제 #2
0
        public async Task <Tag> CreateTagAsync(string englishName)
        {
            var tag = new Tag(new LocalizedString(englishName, ContentLanguageSelection.English));
            await _ctx.SaveAsync(tag);

            var archived = ArchivedTagVersion.Create(tag, new TagDiff(), _loginData, EntryEditEvent.Created, string.Empty);
            await _ctx.SaveAsync(archived);

            var activityEntry = new TagActivityEntry(tag, EntryEditEvent.Created, _loginData.User, archived);

            await new ActivityEntryQueries(_ctx.OfType <ActivityEntry>(), null).AddActivityfeedEntryAsync(activityEntry);

            return(tag);
        }