Class TimeOfDayCriterion
A criterion for matching a time range in day.
Inherited Members
Namespace: EPiServer.Personalization.VisitorGroups.Criteria
Assembly: EPiServer.Cms.AspNetCore.dll
Version: 12.0.3Syntax
[VisitorGroupCriterion(Category = "Time and Place Criteria", Description = "Match specific time period in day", DisplayName = "Time of Day", LanguagePath = "/shell/cms/visitorgroups/criteria/timeofday", ScriptShellModuleName = "EPIServer.CMS.UI.VisitorGroups", ScriptUrl = "CriteriaEditors/dist/TimeOfDay.js")]
public class TimeOfDayCriterion : CriterionBase<TimeOfDayModel>, ICriterion, IGeneratesAdministrativeInterfaceConstructors
TimeOfDayCriterion()
Initializes a new instance of the TimeOfDayCriterion class.
Declaration
public TimeOfDayCriterion()TimeOfDayCriterion(ICurrentTimeProvider)
Initializes a new instance of the TimeOfDayCriterion class.
Declaration
public TimeOfDayCriterion(ICurrentTimeProvider currentTimeProvider)Parameters
| Type | Name | Description | 
|---|---|---|
| ICurrentTimeProvider | currentTimeProvider | The current time provider. | 
Methods
IsMatch(IPrincipal, HttpContext)
Determines whether the specified principal is a member of this role.
Declaration
public override bool IsMatch(IPrincipal principal, HttpContext httpContext)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Security.Principal.IPrincipal | principal | The principal. | 
| Microsoft.AspNetCore.Http.HttpContext | httpContext | The current http context | 
Returns
| Type | Description | 
|---|---|
| System.Boolean | 
 | 
Overrides
EPiServer.Personalization.VisitorGroups.CriterionBase<EPiServer.Personalization.VisitorGroups.Criteria.TimeOfDayModel>.IsMatch(System.Security.Principal.IPrincipal, Microsoft.AspNetCore.Http.HttpContext)
  Remarks
The context parameter may be null but can be used to transfer external context to a Virtual role provider
