TypeAssistantServer

public static class TypeAssistantServer
Provides static methods for registering and retrieving type assistants.

Fields

NullKey

#
public const string NullKey = "∅"

Methods

Find<T>

#
Find the type assistent associated with a specific type.
public static ITypeAssistant<T> Find<T>()
Type assistant or null.

FindByType

#
Find the type assistent associated with a specific type id.
public static ITypeAssistant FindByType(
type
Type.
)
Type assistent or null.

FindByValue

#
Find the type assistent associated with a specific object.
public static ITypeAssistant FindByValue(
value
Target object for assistant search.
)
Type assistent or null.

FindConstructor

#
Find the type constructor matching the given name.
public static ITypeAssistant FindConstructor(
name
)

FindConstructor<T>

#
Find the type constructor matching the given name.
public static TypeAssistant<T> FindConstructor<T>(
name
)

FindCurveAssistant

#
Find the curve assistent associated with a specific object.
public static ICurveAssistant FindCurveAssistant(
targetObject
Target object for assistant search.
)
Curve assistent or null.

FindCurveAssistant

#
Find the curve assistent associated with a specific type id.
public static void FindCurveAssistant(
type,
Type.
assistant
Found assistant or null.
)

FindCurveAssistantByType

#
Find the curve assistant associated with a specific type.
public static ICurveAssistant FindCurveAssistantByType(
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.
public static ITypeAssistant FindOrMake(
targetObject
Target object for assistant search.
)
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.
public static void FindOrMake(
type,
Type.
assistant
)
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.
public static void FindOrMake<T>(
assistant
Assistant, if found.
)

FindSurfaceAssistant

#
Find the surface assistent associated with a specific object.
public static ISurfaceAssistant FindSurfaceAssistant(
targetObject
Target object for assistant search.
)
Surface assistent or null.

FindSurfaceAssistant

#
Find the surface assistent associated with a specific type id.
public static void FindSurfaceAssistant(
type,
Type.
assistant
Found assistant or null.
)

FindSurfaceAssistantByType

#
Find the surface assistant associated with a specific type.
public static ISurfaceAssistant FindSurfaceAssistantByType(
type
)

Register

#
Register a curve assistant.
public static bool Register(
assistant
Assistant to register.
)
True on success, false if the assistant is null or if a competing assistant was already defined.

Register

#
Register a surface assistant.
public static bool Register(
assistant
Assistant to register.
)
True on success, false if the assistant is null or if a competing assistant was already defined.

Register

#
Register a type assistant.
public static bool Register(
assistant
Assistant to register.
)
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.
public static ITwig Sort(
twig,
Twig to sort.
map,
Index map.
out string[]
warnings,
List of warning messages, if any.
out string[]
errors
List of error messages, if any.
)
Twig with sorted values.

ToICurve

#
Try and create an ICurve from an object.
public static ICurve ToICurve(
targetObject
)

ToNumericString

#
Try and convert a value into a Prose.Text. If there is no assistant, the ToString() method will be invoked.
public static Prose.Text ToNumericString(
value
)

Transform

#
Try and transform a pear using the registered type assistant.
public static bool Transform(
input,
Pear to transform.
Transform
transform,
Transformation to apply.
out IPear
output
Transformed shape, or original pear.
)
True if a type assistant was defined for this type and supports transforming values.

Transform

#
Try and transform a value using the registered type assistant.
public static bool Transform(
input,
Value to transform.
Transform
transform,
Transformation to apply.
out object
output
Transformed shape, or original value.
)
True if a type assistant was defined for this type and supports transforming values.