API reference
API reference
Select your platform
No SDKs available
No versions available

IParameterProvider Interface

Resolves parameters for invoking callbacks.

Overview

Properties

List< string >
The list of the names of all parameters in the provider.

Public Member Functions

void
Populates the parameters from a Wit.Ai response node. Must be called after all parameters have been obtained from Wit.Ai and mapped but before any are read.
void
PopulateRoles
( Dictionary< string, string > parameterToRoleMap )
Populates the roles mappings between actual parameters and their roles.. Must be called after all parameters have been populated using PopulateParameters but before any are read.
void
AddParameter
( string parameterName,
object value )
Explicitly adds a parameter to the provider.
bool
ContainsParameter
( ParameterInfo parameter,
StringBuilder log )
Returns true if a parameter with the specified name can be provided.
void
AddCustomType
( string name,
Type type )
Add a custom known type (typically enum) to the provider. This should be called BEFORE calling any of the population methods.
object
GetParameterValue
( ParameterInfo formalParameter,
Dictionary< string, string > parameterMap,
bool relaxed )
Provides the actual parameter value matching the supplied formal parameter. Use this overload when you have access to the exact method you want to invoke. This will guarantee a matching type is returned.
T
GetParameterValue< T >
( string parameterName,
Dictionary< string, string > parameterMap,
bool relaxed )
Provides the actual parameter value matching the supplied parameter.
List< string >
GetParameterNamesOfType
( Type targetType )
Returns a list of parameter names that hold values of the specified type. Note: This is an expensive operation.
void
SetSpecializedParameter
( string reservedParameterName,
Type parameterType )
Registers a certain keyword as reserved for a specialized parameter.

Details

Properties

List<string> Meta.Conduit.IParameterProvider.AllParameterNames
The list of the names of all parameters in the provider.

Member Functions

void Meta.Conduit.IParameterProvider.PopulateParametersFromNode
( WitResponseNode responseNode )
Populates the parameters from a Wit.Ai response node. Must be called after all parameters have been obtained from Wit.Ai and mapped but before any are read.
void Meta.Conduit.IParameterProvider.PopulateRoles
( Dictionary< string, string > parameterToRoleMap )
Populates the roles mappings between actual parameters and their roles.. Must be called after all parameters have been populated using PopulateParameters but before any are read.
Parameters
parameterToRoleMap
Keys are normalized lowercase internal (code) names. Values are fully qualified parameter names (roles)
void Meta.Conduit.IParameterProvider.AddParameter
( string parameterName,
object value )
Explicitly adds a parameter to the provider.
Parameters
parameterName
The parameter name.
value
The parameter value.
bool Meta.Conduit.IParameterProvider.ContainsParameter
( ParameterInfo parameter,
StringBuilder log )
Returns true if a parameter with the specified name can be provided.
Parameters
parameter
The name of the parameter.
log
The log string builder.
Returns
True if a parameter with the specified name can be provided.
void Meta.Conduit.IParameterProvider.AddCustomType
( string name,
Type type )
Add a custom known type (typically enum) to the provider. This should be called BEFORE calling any of the population methods.
Parameters
name
The internal name of the type.
type
The data type.
object Meta.Conduit.IParameterProvider.GetParameterValue
( ParameterInfo formalParameter,
Dictionary< string, string > parameterMap,
bool relaxed )
Provides the actual parameter value matching the supplied formal parameter. Use this overload when you have access to the exact method you want to invoke. This will guarantee a matching type is returned.
Parameters
formalParameter
The formal parameter.
parameterMap
A map from actual parameter names to formal parameter names. Used when parameters have been resolved using type, to identify their mapped names.
relaxed
When true, will match by type when name matching fails.
Returns
The actual parameter value matching the formal parameter or null if an error occurs.
T Meta.Conduit.IParameterProvider.GetParameterValue< T >
( string parameterName,
Dictionary< string, string > parameterMap,
bool relaxed )
Provides the actual parameter value matching the supplied parameter.
Parameters
parameterName
The name of the parameter to extract.
parameterMap
A map from actual parameter names to formal parameter names. Used when parameters have been resolved using type, to identify their mapped names.
relaxed
When true, will match by type when name matching fails.
Returns
The actual parameter value matching the formal parameter or null if an error occurs.
List<string> Meta.Conduit.IParameterProvider.GetParameterNamesOfType
( Type targetType )
Returns a list of parameter names that hold values of the specified type. Note: This is an expensive operation.
Parameters
targetType
The type we are querying.
Returns
The names of the parameters that match this type.
void Meta.Conduit.IParameterProvider.SetSpecializedParameter
( string reservedParameterName,
Type parameterType )
Registers a certain keyword as reserved for a specialized parameter.
Parameters
reservedParameterName
The name of the specialized parameter. For example
parameterType
The data type of the parameter
Did you find this page helpful?
Thumbs up icon
Thumbs down icon