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