ActualParameters
: readonly Dictionary< string, object > |
Maps the parameters to their supplied values. The keys are normalized to lowercase.
Signature
readonly Dictionary<string, object> Meta.Conduit.ParameterProvider.ActualParameters |
AllParameterNames
: List< string > |
The list of the names of all parameters in the provider.
Signature
List<string> Meta.Conduit.ParameterProvider.AllParameterNames |
VoiceSessionReservedName
: const string |
Signature
const string Meta.Conduit.ParameterProvider.VoiceSessionReservedName |
WitResponseNodeReservedName
: const string |
Signature
const string Meta.Conduit.ParameterProvider.WitResponseNodeReservedName |
GetSpecializedParameter
(
formalParameter
)
|
Returns the value of the specified parameter.
Signature
virtual object Meta.Conduit.ParameterProvider.GetSpecializedParameter(ParameterInfo formalParameter) Parameters formalParameter: ParameterInfo
The formal parameter.
Returns object
The actual (supplied) invocation value for the parameter.
|
SupportedSpecializedParameter
(
formalParameter
)
|
Returns true if the specified parameter can be resolved. GetSpecializedParameter must be able to return a valid value if this method returns true.
Signature
virtual bool Meta.Conduit.ParameterProvider.SupportedSpecializedParameter(ParameterInfo formalParameter) Parameters formalParameter: ParameterInfo
The formal parameter.
Returns bool
True if this parameter can be resolved. False otherwise.
|
AddCustomType
(
name
, type
)
|
Add a custom known type (typically enum) to the provider. This should be called BEFORE calling any of the population methods.
Signature
void Meta.Conduit.ParameterProvider.AddCustomType(string name, Type type) Parameters name: string
The internal name of the type.
type: Type
The data type.
Returns void |
AddParameter
(
parameterName
, value
)
|
Explicitly adds, or replaces, a parameter.
Signature
void Meta.Conduit.ParameterProvider.AddParameter(string parameterName, object value) Parameters parameterName: string
The parameter name.
value: object
The parameter value.
Returns void |
ContainsParameter
(
parameter
, log
)
|
Returns true if a parameter with the specified name can be provided.
Signature
bool Meta.Conduit.ParameterProvider.ContainsParameter(ParameterInfo parameter, StringBuilder log) Parameters parameter: ParameterInfo
The name of the parameter.
log: StringBuilder
The log to write to.
Returns bool
True if a parameter with the specified name can be provided.
|
GetParameterNamesOfType
(
targetType
)
|
Returns a list of parameter names that hold values of the specified type. Note: This is an expensive operation.
Signature
List<string> Meta.Conduit.ParameterProvider.GetParameterNamesOfType(Type targetType) Parameters targetType: Type
The type we are querying.
Returns List< string >
The names of the parameters that match this type.
|
GetParameterValue
(
formalParameter
, parameterMap
, relaxed
)
|
Provides the actual parameter value matching the supplied formal parameter.
Signature
object Meta.Conduit.ParameterProvider.GetParameterValue(ParameterInfo formalParameter, Dictionary< string, string > parameterMap=null, bool relaxed=false) Parameters formalParameter: ParameterInfo
The formal parameter.
parameterMap: Dictionary< string, string >
A map from actual parameter names to formal parameter names. Used when parameters have been resolved using type, to identify their mapped names.
relaxed: bool
When true, will match by type when name matching fails.
Returns object
The actual parameter value matching the formal parameter or null if an error occurs.
|
GetParameterValue< T >
(
parameterName
, parameterMap
, relaxed
)
|
Provides the actual parameter value matching the supplied formal parameter.
Signature
T Meta.Conduit.ParameterProvider.GetParameterValue< T >(string parameterName, Dictionary< string, string > parameterMap=null, bool relaxed=false) Parameters parameterName: string
The name of the parameter to extract.
parameterMap: Dictionary< string, string >
A map from actual parameter names to formal parameter names. Used when parameters have been resolved using type, to identify their mapped names.
relaxed: bool
When true, will match by type when name matching fails.
Returns T
The actual parameter value matching the formal parameter or null if an error occurs.
|
GetRawParameterValue
(
parameterName
)
|
Signature
object Meta.Conduit.ParameterProvider.GetRawParameterValue(string parameterName) Parameters parameterName: stringReturns object |
PopulateParameters
(
actualParameters
)
|
Populates the parameters. Must be called after all parameters have been obtained and mapped but before any are read.
Signature
void Meta.Conduit.ParameterProvider.PopulateParameters(Dictionary< string, ConduitParameterValue > actualParameters) Parameters actualParameters: Dictionary< string, ConduitParameterValue >Returns void |
PopulateParametersFromNode
(
responseNode
)
|
Extracts Conduit parameters from a Wit.Ai response.
Signature
void Meta.Conduit.ParameterProvider.PopulateParametersFromNode(WitResponseNode responseNode) Parameters Returns void |
PopulateRoles
(
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.
Signature
void Meta.Conduit.ParameterProvider.PopulateRoles(Dictionary< string, string > parameterToRoleMap) Parameters parameterToRoleMap: Dictionary< string, string >
Keys are normalized lowercase internal (code) names. Values are fully qualified parameter names (roles).
Returns void |
SetSpecializedParameter
(
reservedParameterName
, parameterType
)
|
Registers a certain keyword as reserved for a specialized parameter.
Signature
void Meta.Conduit.ParameterProvider.SetSpecializedParameter(string reservedParameterName, Type parameterType) Parameters reservedParameterName: string
The name of the specialized parameter. For example
parameterType: Type
The data type of the parameter
Returns void |
ToString
()
|
Signature
override string Meta.Conduit.ParameterProvider.ToString() Returns override string |