Gemstone Expressions Library
Show/Hide TOC

# TypeRegistryGetContextType(Type, Type, ISupportContextVariables) Method

Gets a compiled context type based on registered types and symbols.

## Definition

Namespace: Gemstone.Expressions.Evaluator
Assembly: Gemstone.Expressions (in Gemstone.Expressions.dll) Version: 1.0.178 -- Release Build+87f08ff0c31c7c1340429eba736c5cbcad2e8d10
C#
View Source Request Example

    public Type GetContextType(
    	Type resultType,
    	Type instanceParameterType,
    	ISupportContextVariables? variableContext = null
    )

VB
View Source Request Example

    Public Function GetContextType (
    	resultType As Type,
    	instanceParameterType As Type,
    	Optional variableContext As ISupportContextVariables = Nothing
    ) As Type

C++
View Source Request Example

    public:
    Type^ GetContextType(
    	Type^ resultType,
    	Type^ instanceParameterType,
    	ISupportContextVariables^ variableContext = nullptr
    )

JavaScript
View Source Request Example

    function GetContextType(resultType, instanceParameterType, variableContext);

#### Parameters

resultType Type
  Return value Type used for generated context type functions.
instanceParameterType Type
  Instance parameter Type for generated context type functions.
variableContext ISupportContextVariables (Optional)
  Optional ISupportContextVariables instance to use for context variables.

#### Return Value

Type
Compiled context type based on registered types and symbols.

## Remarks

This method may generate a new runtime type based on registered types and symbols that is compiled into its own assembly and loaded into memory. The same cached type will be returned unless the registered types or symbols change. Since prior compiled assemblies cannot be unloaded, this property should only be called after all the desired types and symbols have been registered.

## See Also

#### Reference

TypeRegistry Class
GetContextType Overload
Gemstone.Expressions.Evaluator Namespace