C# Class Revit.SDK.Samples.ProjectInfo.CS.AngleConverter

Converts angle with string
Inheritance: System.ComponentModel.TypeConverter
ファイルを表示 Open project: AMEE/revit

Public Methods

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

Converts from string.

CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool

Converts to string.

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

Converts from string.

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

Converts to string.

Private Methods

Method Description
AngleString2Double ( string value ) : double

Convert angle string to double value

Double2AngleString ( Double value ) : string

Convert double value to angle string

Method Details

CanConvertFrom() public method

Converts from string.
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool

CanConvertTo() public method

Converts to string.
public CanConvertTo ( ITypeDescriptorContext context, Type destinationType ) : bool
context ITypeDescriptorContext
destinationType System.Type
return bool

ConvertFrom() public method

Converts from string.
public ConvertFrom ( ITypeDescriptorContext context, System culture, object value ) : object
context ITypeDescriptorContext An System.ComponentModel.ITypeDescriptorContext /// that provides a format context.
culture System An optional System.Globalization.CultureInfo. /// If not supplied, the current culture is assumed.
value object string to be converted to an element
return object

ConvertTo() public method

Converts to string.
public ConvertTo ( ITypeDescriptorContext context, System culture, object value, Type destinationType ) : object
context ITypeDescriptorContext An ITypeDescriptorContext that provides a format context.
culture System A CultureInfo. If null is passed, the current culture is assumed.
value object The Object to convert.
destinationType System.Type The Type to convert the value parameter to.
return object