Shady nagy/net6 (#614)
* udated to .net6 * used the .net6 version RC2 * added editconfig. * App core new Scoped Namespaces style. * BlazorAdmin new Scoped Namespaces style. * Blazor Shared new Scoped Namespaces style. * Infra new Scoped Namespaces style. * public api new Scoped Namespaces style. * web new Scoped Namespaces style. * FunctionalTests new Scoped Namespaces style. * Integrational tests new Scoped Namespaces style. * unit tests new Scoped Namespaces style. * update github action. * update github action. * change the global.
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.Extensions
|
||||
namespace Microsoft.eShopWeb.Web.Extensions;
|
||||
|
||||
public static class CacheHelpers
|
||||
{
|
||||
public static class CacheHelpers
|
||||
public static readonly TimeSpan DefaultCacheDuration = TimeSpan.FromSeconds(30);
|
||||
private static readonly string _itemsKeyTemplate = "items-{0}-{1}-{2}-{3}";
|
||||
|
||||
public static string GenerateCatalogItemCacheKey(int pageIndex, int itemsPage, int? brandId, int? typeId)
|
||||
{
|
||||
public static readonly TimeSpan DefaultCacheDuration = TimeSpan.FromSeconds(30);
|
||||
private static readonly string _itemsKeyTemplate = "items-{0}-{1}-{2}-{3}";
|
||||
return string.Format(_itemsKeyTemplate, pageIndex, itemsPage, brandId, typeId);
|
||||
}
|
||||
|
||||
public static string GenerateCatalogItemCacheKey(int pageIndex, int itemsPage, int? brandId, int? typeId)
|
||||
{
|
||||
return string.Format(_itemsKeyTemplate, pageIndex, itemsPage, brandId, typeId);
|
||||
}
|
||||
public static string GenerateBrandsCacheKey()
|
||||
{
|
||||
return "brands";
|
||||
}
|
||||
|
||||
public static string GenerateBrandsCacheKey()
|
||||
{
|
||||
return "brands";
|
||||
}
|
||||
|
||||
public static string GenerateTypesCacheKey()
|
||||
{
|
||||
return "types";
|
||||
}
|
||||
public static string GenerateTypesCacheKey()
|
||||
{
|
||||
return "types";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +1,14 @@
|
||||
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Text.Encodings.Web;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.eShopWeb.ApplicationCore.Interfaces;
|
||||
|
||||
namespace Microsoft.eShopWeb.Web.Services
|
||||
namespace Microsoft.eShopWeb.Web.Services;
|
||||
|
||||
public static class EmailSenderExtensions
|
||||
{
|
||||
public static class EmailSenderExtensions
|
||||
public static Task SendEmailConfirmationAsync(this IEmailSender emailSender, string email, string link)
|
||||
{
|
||||
public static Task SendEmailConfirmationAsync(this IEmailSender emailSender, string email, string link)
|
||||
{
|
||||
return emailSender.SendEmailAsync(email, "Confirm your email",
|
||||
$"Please confirm your account by clicking this link: <a href='{HtmlEncoder.Default.Encode(link)}'>link</a>");
|
||||
}
|
||||
return emailSender.SendEmailAsync(email, "Confirm your email",
|
||||
$"Please confirm your account by clicking this link: <a href='{HtmlEncoder.Default.Encode(link)}'>link</a>");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
namespace Microsoft.AspNetCore.Mvc
|
||||
namespace Microsoft.AspNetCore.Mvc;
|
||||
|
||||
public static class UrlHelperExtensions
|
||||
{
|
||||
public static class UrlHelperExtensions
|
||||
public static string EmailConfirmationLink(this IUrlHelper urlHelper, string userId, string code, string scheme)
|
||||
{
|
||||
public static string EmailConfirmationLink(this IUrlHelper urlHelper, string userId, string code, string scheme)
|
||||
{
|
||||
return urlHelper.Action(
|
||||
action: "GET",
|
||||
controller: "ConfirmEmail",
|
||||
values: new { userId, code },
|
||||
protocol: scheme);
|
||||
}
|
||||
return urlHelper.Action(
|
||||
action: "GET",
|
||||
controller: "ConfirmEmail",
|
||||
values: new { userId, code },
|
||||
protocol: scheme);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user