public void Add(IQuest quest) { if (quest == null) { throw new ArgumentNullException(nameof(quest)); } var questElement = new QuestElement() { ThreadName = quest.ThreadName, DisplayName = quest.DisplayName, PostsPerPage = quest.PostsPerPage, StartPost = quest.StartPost, EndPost = quest.EndPost, CheckForLastThreadmark = quest.CheckForLastThreadmark, PartitionMode = quest.PartitionMode, UseCustomThreadmarkFilters = quest.UseCustomThreadmarkFilters, CustomThreadmarkFilters = quest.CustomThreadmarkFilters, UseCustomUsernameFilters = quest.UseCustomUsernameFilters, CustomUsernameFilters = quest.CustomUsernameFilters, UseCustomPostFilters = quest.UseCustomPostFilters, CustomPostFilters = quest.CustomPostFilters }; BaseAdd(questElement, false); }
public void Add(IQuest quest) { if (quest == null) { throw new ArgumentNullException(nameof(quest)); } var questElement = new QuestElement() { ThreadName = quest.ThreadName, DisplayName = quest.DisplayName, PostsPerPage = quest.PostsPerPage, StartPost = quest.StartPost, EndPost = quest.EndPost, CheckForLastThreadmark = quest.CheckForLastThreadmark, PartitionMode = quest.PartitionMode, UseCustomThreadmarkFilters = quest.UseCustomThreadmarkFilters, CustomThreadmarkFilters = quest.CustomThreadmarkFilters, UseCustomUsernameFilters = quest.UseCustomUsernameFilters, CustomUsernameFilters = quest.CustomUsernameFilters, UseCustomPostFilters = quest.UseCustomPostFilters, CustomPostFilters = quest.CustomPostFilters, WhitespaceAndPunctuationIsSignificant = quest.WhitespaceAndPunctuationIsSignificant, CaseIsSignificant = quest.CaseIsSignificant, ForcePlanReferencesToBeLabeled = quest.ForcePlanReferencesToBeLabeled, ForbidVoteLabelPlanNames = quest.ForbidVoteLabelPlanNames, DisableProxyVotes = quest.DisableProxyVotes, ForcePinnedProxyVotes = quest.ForcePinnedProxyVotes, IgnoreSpoilers = quest.IgnoreSpoilers, TrimExtendedText = quest.TrimExtendedText, UseRSSThreadmarks = quest.UseRSSThreadmarks, }; BaseAdd(questElement, false); }
public void Add(IQuest quest) { if (quest == null) { throw new ArgumentNullException(nameof(quest)); } var questElement = new QuestElement() { ThreadName = quest.ThreadName, DisplayName = quest.DisplayName, PostsPerPage = quest.PostsPerPage, StartPost = quest.StartPost, EndPost = quest.EndPost, CheckForLastThreadmark = quest.CheckForLastThreadmark, PartitionMode = quest.PartitionMode, UseCustomThreadmarkFilters = quest.UseCustomThreadmarkFilters, CustomThreadmarkFilters = quest.CustomThreadmarkFilters, UseCustomUsernameFilters = quest.UseCustomUsernameFilters, CustomUsernameFilters = quest.CustomUsernameFilters, UseCustomPostFilters = quest.UseCustomPostFilters, CustomPostFilters = quest.CustomPostFilters, WhitespaceAndPunctuationIsSignificant = quest.WhitespaceAndPunctuationIsSignificant, CaseIsSignificant = quest.CaseIsSignificant, ForcePlanReferencesToBeLabeled = quest.ForcePlanReferencesToBeLabeled, ForbidVoteLabelPlanNames = quest.ForbidVoteLabelPlanNames, AllowUsersToUpdatePlans = quest.AllowUsersToUpdatePlans, DisableProxyVotes = quest.DisableProxyVotes, ForcePinnedProxyVotes = quest.ForcePinnedProxyVotes, IgnoreSpoilers = quest.IgnoreSpoilers, TrimExtendedText = quest.TrimExtendedText, UseRSSThreadmarks = quest.UseRSSThreadmarks, LinkedQuests = quest.LinkedQuests.Select(q => q.ThreadName).DefaultIfEmpty(string.Empty).Aggregate((p, q) => $"{p}⦂{q}"), }; BaseAdd(questElement, false); }