C# Class Revit.SDK.Samples.AreaReinParameters.CS.ParameterConverter

converter between Autodesk.Revit.DB.ElementId and Element's name
Inheritance: System.ComponentModel.TypeConverter
Exibir arquivo Open project: AMEE/revit

Protected Properties

Property Type Description
m_hash System.Collections.Hashtable

Public Methods

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

whether conversion is allowable

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

convert from Name to ElementId

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

convert from Autodesk.Revit.DB.ElementId to Name

GetConvertHash ( ) : void

fill m_hashtable

GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection

provide Autodesk.Revit.DB.ElementId collection

GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool

always return true so that user can't input unexpected text

GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool

always return true

Protected Methods

Method Description
ParameterConverter ( ) : System

initialize m_hash

Method Details

CanConvertFrom() public method

whether conversion is allowable
public CanConvertFrom ( ITypeDescriptorContext context, Type sourceType ) : bool
context ITypeDescriptorContext
sourceType System.Type
return bool

ConvertFrom() public method

convert from Name to ElementId
public ConvertFrom ( ITypeDescriptorContext context, CultureInfo culture, object v ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
v object Name
return object

ConvertTo() public method

convert from Autodesk.Revit.DB.ElementId to Name
public ConvertTo ( ITypeDescriptorContext context, CultureInfo culture, object v, Type destinationType ) : object
context ITypeDescriptorContext
culture System.Globalization.CultureInfo
v object ElementId
destinationType System.Type String
return object

GetConvertHash() public abstract method

fill m_hashtable
public abstract GetConvertHash ( ) : void
return void

GetStandardValues() public method

provide Autodesk.Revit.DB.ElementId collection
public GetStandardValues ( ITypeDescriptorContext context ) : StandardValuesCollection
context ITypeDescriptorContext
return StandardValuesCollection

GetStandardValuesExclusive() public method

always return true so that user can't input unexpected text
public GetStandardValuesExclusive ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

GetStandardValuesSupported() public method

always return true
public GetStandardValuesSupported ( ITypeDescriptorContext context ) : bool
context ITypeDescriptorContext
return bool

ParameterConverter() protected method

initialize m_hash
protected ParameterConverter ( ) : System
return System

Property Details

m_hash protected_oe property

hash table save
protected Hashtable,System.Collections m_hash
return System.Collections.Hashtable