Click or drag to resize

TryCastWorkerTValue Class

Inheritance Hierarchy
SystemObject
  TomsToolbox.DesktopTryCastWorkerBaseTValue, Object
    TomsToolbox.DesktopTryCastWorkerTValue

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll)
Syntax
public class TryCastWorker<TValue> : TryCastWorkerBase<TValue, Object>
where TValue : class

Type Parameters

TValue
The type of the value.

The TryCastWorkerTValue type exposes the following members.

Properties
Methods
  NameDescription
Public methodElse
Executes the action if no previous cast has succeeded.
Public methodElseThrow
Throws an InvalidOperationException if none of the casts have succeeded.
(Inherited from TryCastWorkerBaseTValue, TResult.)
Public methodElseThrow(String)
Throws an InvalidOperationException if none of the casts have succeeded.
(Inherited from TryCastWorkerBaseTValue, TResult.)
Public methodReturningTResult
Adds a return value to the fluent chain.
Public methodReturningTResult(TResult)
Adds a return value to the fluent chain.
Protected methodTryExecuteTTarget
Tries to cast the value and executes the action if the cast was successful.
(Inherited from TryCastWorkerBaseTValue, TResult.)
Public methodWhenTTarget
Tries to cast the value to TTarget; if the cast succeeds, the action is executed.
Top
Extension Methods
See Also