Table of Contents

Method TryGetCollectionMetadata

Namespace
Xunit.Runner.Common
Assembly
xunit.v3.runner.common.dll

TryGetCollectionMetadata(string, bool)

Attempts to retrieve ITestCollectionMetadata from the cache (and optionally remove it).

public ITestCollectionMetadata? TryGetCollectionMetadata(string testCollectionUniqueID, bool remove = false)

Parameters

testCollectionUniqueID string

The unique ID of the test collection to retrieve.

remove bool

Set to true to remove the metadata after retrieval.

Returns

The cached metadata, if present; or null if there isn't any.

TryGetCollectionMetadata(ITestCollectionMessage)

Attempts to retrieve ITestCollectionMetadata from the cache.

public ITestCollectionMetadata? TryGetCollectionMetadata(ITestCollectionMessage message)

Parameters

message

The message that indicates which metadata to retrieve.

Returns

The cached metadata, if present; or null if there isn't any.