InstallationManager.AddPackageAsync Metodo

Definizione

Overload

AddPackageAsync(String, Uri)

Avvia il processo di installazione per l'app specificata dal titolo dell'app e dall'URI della posizione.

AddPackageAsync(String, Uri, String, String, Uri)

Questa API non deve essere usata direttamente dal codice.

AddPackageAsync(String, Uri)

Avvia il processo di installazione per l'app specificata dal titolo dell'app e dall'URI della posizione.

public:
 static IAsyncOperationWithProgress<PackageInstallResult ^, unsigned int> ^ AddPackageAsync(Platform::String ^ title, Uri ^ sourceLocation);
/// [Windows.Foundation.Metadata.Overload("AddPackageAsync")]
 static IAsyncOperationWithProgress<PackageInstallResult, uint32_t> AddPackageAsync(winrt::hstring const& title, Uri const& sourceLocation);
[Windows.Foundation.Metadata.Overload("AddPackageAsync")]
public static IAsyncOperationWithProgress<PackageInstallResult,uint> AddPackageAsync(string title, System.Uri sourceLocation);
function addPackageAsync(title, sourceLocation)
Public Shared Function AddPackageAsync (title As String, sourceLocation As Uri) As IAsyncOperationWithProgress(Of PackageInstallResult, UInteger)

Parametri

title
String

Platform::String

winrt::hstring

Nome dell'app da installare.

sourceLocation
Uri Uri

Percorso URI dell'app da installare.

Restituisce

IAsyncOperationWithProgress<PackageInstallResult,UInt32>

Windows.Foundation.IAsyncOperationWithProgress<Windows.Phone.Management.Deployment.PackageInstallResult,unsigned int>

IAsyncOperationWithProgress<PackageInstallResult,uint32_t>

Operazione asincrona che rappresenta il processo di installazione.

Attributi

Esempio

void InstallMyCoolApp()
{
    Uri uri = new Uri(@"https://PlaceHolderServerName/XAP/MyCoolApp.xap");
    string appTitle = "Cool App";

    Windows.Foundation.IAsyncOperationWithProgress<PackageInstallResult, uint> result;

    // Queue up an installation request.
    result = InstallationManager.AddPackageAsync(appTitle, uri);

    // Note: You could save "result" as a member variable to enable 
    // the installation to be cancelled later.
}

Vedi anche

Si applica a

AddPackageAsync(String, Uri, String, String, Uri)

Questa API non deve essere usata direttamente dal codice.

public:
 static IAsyncOperationWithProgress<PackageInstallResult ^, unsigned int> ^ AddPackageAsync(Platform::String ^ title, Uri ^ sourceLocation, Platform::String ^ instanceId, Platform::String ^ offerId, Uri ^ license);
/// [Windows.Foundation.Metadata.Overload("AddPackagePreloadedAsync")]
 static IAsyncOperationWithProgress<PackageInstallResult, uint32_t> AddPackageAsync(winrt::hstring const& title, Uri const& sourceLocation, winrt::hstring const& instanceId, winrt::hstring const& offerId, Uri const& license);
[Windows.Foundation.Metadata.Overload("AddPackagePreloadedAsync")]
public static IAsyncOperationWithProgress<PackageInstallResult,uint> AddPackageAsync(string title, System.Uri sourceLocation, string instanceId, string offerId, System.Uri license);
function addPackageAsync(title, sourceLocation, instanceId, offerId, license)
Public Shared Function AddPackageAsync (title As String, sourceLocation As Uri, instanceId As String, offerId As String, license As Uri) As IAsyncOperationWithProgress(Of PackageInstallResult, UInteger)

Parametri

title
String

Platform::String

winrt::hstring

Questa API non deve essere usata direttamente dal codice.

sourceLocation
Uri Uri

Questa API non deve essere usata direttamente dal codice.

instanceId
String

Platform::String

winrt::hstring

Questa API non deve essere usata direttamente dal codice.

offerId
String

Platform::String

winrt::hstring

Questa API non deve essere usata direttamente dal codice.

license
Uri Uri

Questa API non deve essere usata direttamente dal codice.

Restituisce

IAsyncOperationWithProgress<PackageInstallResult,UInt32>

Windows.Foundation.IAsyncOperationWithProgress<Windows.Phone.Management.Deployment.PackageInstallResult,unsigned int>

IAsyncOperationWithProgress<PackageInstallResult,uint32_t>

Questa API non deve essere usata direttamente dal codice.

Attributi

Requisiti Windows

Funzionalità dell'app
oemDeployment

Vedi anche

Si applica a