Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

NopMessageDefaults.cs

using Nop.Core.Caching;
using Nop.Core.Domain.Messages;

namespace Nop.Services.Messages;

/// 
/// Represents default values related to messages services
/// 
public static partial class NopMessageDefaults
{
    /// 
    /// Gets a key for notifications list from TempDataDictionary
    /// 
    public static string NotificationListKey => "NotificationList";

    /// 
    /// Gets the path to directory used to store the token response
    /// 
    public static string GmailAuthStorePath => "~/App_Data/Gmail/AuthStore";

    /// 
    /// Gets the scopes requested to access a protected API (Gmail)
    /// 
    public static string[] GmailScopes => ["https://mail.google.com/"];

    /// 
    /// Gets the scopes requested to access a protected API (MSAL)
    /// 
    public static string MSALTenantPattern => "https://login.microsoftonline.com/{0}/v2.0";

    /// 
    /// Gets the scopes requested to access a protected API (MSAL)
    /// 
    public static string[] MSALScopes => ["https://outlook.office365.com/.default"];

    #region Caching defaults

    /// 
    /// Gets a key for caching
    /// 
    /// 
    /// {0} : store ID
    /// {1} : is active?
    /// 
    public static CacheKey MessageTemplatesAllCacheKey => new("Nop.messagetemplate.all.{0}-{1}", NopEntityCacheDefaults.AllPrefix);

    /// 
    /// Gets a key for caching
    /// 
    /// 
    /// {0} : template name
    /// {1} : store ID
    /// 
    public static CacheKey MessageTemplatesByNameCacheKey => new("Nop.messagetemplate.byname.{0}-{1}", MessageTemplatesByNamePrefix);

    /// 
    /// Gets a key pattern to clear cache
    /// 
    /// 
    /// {0} : template name
    /// 
    public static string MessageTemplatesByNamePrefix => "Nop.messagetemplate.byname.{0}";

    #endregion
}