Edit

Share via


ContextItemManager.GetValue Method

Definition

Overloads

GetValue(Type)

When overridden in a derived class, returns an instance of the requested item type. If there is no context item with the given type, an empty item will be created.

GetValue<TItemType>()

Returns an instance of the requested item type. If there is no context item with the given type, an empty item will be created.

GetValue(Type)

When overridden in a derived class, returns an instance of the requested item type. If there is no context item with the given type, an empty item will be created.

public:
 abstract System::Activities::Presentation::ContextItem ^ GetValue(Type ^ itemType);
public abstract System.Activities.Presentation.ContextItem GetValue (Type itemType);
abstract member GetValue : Type -> System.Activities.Presentation.ContextItem
Public MustOverride Function GetValue (itemType As Type) As ContextItem

Parameters

itemType
Type

The type of item to return.

Returns

Returns ContextItem, which contains a context item of the requested type. If there is no item in the context for this type, a default one is created.

Exceptions

itemType is null.

Applies to

GetValue<TItemType>()

Returns an instance of the requested item type. If there is no context item with the given type, an empty item will be created.

public:
generic <typename TItemType>
 where TItemType : System::Activities::Presentation::ContextItem TItemType GetValue();
public TItemType GetValue<TItemType> () where TItemType : System.Activities.Presentation.ContextItem;
member this.GetValue : unit -> 'ItemType (requires 'ItemType :> System.Activities.Presentation.ContextItem)
Public Function GetValue(Of TItemType As ContextItem) () As TItemType

Type Parameters

TItemType

The type of item to return.

Returns

TItemType

Returns ContextItem, which contains a context item of the requested type. If there is no item in the context for this type, a default one is created.

Remarks

This generic method invokes the abstract GetValue method, which must be implemented for this method to provide the get type functionality.

Applies to