Class CustomBooleanTypeConverter
Allows for converting string representations of 0 and 1 to boolean
Inheritance
object
TypeConverter
BooleanConverter
Namespace: Umbraco.Cms.Core
Assembly: Umbraco.Core.dll
Syntax
public class CustomBooleanTypeConverter : BooleanConverter
Constructors
View SourceCustomBooleanTypeConverter()
Declaration
public CustomBooleanTypeConverter()
Methods
View SourceCanConvertFrom(ITypeDescriptorContext?, Type)
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeDescriptorContext | context | |
| Type | sourceType |
Returns
| Type | Description |
|---|---|
| bool |
ConvertFrom(ITypeDescriptorContext?, CultureInfo?, object)
Declaration
public override object? ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| ITypeDescriptorContext | context | |
| CultureInfo | culture | |
| object | value |
Returns
| Type | Description |
|---|---|
| object |