Share via


TransferTargetDiscoveryOptions.DataPackage Property

Definition

The DataPackage property gets the data package used to filter relevant transfer targets. This property specifies the content that is being shared.

public:
 property DataPackageView ^ DataPackage { DataPackageView ^ get(); };
/// [Windows.Foundation.Metadata.Experimental]
/// [get: Windows.Foundation.Metadata.Experimental]
DataPackageView DataPackage();
[Windows.Foundation.Metadata.Experimental]
public DataPackageView DataPackage { [Windows.Foundation.Metadata.Experimental] get; }
var dataPackageView = transferTargetDiscoveryOptions.dataPackage;
Public ReadOnly Property DataPackage As DataPackageView

Property Value

A DataPackageView object that represents the data package used for filtering.

Attributes

Examples

Example: Accessing the DataPackage Property

var dataPackage = options.DataPackage;
if (dataPackage != null)
{
    Console.WriteLine("DataPackage is set.");
}

Remarks

The DataPackage property allows applications to specify the content being shared, which helps in discovering transfer targets that can handle the specified data.

Usage Notes:

  • This property is read-only and must be set during the initialization of the TransferTargetDiscoveryOptions.
  • Use this property to ensure that only compatible transfer targets are discovered.

Applies to

See also