ContextItemManager.Contains Method

Definition

Overloads

Contains(Type)

When overridden in a derived class, returns a value that indicates whether the item manager contains an item of the specified type.

Contains<TItemType>()

Returns a value that indicates whether the item manager contains an item of the specified type.

Contains(Type)

When overridden in a derived class, returns a value that indicates whether the item manager contains an item of the specified type.

C#
public abstract bool Contains(Type itemType);

Parameters

itemType
Type

The type of item to check for.

Returns

true if the context contains an instance of the specified item type; otherwise, false.

Exceptions

itemType is null.

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

Contains<TItemType>()

Returns a value that indicates whether the item manager contains an item of the specified type.

C#
public bool Contains<TItemType>() where TItemType : System.Activities.Presentation.ContextItem;

Type Parameters

TItemType

The type of item to check for.

Returns

true if the context contains an instance of the specified item type; otherwise, false.

Remarks

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

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1