OpenTAP 9.27
API Reference
Static Public Member Functions | List of all members
OpenTap.Package.PackageFileExtensions Class Reference

Extension methods to help manage ICustomPackageData on PackageFile objects. More...

Static Public Member Functions

static bool HasCustomData< T > (this PackageFile file)
 Returns if a specific custom data type is attached to the PackageFile. More...
 
static IEnumerable< T > GetCustomData< T > (this PackageFile file)
 Returns all elements attached to the PackageFile of the specified custom data type. More...
 
static void RemoveCustomData< T > (this PackageFile file)
 Removes all elements of a specific custom type that are attached to the PackageFile. More...
 

Detailed Description

Extension methods to help manage ICustomPackageData on PackageFile objects.

Member Function Documentation

◆ GetCustomData&lt; T &gt;()

static IEnumerable< T > OpenTap.Package.PackageFileExtensions.GetCustomData< T > ( this PackageFile  file)
inlinestatic

Returns all elements attached to the PackageFile of the specified custom data type.

Template Parameters
TThe type that inherits from ICustomPackageData
Parameters
file
Returns
List of ICustomPackageData
Type Constraints
T :ICustomPackageData 

◆ HasCustomData&lt; T &gt;()

static bool OpenTap.Package.PackageFileExtensions.HasCustomData< T > ( this PackageFile  file)
inlinestatic

Returns if a specific custom data type is attached to the PackageFile.

Template Parameters
TThe type that inherits from ICustomPackageData
Parameters
file
Returns
True if PackageFile has elements of specified custom types
Type Constraints
T :ICustomPackageData 

◆ RemoveCustomData&lt; T &gt;()

static void OpenTap.Package.PackageFileExtensions.RemoveCustomData< T > ( this PackageFile  file)
inlinestatic

Removes all elements of a specific custom type that are attached to the PackageFile.

Template Parameters
TThe type that inherits from ICustomPackageData
Parameters
file
Type Constraints
T :ICustomPackageData 

OpenTAP 9.27 API built Mon Jan 13 2025 14:24:09