Apama API Reference for .NET  9.9.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Apama.Services.Scenario.ParameterTypeHelper Class Reference

A convenience helper class for ParameterType More...

Static Public Member Functions

static bool CanConvertString (string value, ParameterType parameterType)
 Utility method to check whether a string representation of a parameter value (in the format used by the Correlator) can be converted to a .NET object, based on its type identifier. More...
 
static object ConvertString (string value, ParameterType parameterType)
 Utility method to convert from the EPL string representation of a parameter value to a .NET object, based on its type identifier. More...
 
static ParameterType FromScenarioType (string value)
 Static utility method to determine the enum value from the scenario version of a type. More...
 
static string ToMonitorScriptType (ParameterType value)
 Get the MonitorScript type that is used internally within the correlator for variable of this type. More...
 
static string ToScenarioType (ParameterType value)
 Get the type as defined in the Scenario definition file (sdf), and which is also returned from the correlator. More...
 

Detailed Description

A convenience helper class for ParameterType

Member Function Documentation

static bool Apama.Services.Scenario.ParameterTypeHelper.CanConvertString ( string  value,
ParameterType  parameterType 
)
static

Utility method to check whether a string representation of a parameter value (in the format used by the Correlator) can be converted to a .NET object, based on its type identifier.

Parameters
valuethe stringified value to be decoded, in the format used by the Apama Correlator.
parameterTypethe type identifier to indicate which type to convert to. If None is specified, an exception will be thrown.
Returns
true if it can be decoded, false otherwise.
static object Apama.Services.Scenario.ParameterTypeHelper.ConvertString ( string  value,
ParameterType  parameterType 
)
static

Utility method to convert from the EPL string representation of a parameter value to a .NET object, based on its type identifier.

Note that this method is for decoding strings in the format used by the Correlator (see also the Apama.Event.Parser namespace for more classes to format and parse EPL strings). User interface code should normally use user-friendly locale-sensitive parsing methods instead.

If the value cannot be parsed, a warning is logged and a default value is returned; this method does not throw an exception unless the parameterType is None.

Parameters
valuethe stringified value to be decoded, in the format used by the Apama EPL.
parameterTypethe type identifier to indicate which type to convert to. If None is specified, an exception will be thrown.
Returns
an object of the correct type.
static ParameterType Apama.Services.Scenario.ParameterTypeHelper.FromScenarioType ( string  value)
static

Static utility method to determine the enum value from the scenario version of a type.

Returns
One of the static predefined instances of this class, or null for any error case.
Exceptions
ScenarioServiceExceptionIf the parameter does not represent a valid type.
static string Apama.Services.Scenario.ParameterTypeHelper.ToMonitorScriptType ( ParameterType  value)
static

Get the MonitorScript type that is used internally within the correlator for variable of this type.

Returns
a string that specifies the MonitorScript type, e.g. "string".
static string Apama.Services.Scenario.ParameterTypeHelper.ToScenarioType ( ParameterType  value)
static

Get the type as defined in the Scenario definition file (sdf), and which is also returned from the correlator.

Returns
a string that specifies the Scenario type, e.g. "enumeration".
Submit a bug or feature
Copyright (c) 2013-2015 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors. Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.