Class PublishedElementExtensions
Provides extension methods to models.
Inheritance
System.Object
Namespace: Umbraco.Extensions
Assembly: cs.temp.dll.dll
Syntax
public static class PublishedElementExtensions
Methods
ValueFor<TModel, TValue>(TModel, IPublishedValueFallback, Expression<Func<TModel, TValue>>, String, String, Fallback, TValue)
Gets the value of a property.
Declaration
public static TValue ValueFor<TModel, TValue>(this TModel model, IPublishedValueFallback publishedValueFallback, Expression<Func<TModel, TValue>> property, string culture = null, string segment = null, Fallback fallback = null, TValue defaultValue = null)
where TModel : IPublishedElement
Parameters
| Type | Name | Description |
|---|---|---|
| TModel | model | |
| IPublishedValueFallback | publishedValueFallback | |
| Expression<System.Func<TModel, TValue>> | property | |
| System.String | culture | |
| System.String | segment | |
| Fallback | fallback | |
| TValue | defaultValue |
Returns
| Type | Description |
|---|---|
| TValue |
Type Parameters
| Name | Description |
|---|---|
| TModel | |
| TValue |