Class BigintValueTypeConverter
Namespace: Umbraco.Cms.Core.PropertyEditors.ValueConverters
Assembly: Umbraco.Core.dll
Syntax
public class BigintValueTypeConverter : ValueTypePropertyValueConverterBase, IPropertyValueConverter, IDiscoverable
Constructors
View SourceBigintValueTypeConverter(PropertyEditorCollection)
Declaration
public BigintValueTypeConverter(PropertyEditorCollection propertyEditors)
Parameters
| Type | Name | Description |
|---|---|---|
| PropertyEditorCollection | propertyEditors |
Properties
View SourceSupportedValueTypes
Declaration
protected override string[] SupportedValueTypes { get; }
Property Value
| Type | Description |
|---|---|
| string[] |
Methods
View SourceConvertSourceToIntermediate(IPublishedElement, IPublishedPropertyType, object?, bool)
Converts a property source value to an intermediate value.
Declaration
public override object? ConvertSourceToIntermediate(IPublishedElement owner, IPublishedPropertyType propertyType, object? source, bool preview)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedElement | owner | The property set owning the property. |
| IPublishedPropertyType | propertyType | The property type. |
| object | source | The source value. |
| bool | preview | A value indicating whether conversion should take place in preview mode. |
Returns
| Type | Description |
|---|---|
| object | The result of the conversion. |
Remarks
The converter should know how to convert a null source value, meaning that no
value has been assigned to the property. The intermediate value can be null.
With the XML cache, source values come from the XML cache and therefore are strings.
With objects caches, source values would come from the database and therefore be either ints, DateTimes, decimals, or strings.
The converter should be prepared to handle both situations.
When source values are strings, the converter must handle empty strings, whitespace strings, and xml-whitespace strings appropriately, ie it should know whether to preserve white spaces.
GetPropertyCacheLevel(IPublishedPropertyType)
Gets the property cache level.
Declaration
public override PropertyCacheLevel GetPropertyCacheLevel(IPublishedPropertyType propertyType)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedPropertyType | propertyType | The property type. |
Returns
| Type | Description |
|---|---|
| PropertyCacheLevel | The property cache level. |
GetPropertyValueType(IPublishedPropertyType)
Gets the type of values returned by the converter.
Declaration
public override Type GetPropertyValueType(IPublishedPropertyType propertyType)
Parameters
| Type | Name | Description |
|---|---|---|
| IPublishedPropertyType | propertyType | The property type. |
Returns
| Type | Description |
|---|---|
| Type | The CLR type of values returned by the converter. |
Remarks
Some of the CLR types may be generated, therefore this method cannot directly return a Type object (which may not exist yet). In which case it needs to return a ModelType instance.