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

Converter for Enumeration types of RevitAPI
Inheritance: System.ComponentModel.EnumConverter
Mostra file Open project: AMEE/revit

Public Methods

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

Returns an enum item from a string

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

Convert enum item to string

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

Returns a collection of standard values from the default context for the data type this type converter is designed for.

RevitEnumConverter ( Type type ) : System

Initialize private variables

Method Details

ConvertFrom() public method

Returns an enum item from a 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
return object

ConvertTo() public method

Convert enum item 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

GetStandardValues() public method

Returns a collection of standard values from the default context for the data type this type converter is designed for.
public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
return StandardValuesCollection

RevitEnumConverter() public method

Initialize private variables
public RevitEnumConverter ( Type type ) : System
type System.Type Enumeration type
return System