TypeAssistantServer
Provides static methods for registering and retrieving type assistants.
Fields
Methods
FindByType
#Find the type assistent associated with a specific type id.
Parameters:
| type (Type) | Type. |
Returns: Type assistent or null.
FindByValue
#Find the type assistent associated with a specific object.
Parameters:
| value (object) | Target object for assistant search. |
Returns: Type assistent or null.
FindCurveAssistant
#Find the curve assistent associated with a specific object.
Parameters:
| targetObject (object) | Target object for assistant search. |
Returns: Curve assistent or null.
FindCurveAssistant
#Find the curve assistent associated with a specific type id.
Parameters:
| type (Type) | Type. |
| assistant (out ICurveAssistant) | Found assistant or null. |
FindCurveAssistantByType
#Find the curve assistant associated with a specific type.
Parameters:
| type (Type) |
FindOrMake
#Find the type assistent associated with a specific object. If no direct assistant can be found, a reimplementation of a more derived type may be constructed.
Parameters:
| targetObject (object) | Target object for assistant search. |
Returns: Type assistent or null.
FindOrMake
#Find the type assistent associated with a specific type id. If no direct assistant can be found, a reimplementation of a more derived type may be constructed.
Parameters:
| type (Type) | Type. |
| assistant (out ITypeAssistant) |
Returns: Type assistent or null.
FindOrMake<T>
#Find the type assistent associated with a specific type. If no direct assistant can be found, a reimplementation of a more derived type may be constructed.
Parameters:
| assistant (out ITypeAssistant<T>) | Assistant, if found. |
FindSurfaceAssistant
#Find the surface assistent associated with a specific object.
Parameters:
| targetObject (object) | Target object for assistant search. |
Returns: Surface assistent or null.
FindSurfaceAssistant
#Find the surface assistent associated with a specific type id.
Parameters:
| type (Type) | Type. |
| assistant (out ISurfaceAssistant) | Found assistant or null. |
FindSurfaceAssistantByType
#Find the surface assistant associated with a specific type.
Parameters:
| type (Type) |
Register
#Register a curve assistant.
Parameters:
| assistant (ICurveAssistant) | Assistant to register. |
Returns: True on success, false if the assistant is null or if a competing assistant was already defined.
Register
#Register a surface assistant.
Parameters:
| assistant (ISurfaceAssistant) | Assistant to register. |
Returns: True on success, false if the assistant is null or if a competing assistant was already defined.
Register
#Register a type assistant.
Parameters:
| assistant (ITypeAssistant) | Assistant to register. |
Returns: True on success, false if the assistant is null or if a competing assistant was already defined.
Sort
#Sort a twig containing potentially a variety of different data types and null values. Some effort is made to ensure this method doesn't have too much overhead when sorting twigs which contain only primitive data types such as doubles, integers or strings.
Parameters:
| twig (ITwig) | Twig to sort. |
| map (out Maths.IndexMap) | Index map. |
| warnings (out string[]) | List of warning messages, if any. |
| errors (out string[]) | List of error messages, if any. |
Returns: Twig with sorted values.
ToNumericString
#Try and convert a value into a Prose.Text. If there is no assistant, the ToString() method will be invoked.
Parameters:
| value (object) |
Transform
#Try and transform a pear using the registered type assistant.
Transform
#Try and transform a value using the registered type assistant.