Del via


TransferTargetDiscoveryOptions(DataPackageView) Constructor

Definition

Initializes a new instance of the TransferTargetDiscoveryOptions class with the specified data package. This constructor allows applications to configure discovery options based on the content being shared.

public:
 TransferTargetDiscoveryOptions(DataPackageView ^ dataPackage);
 TransferTargetDiscoveryOptions(DataPackageView const& dataPackage);
public TransferTargetDiscoveryOptions(DataPackageView dataPackage);
function TransferTargetDiscoveryOptions(dataPackage)
Public Sub New (dataPackage As DataPackageView)

Parameters

dataPackage
DataPackageView

A DataPackageView object that specifies the content to be shared. This parameter is used to filter relevant transfer targets.

Examples

Example: Creating TransferTargetDiscoveryOptions with a DataPackage

var dataPackage = new DataPackageView();
var options = new TransferTargetDiscoveryOptions(dataPackage);
options.MaxAppTargets = 5;

Remarks

The constructor sets the DataPackage property and initializes the discovery options. Applications can use this constructor to ensure that only transfer targets compatible with the specified data package are discovered.

Usage Notes:

  • Ensure that the dataPackage parameter is not null when calling this constructor.
  • Additional properties, such as AllowedTargetAppIds and MaxAppTargets, can be set after initialization.

Applies to

See also