Table of Contents

Class ViewSettingsBase<T>

Namespace
Dynamicweb.Ecommerce.ProductCatalog
Assembly
Dynamicweb.Ecommerce.dll

Configuration of which properties of a fillable viewmodel that should be loaded/filled.

public abstract class ViewSettingsBase<T> where T : FillableViewModelBase, new()

Type Parameters

T

Fillable ViewModel

Inheritance
ViewSettingsBase<T>
Derived
Inherited Members

Properties

FilledProperties

Filter for how much of a viewmodel that should be loaded. Default: Loads all properties.

public string[] FilledProperties { get; set; }

Property Value

string[]

properties that will be filled with data

Methods

AddProperties(ICollection<string>)

Adds the property names that needs to be filled.

public bool AddProperties(ICollection<string> propertyNames)

Parameters

propertyNames ICollection<string>

Names of properties on the viewmodel

Returns

bool

allNameWhereAdded

AddProperties(params string[])

Adds the property names that needs to be filled.

public bool AddProperties(params string[] propertyNames)

Parameters

propertyNames string[]

Names of properties on the viewmodel

Returns

bool

allNameWhereAdded

EnsureContext<TS>(ViewSettingsBase<TS>)

public virtual void EnsureContext<TS>(ViewSettingsBase<TS> settings) where TS : FillableViewModelBase, new()

Parameters

settings ViewSettingsBase<TS>

Type Parameters

TS

EnsureFilledPropertiesExist()

If filled properties are empty, this method will add ALL valid property names.

public virtual void EnsureFilledPropertiesExist()

FillAllValidProperties()

Fills all possible property names of the current viewmodel.

public void FillAllValidProperties()

RemoveProperties(params string[])

Removes the property names from those that needs to be filled.

public bool RemoveProperties(params string[] propertyNames)

Parameters

propertyNames string[]

Names of properties on the viewmodel

Returns

bool

allNameWhereRemoved

To top