ข้ามไปยังเนื้อหา

Class PackagePolicy

เนื้อหานี้ยังไม่ได้แปลเป็นภาษาไทย แสดงเป็นภาษาอังกฤษแทน

Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll

Defines governance requirements for independently shipped module packages.

public sealed class PackagePolicy

objectPackagePolicy

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()

lets a host decide whether package loading should remain permissive or require stronger metadata such as declared versions, compatibility ranges, publisher provenance, or integrity hashes.

The policy applies to package assembly-path loads, manifest-file loads, and package-directory discovery. When stricter requirements are enabled, packages that do not declare the required metadata fail fast during engine build instead of loading ambiguously at runtime.

PackagePolicy(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)

Section titled “ PackagePolicy(bool, bool, bool, bool, bool, bool, bool, bool, bool, bool, bool)”

Creates a package policy.

public PackagePolicy(bool allowAssemblyPathPackages = true, bool requireVersion = false, bool requireMinimumEngineVersion = false, bool requireMaximumEngineVersion = false, bool requireSupportedTargetFrameworks = false, bool requirePublisherId = false, bool requireSignatureFingerprint = false, bool requireSignatureKeyId = false, bool requireSignatureValue = false, bool requireSignatureVerification = false, bool requireIntegritySha256 = false)

allowAssemblyPathPackages bool

true to allow raw assembly-path packages; otherwise package loads must come through a manifest-driven flow.

requireVersion bool

true to require a declared package version in cephalon.package.json.

requireMinimumEngineVersion bool

true to require compatibility.minimumEngineVersion.

requireMaximumEngineVersion bool

true to require compatibility.maximumEngineVersion.

requireSupportedTargetFrameworks bool

true to require compatibility.supportedTargetFrameworks.

requirePublisherId bool

true to require publisher.id.

requireSignatureFingerprint bool

true to require at least one declared signature entry to provide a signer fingerprint.

requireSignatureKeyId bool

true to require at least one declared signature entry to provide a signature key identifier.

requireSignatureValue bool

true to require at least one declared signature entry to provide a detached signature value.

requireSignatureVerification bool

true to require a successful cryptographic signature verification against a trusted public key.

requireIntegritySha256 bool

true to require integrity.sha256.

Gets a value indicating whether raw assembly-path packages are allowed.

public bool AllowAssemblyPathPackages { get; }

bool

Gets the default package policy.

public static PackagePolicy Default { get; }

PackagePolicy

Gets a value indicating whether the policy differs from the default baseline.

public bool HasValues { get; }

bool

Gets a value indicating whether package manifests must declare an integrity SHA-256 value.

public bool RequireIntegritySha256 { get; }

bool

Gets a value indicating whether package manifests must declare a maximum supported engine version.

public bool RequireMaximumEngineVersion { get; }

bool

Gets a value indicating whether package manifests must declare a minimum supported engine version.

public bool RequireMinimumEngineVersion { get; }

bool

Gets a value indicating whether package manifests must declare a stable publisher identifier.

public bool RequirePublisherId { get; }

bool

Gets a value indicating whether package manifests must declare a signer fingerprint on at least one signature entry.

public bool RequireSignatureFingerprint { get; }

bool

Gets a value indicating whether package manifests must declare a signature key identifier on at least one signature entry.

public bool RequireSignatureKeyId { get; }

bool

Gets a value indicating whether package manifests must declare a detached signature value on at least one signature entry.

public bool RequireSignatureValue { get; }

bool

Gets a value indicating whether package signatures must verify against a trusted public key.

public bool RequireSignatureVerification { get; }

bool

Gets a value indicating whether package manifests must declare supported target frameworks.

public bool RequireSupportedTargetFrameworks { get; }

bool

Gets a value indicating whether package manifests must declare a version.

public bool RequireVersion { get; }

bool

FromConfiguration(IConfiguration, string)

Section titled “ FromConfiguration(IConfiguration, string)”

Reads package policy from configuration.

public static PackagePolicy FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")

configuration IConfiguration

The root configuration that contains the engine section.

sectionPath string

The configuration path that should be interpreted as the engine settings section. The default value is .

PackagePolicy

The configured package policy, or when no values are supplied.