WebSphere Message Broker™ V8.0.0.0 .NET Plugin Node API
ToTimeSpan Method (value, convertVia)
NamespacesIBM.Broker.PluginNBElementConvertToTimeSpan(NBElement, NBElementTimeSpanType)
SUMMARY
Returns the value of the NBElement passed in as a TimeSpan after first converting it to the convertVia type.
Declaration Syntax
C#Visual BasicVisual C++F#
public static TimeSpan ToTimeSpan(
	NBElement value,
	NBElementTimeSpanType convertVia
)
Public Shared Function ToTimeSpan ( _
	value As NBElement, _
	convertVia As NBElementTimeSpanType _
) As TimeSpan
public:
static TimeSpan ToTimeSpan(
	NBElement^ value, 
	NBElementTimeSpanType convertVia
)
static member ToTimeSpan : 
        value:NBElement * 
        convertVia:NBElementTimeSpanType -> TimeSpan 
Parameters
value (NBElement)
The element whose value is to be converted.
convertVia (NBElementTimeSpanType)
The type the value is first converted to.
Return Value
The current element's value converted to a TimeSpan data type using the specified conversion of the element.
Remarks
As there are multiple choices when converting from a broker type to a TimeSpan, this method allows you greater control over how the convertion is performed. The value is first converted to the convertVia type, and then subsequently converted to a TimeSpan.
Exceptions
ExceptionCondition
FormatExceptionThrown if the value can not be converted to a TimeSpan with the given conversion.

Assembly: IBM.Broker.Plugin (Module: IBM.Broker.Plugin) Version: 8.0.0.0