RelationSwitchTArg(TArg, ActionVCard, TArg, ActionContactID, TArg) Method
Performs an
ActionT depending on the
Type of the
encapsulated value and allows to pass an argument to the delegates.
Namespace: FolkerKinzel.VCards.ModelsAssembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.0.1+a91cc3f0fd39aeb548e16006a60ca9dd10a304a2
public void Switch<TArg>(
TArg arg,
Action<VCard, TArg>? vCardAction = null,
Action<ContactID, TArg>? contactIDAction = null
)
Public Sub Switch(Of TArg) (
arg As TArg,
Optional vCardAction As Action(Of VCard, TArg) = Nothing,
Optional contactIDAction As Action(Of ContactID, TArg) = Nothing
)
public:
generic<typename TArg>
void Switch(
TArg arg,
Action<VCard^, TArg>^ vCardAction = nullptr,
Action<ContactID^, TArg>^ contactIDAction = nullptr
)
member Switch :
arg : 'TArg *
?vCardAction : Action<VCard, 'TArg> *
?contactIDAction : Action<ContactID, 'TArg>
(* Defaults:
let _vCardAction = defaultArg vCardAction null
let _contactIDAction = defaultArg contactIDAction null
*)
-> unit
- arg TArg
- The argument to pass to the delegates.
- vCardAction ActionVCard, TArg (Optional)
- null, or the ActionT to perform if the encapsulated
value is a VCard.
- contactIDAction ActionContactID, TArg (Optional)
- null, or the ActionT to perform if the encapsulated
value is a ContactID.
- TArg
- Generic type parameter for the type of the argument to pass
to the delegates.