TransferTargetDiscoveryOptions(DataPackageView) Constructor
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
dataPackageparameter is not null when calling this constructor. - Additional properties, such as
AllowedTargetAppIdsandMaxAppTargets, can be set after initialization.