ConversionServer
This static class collects and maintains all conversion logic.
Properties
Actions
#Enumerate over all registered actions. Note that some actions are created on an as-needed basis so this collection may change over time even without new plugins getting loaded.
Methods
Convert
#Try and convert between weakly typed values.
Convert<TTarget>
#Try and convert to a strongly typed value.
Parameters:
| source (object) | |
| target (out TTarget) |
ConvertIfBetter<TTarget>
#Perform a conversion provided the merit improves.
ConvertPear
#Try and convert between weakly typed values.
ConvertPear<TTarget>
#Try and convert to a strongly typed value.
ConvertTQ<TSource, TTarget>
#Try and convert between strongly typed values.
Parameters:
| source (TSource) | |
| target (out TTarget) |
DowngradeType
#Downgrade a type used in Grasshopper 2 to an equivalent type in Grasshopper 1.
Parameters:
| value (object) |
ShowDiagram
#public static void ShowDiagram()
TryAddConversion
#Attempt to add a conversion delegate. The method must point to a ConversionDelegate<TSource, TTarget> compliant method and have at least a MeritAttribute attached to it.
Parameters:
| method (MethodInfo) |