ValidTypesAttribute Class

Valid types to allow within a dynamic/object parameter
Inheritance Hierarchy
SystemObject
  SystemAttribute
    Tekla.Structural.ExpressoAddInValidTypesAttribute

Namespace:  Tekla.Structural.ExpressoAddIn
Assembly:  Tedds.ExprInterop (in Tedds.ExprInterop.dll) Version: 25.0.0.0
Syntax
public sealed class ValidTypesAttribute : Attribute

The ValidTypesAttribute type exposes the following members.

Constructors
  NameDescription
Public methodValidTypesAttribute
Specify valid types to pass within parameter
Top
Remarks
It is common within the .Net framework to have index properties that use different data types for keys. For example a value in a collection can be accessed by index or name (int or string). The ValidTypes Attribute allows a single Add-In method to accept multiple data types (by declaring the parameter as an object or dynamic type) and then inform Tedds how to pass the argument to that method. In the name/index example, valid types of int and string would be specified in the attribute. Tedds would then pass string variables to the method as a string but cast numeric variables from double to int before calling the method.
See Also
Was this helpful?
The feedback you give here is not visible to other users. We use your comments to improve the content.
Previous
Next