Show / Hide Table of Contents

Method RegisterColumn

| Improve this Doc View Source

RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>>)

Registers a new column which has a default constructor.

Declaration
protected static Mounter<TColumn> RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>> getter)

    where TModel : Model where TColumn : Column, new()
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TModel, TColumn>> getter

The lambda expression of the column getter.

Returns
Type Description
Mounter<TColumn>

Mounter of the column.

Type Parameters
Name Description
TModel

The type of model which the column is registered on.

TColumn

The type of the column.

Exceptions
Type Condition
System.ArgumentNullException

getter is null.

System.ArgumentException

getter expression is not a valid getter.

| Improve this Doc View Source

RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>>, Mounter<TColumn>)

Registers a column from existing column mounter.

Declaration
protected static void RegisterColumn<TModel, TColumn>(Expression<Func<TModel, TColumn>> getter, Mounter<TColumn> fromMounter)

    where TModel : Model where TColumn : Column, new()
Parameters
Type Name Description
System.Linq.Expressions.Expression<System.Func<TModel, TColumn>> getter

The lambda expression of the column getter.

Mounter<TColumn> fromMounter

The existing column mounter.

Type Parameters
Name Description
TModel

The type of model which the column is registered on.

TColumn

The type of the column.

Exceptions
Type Condition
System.ArgumentNullException

getter is null.

System.ArgumentException

getter expression is not an valid getter.

System.ArgumentNullException

fromMounter is null.

  • Improve this Doc
  • View Source
Back to top Copyright © Weifen Luo | DevZest