Beispiel #1
0
        public override void Process(TagHelperContext context, TagHelperOutput output)
        {
            base.Process(context, output);

            if (!string.IsNullOrEmpty(ChangeEmailLink))
            {
                var url = WebUtility.UrlEncode($"{ViewContext.HttpContext.Request.Scheme}://{ViewContext.HttpContext.Request.Host}{ViewContext.HttpContext.Request.PathBase}/{ExternalId}/service/email/change");

                output.Attributes.SetAttribute("href", _options.ChangeEmailLinkFormatted() + url);
            }
            else if (!string.IsNullOrEmpty(ChangePwdLink))
            {
                var url = WebUtility.UrlEncode($"{ViewContext.HttpContext.Request.Scheme}://{ViewContext.HttpContext.Request.Host}{ViewContext.HttpContext.Request.PathBase}/{ExternalId}/service/password/change");
                output.Attributes.SetAttribute("href", _options.ChangePasswordLinkFormatted() + url);
            }
        }