Exemple #1
0
        private ITopic_Alert_Options SetupAuthorParameters(ITopic_Alert_Options options)
        {
            var authorOptions = DependencyResolver.Current.GetService <IAuthorAlertOptions>();

            return((authorOptions != null)
                ? authorOptions.SetOptions(options)
                : options);
        }
        public ITopic_Alert_Options SetOptions(ITopic_Alert_Options options)
        {
            var a = AuthorService?.GetCurrentAuthor() ?? null;

            if (a == null)
            {
                return(options);
            }

            options.Search_Name    = $"{TextTranslator.Translate("Author.TopicAlert.Prefix")} {a?.First_Name} {a?.Last_Name}" ?? string.Empty;
            options.Related_Search = $"?{Constants.QueryString.AuthorFullName}={AuthorNamesField.ToAuthorName(a)}";

            return(options);
        }