C# Class Microsoft.Tools.WindowsInstaller.LoggingPoliciesConverter

Provides conversion between the LoggingPolicies enumeration and string short form.
Inheritance: System.ComponentModel.TypeConverter
Show file Open project: heaths/psmsi Class Usage Examples

Public Methods

Method Description
CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool

Returns True when sourceType is a String.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Returns True when destinationType is a String.

ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object

Converts a String in the short form like "omus" to a LoggingPolicies enumeration.

ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object

Converts a LoggingPolicies to a short form String like "voicewarmup".

Private Methods

Method Description
LoggingPoliciesConverter ( ) : System
TryParse ( string value, LoggingPolicies &mode ) : bool

Method Details

CanConvertFrom() public method

Returns True when sourceType is a String.
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext Additional context for conversion.
sourceType System.Type The type of the source object.
return bool

CanConvertTo() public method

Returns True when destinationType is a String.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext Additional context for conversion.
destinationType System.Type The type of the destination object.
return bool

ConvertFrom() public method

Converts a String in the short form like "omus" to a LoggingPolicies enumeration.
The short form string contains invalid characters.
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object value ) : object
context ITypeDescriptorContext Additional context for conversion.
culture System.Globalization.CultureInfo The culture to use for conversion.
value object The value to convert.
return object

ConvertTo() public method

Converts a LoggingPolicies to a short form String like "voicewarmup".
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType ) : object
context ITypeDescriptorContext Additional context for conversion.
culture System.Globalization.CultureInfo The culture to use for conversion.
value object The to convert.
destinationType System.Type The type of the destination object.
return object