WebSphere Message Broker™ V8.0.0.0 .NET Plugin Node API
ToNullableTimeSpan Method (value, format, convertVia)
NamespacesIBM.Broker.PluginNBElementConvertToNullableTimeSpan(NBElement, String, NBElementTimeSpanType)
SUMMARY
Returns the value of the NBElement passed in after first converting it to a Nullable<TimeSpan> if required using specified format and conversion.
Declaration Syntax
C#Visual BasicVisual C++F#
public static Nullable<TimeSpan> ToNullableTimeSpan(
	NBElement value,
	string format,
	NBElementTimeSpanType convertVia
)
Public Shared Function ToNullableTimeSpan ( _
	value As NBElement, _
	format As String, _
	convertVia As NBElementTimeSpanType _
) As Nullable(Of TimeSpan)
public:
static Nullable<TimeSpan> ToNullableTimeSpan(
	NBElement^ value, 
	String^ format, 
	NBElementTimeSpanType convertVia
)
static member ToNullableTimeSpan : 
        value:NBElement * 
        format:string * 
        convertVia:NBElementTimeSpanType -> Nullable<TimeSpan> 
Parameters
value (NBElement)
The element whose value is to be converted.
format (String)
The element whose value is to be converted.
convertVia (NBElementTimeSpanType)
The type conversion qualifier for element.
Return Value
The current element's value converted to a Nullable<TimeSpan> data type using the specified format and with the specified conversion of the element.
Remarks

As there are multiple choices when converting from a broker type to a Nullable<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 Nullable<TimeSpan>.

The format string uses the syntax documented in the Infocenter in the topic "Formatting and parsing dateTimes as strings (ak05616)".

Exceptions
ExceptionCondition
FormatExceptionThrown if the value can not be converted to a Nullable<TimeSpan> with the given format and conversion.

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