Прочетете на английски Редактиране

Споделяне чрез


ActivationContext.CreatePartialActivationContext Method

Definition

Initializes a new instance of the ActivationContext class.

Overloads

CreatePartialActivationContext(ApplicationIdentity)

Initializes a new instance of the ActivationContext class using the specified application identity.

CreatePartialActivationContext(ApplicationIdentity, String[])

Initializes a new instance of the ActivationContext class using the specified application identity and array of manifest paths.

CreatePartialActivationContext(ApplicationIdentity)

Initializes a new instance of the ActivationContext class using the specified application identity.

C#
public static ActivationContext CreatePartialActivationContext(ApplicationIdentity identity);

Parameters

identity
ApplicationIdentity

An object that identifies an application.

Returns

An object with the specified application identity.

Exceptions

identity is null.

No deployment or application identity is specified in identity.

Remarks

The CreatePartialActivationContext method calls an internal constructor to create a new activation context. The implementation of the ActivationContext class in the .NET Framework version 2.0 is designed for applications that are neither fully installed in a store nor fully contained in a folder. This method provides backward compatibility for later releases in which public constructors provide full activation contexts.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

CreatePartialActivationContext(ApplicationIdentity, String[])

Initializes a new instance of the ActivationContext class using the specified application identity and array of manifest paths.

C#
public static ActivationContext CreatePartialActivationContext(ApplicationIdentity identity, string[] manifestPaths);

Parameters

identity
ApplicationIdentity

An object that identifies an application.

manifestPaths
String[]

A string array of manifest paths for the application.

Returns

An object with the specified application identity and array of manifest paths.

Exceptions

identity is null.

-or-

manifestPaths is null.

No deployment or application identity is specified in identity.

-or-

identity does not match the identity in the manifests.

-or-

identity does not have the same number of components as the manifest paths.

Remarks

The CreatePartialActivationContext method calls an internal constructor to create a new activation context. The implementation of the ActivationContext class in the .NET Framework version 2.0 is designed for applications that are neither fully installed in a store nor fully contained in a folder. This method provides backward compatibility for later releases in which public constructors provide full activation contexts.

Applies to

.NET Framework 4.8.1 и други версии
Продукт Версии
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1