C# Class Our.Umbraco.OpeningHours.Extensions.OpeningHoursExtensions

Afficher le fichier Open project: bomortensen/Our.Umbraco.OpeningHours

Méthodes publiques

Méthode Description
ClosesInHowManyMinutes ( this model, System.DateTime now = null ) : int
GetOpeningHours ( this content ) : OpeningHoursModel

Gets opening hours from the property with the openingHours alias. If the property value doesn't match a valid instance of OpeningHoursModel, an instance with empty values will be returned instead.

GetOpeningHours ( this content, string propertyAlias ) : OpeningHoursModel

Gets opening hours from the property with the specified propertyAlias. If the property value doesn't match a valid instance of OpeningHoursModel, an instance with empty values will be returned instead.

IsOpen24Hours ( this model ) : bool
TodaysOpeningHours ( this model ) : OpeningHoursWeekdayItem
TodaysOpeningHours ( this model, System.DateTime today ) : OpeningHoursWeekdayItem

Method Details

ClosesInHowManyMinutes() public static méthode

public static ClosesInHowManyMinutes ( this model, System.DateTime now = null ) : int
model this
now System.DateTime
Résultat int

GetOpeningHours() public static méthode

Gets opening hours from the property with the openingHours alias. If the property value doesn't match a valid instance of OpeningHoursModel, an instance with empty values will be returned instead.
public static GetOpeningHours ( this content ) : OpeningHoursModel
content this The instance of holding the opening hours.
Résultat OpeningHoursModel

GetOpeningHours() public static méthode

Gets opening hours from the property with the specified propertyAlias. If the property value doesn't match a valid instance of OpeningHoursModel, an instance with empty values will be returned instead.
public static GetOpeningHours ( this content, string propertyAlias ) : OpeningHoursModel
content this The instance of holding the opening hours.
propertyAlias string The alias of the property.
Résultat OpeningHoursModel

IsOpen24Hours() public static méthode

public static IsOpen24Hours ( this model ) : bool
model this
Résultat bool

TodaysOpeningHours() public static méthode

public static TodaysOpeningHours ( this model ) : OpeningHoursWeekdayItem
model this
Résultat Our.Umbraco.OpeningHours.Model.Items.OpeningHoursWeekdayItem

TodaysOpeningHours() public static méthode

public static TodaysOpeningHours ( this model, System.DateTime today ) : OpeningHoursWeekdayItem
model this
today System.DateTime
Résultat Our.Umbraco.OpeningHours.Model.Items.OpeningHoursWeekdayItem