Table of Contents

Class ItemViewModelExtensions

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

Extension methods for ItemViewModel.

public static class ItemViewModelExtensions
Inheritance
ItemViewModelExtensions
Inherited Members

Methods

RequireItem(ItemViewModel?, string?)

Ensures that the specified ItemViewModel is not null. Throws an exception if it is null.

public static ItemViewModel RequireItem(this ItemViewModel? item, string? parameterName = null)

Parameters

item ItemViewModel

The ItemViewModel to check.

parameterName string

The name of the parameter that is being checked. This is automatically provided by the compiler.

Returns

ItemViewModel

The original ItemViewModel if it is not null.

Examples

Model.Item.RequireItem();

Exceptions

ArgumentNullException

Thrown when the item is null.

To top