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

Converter for Enumeration types of RevitAPI
Inheritance: System.ComponentModel.EnumConverter
Afficher le fichier Open project: AMEE/revit

Méthodes publiques

Méthode 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 méthode

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
Résultat object

ConvertTo() public méthode

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.
Résultat object

GetStandardValues() public méthode

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
Résultat StandardValuesCollection

RevitEnumConverter() public méthode

Initialize private variables
public RevitEnumConverter ( Type type ) : System
type System.Type Enumeration type
Résultat System