Class NullableBoolConverter
Converts System.Nullable<T> types (using the System.Boolean type constraint on
the generic) from strings.
Inheritance
System.Object
System.ComponentModel.TypeConverter
NullableBoolConverter
Inherited Members
System.ComponentModel.TypeConverter.CanConvertFrom(System.Type)
System.ComponentModel.TypeConverter.CanConvertTo(System.Type)
System.ComponentModel.TypeConverter.ConvertFrom(System.Object)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromInvariantString(System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.ComponentModel.ITypeDescriptorContext, System.String)
System.ComponentModel.TypeConverter.ConvertFromString(System.String)
System.ComponentModel.TypeConverter.ConvertTo(System.Object, System.Type)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToInvariantString(System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.ConvertToString(System.Object)
System.ComponentModel.TypeConverter.CreateInstance(System.Collections.IDictionary)
System.ComponentModel.TypeConverter.CreateInstance(System.ComponentModel.ITypeDescriptorContext, System.Collections.IDictionary)
System.ComponentModel.TypeConverter.GetConvertFromException(System.Object)
System.ComponentModel.TypeConverter.GetConvertToException(System.Object, System.Type)
System.ComponentModel.TypeConverter.GetCreateInstanceSupported()
System.ComponentModel.TypeConverter.GetCreateInstanceSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.GetProperties(System.ComponentModel.ITypeDescriptorContext, System.Object, System.Attribute[])
System.ComponentModel.TypeConverter.GetProperties(System.Object)
System.ComponentModel.TypeConverter.GetPropertiesSupported()
System.ComponentModel.TypeConverter.GetPropertiesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValues()
System.ComponentModel.TypeConverter.GetStandardValues(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesExclusive()
System.ComponentModel.TypeConverter.GetStandardValuesExclusive(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.GetStandardValuesSupported()
System.ComponentModel.TypeConverter.GetStandardValuesSupported(System.ComponentModel.ITypeDescriptorContext)
System.ComponentModel.TypeConverter.IsValid(System.ComponentModel.ITypeDescriptorContext, System.Object)
System.ComponentModel.TypeConverter.IsValid(System.Object)
System.ComponentModel.TypeConverter.SortProperties(System.ComponentModel.PropertyDescriptorCollection, System.String[])
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: OpenSilver.dll
Syntax
public sealed class NullableBoolConverter : TypeConverter
Methods
|
Improve this Doc
View Source
CanConvertFrom(ITypeDescriptorContext, Type)
Determines whether this converter can convert an object of the specified type
to the System.Nullable<T> type (using the System.Boolean type constraint on the
generic).
Declaration
public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
context |
An System.ComponentModel.ITypeDescriptorContext that provides a format context.
|
System.Type |
sourceType |
The type that you want to convert from.
|
Returns
Type |
Description |
System.Boolean |
true if sourceType is a System.String, System.Boolean, or a System.Nullable<T>
type (using the System.Boolean type constraint on the generic) that can be assigned
from sourceType; otherwise, false.
|
Overrides
System.ComponentModel.TypeConverter.CanConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Type)
|
Improve this Doc
View Source
CanConvertTo(ITypeDescriptorContext, Type)
Declaration
public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
context |
|
System.Type |
destinationType |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
System.ComponentModel.TypeConverter.CanConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Type)
|
Improve this Doc
View Source
ConvertFrom(ITypeDescriptorContext, CultureInfo, Object)
Converts the specified object to a System.Nullable<T> type (using the System.Boolean
type constraint on the generic).
Declaration
public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
context |
An System.ComponentModel.ITypeDescriptorContext that provides a format context.
|
System.Globalization.CultureInfo |
culture |
The System.Globalization.CultureInfo to use as the current culture.
|
System.Object |
value |
The object to convert to a System.Nullable<T> type (using the System.Boolean type
constraint on the generic).
|
Returns
Type |
Description |
System.Object |
A System.Nullable<T> type (using the System.Boolean type constraint on the generic)
that represents the converted object.
|
Overrides
System.ComponentModel.TypeConverter.ConvertFrom(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object)
Exceptions
Type |
Condition |
System.NotSupportedException |
The conversion attempt failed. value is not a System.String, System.Boolean,
or System.Nullable<T> (using the System.Boolean type constraint on the generic)
type.
|
|
Improve this Doc
View Source
ConvertTo(ITypeDescriptorContext, CultureInfo, Object, Type)
Declaration
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType)
Parameters
Type |
Name |
Description |
System.ComponentModel.ITypeDescriptorContext |
context |
|
System.Globalization.CultureInfo |
culture |
|
System.Object |
value |
|
System.Type |
destinationType |
|
Returns
Type |
Description |
System.Object |
|
Overrides
System.ComponentModel.TypeConverter.ConvertTo(System.ComponentModel.ITypeDescriptorContext, System.Globalization.CultureInfo, System.Object, System.Type)
Exceptions
Type |
Condition |
System.NotImplementedException |
Always throws.
|
Extension Methods