C# 클래스 Revit.SDK.Samples.ProjectInfo.CS.RevitEnumConverter

Converter for Enumeration types of RevitAPI
상속: System.ComponentModel.EnumConverter
파일 보기 프로젝트 열기: AMEE/revit

공개 메소드들

메소드 설명
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

메소드 상세

ConvertFrom() 공개 메소드

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
리턴 object

ConvertTo() 공개 메소드

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.
리턴 object

GetStandardValues() 공개 메소드

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
리턴 StandardValuesCollection

RevitEnumConverter() 공개 메소드

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