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.

Definition

Namespace: FolkerKinzel.VCards.Models
Assembly: FolkerKinzel.VCards (in FolkerKinzel.VCards.dll) Version: 8.1.0+9753915cd0f8006e7e5b4f62aa63aa3651006f06
C#
public void Switch<TArg>(
	TArg arg,
	Action<VCard, TArg>? vCardAction = null,
	Action<ContactID, TArg>? contactIDAction = null
)

Parameters

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.

Type Parameters

TArg
Generic type parameter for the type of the argument to pass to the delegates.

See Also