Class PackagePolicy
Namespace: Cephalon.Engine.Configuration
Assembly: Cephalon.Engine.dll
Defines governance requirements for independently shipped module packages.
public sealed class PackagePolicyInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.ReferenceEquals(object?, object?), object.ToString()
Remarks
Section titled “Remarks”
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.
Constructors
Section titled “Constructors”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)Parameters
Section titled “Parameters”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.
Properties
Section titled “Properties”AllowAssemblyPathPackages
Section titled “ AllowAssemblyPathPackages”Gets a value indicating whether raw assembly-path packages are allowed.
public bool AllowAssemblyPathPackages { get; }Property Value
Section titled “Property Value”Default
Section titled “ Default”Gets the default package policy.
public static PackagePolicy Default { get; }Property Value
Section titled “Property Value”HasValues
Section titled “ HasValues”Gets a value indicating whether the policy differs from the default baseline.
public bool HasValues { get; }Property Value
Section titled “Property Value”RequireIntegritySha256
Section titled “ RequireIntegritySha256”Gets a value indicating whether package manifests must declare an integrity SHA-256 value.
public bool RequireIntegritySha256 { get; }Property Value
Section titled “Property Value”RequireMaximumEngineVersion
Section titled “ RequireMaximumEngineVersion”Gets a value indicating whether package manifests must declare a maximum supported engine version.
public bool RequireMaximumEngineVersion { get; }Property Value
Section titled “Property Value”RequireMinimumEngineVersion
Section titled “ RequireMinimumEngineVersion”Gets a value indicating whether package manifests must declare a minimum supported engine version.
public bool RequireMinimumEngineVersion { get; }Property Value
Section titled “Property Value”RequirePublisherId
Section titled “ RequirePublisherId”Gets a value indicating whether package manifests must declare a stable publisher identifier.
public bool RequirePublisherId { get; }Property Value
Section titled “Property Value”RequireSignatureFingerprint
Section titled “ RequireSignatureFingerprint”Gets a value indicating whether package manifests must declare a signer fingerprint on at least one signature entry.
public bool RequireSignatureFingerprint { get; }Property Value
Section titled “Property Value”RequireSignatureKeyId
Section titled “ RequireSignatureKeyId”Gets a value indicating whether package manifests must declare a signature key identifier on at least one signature entry.
public bool RequireSignatureKeyId { get; }Property Value
Section titled “Property Value”RequireSignatureValue
Section titled “ RequireSignatureValue”Gets a value indicating whether package manifests must declare a detached signature value on at least one signature entry.
public bool RequireSignatureValue { get; }Property Value
Section titled “Property Value”RequireSignatureVerification
Section titled “ RequireSignatureVerification”Gets a value indicating whether package signatures must verify against a trusted public key.
public bool RequireSignatureVerification { get; }Property Value
Section titled “Property Value”RequireSupportedTargetFrameworks
Section titled “ RequireSupportedTargetFrameworks”Gets a value indicating whether package manifests must declare supported target frameworks.
public bool RequireSupportedTargetFrameworks { get; }Property Value
Section titled “Property Value”RequireVersion
Section titled “ RequireVersion”Gets a value indicating whether package manifests must declare a version.
public bool RequireVersion { get; }Property Value
Section titled “Property Value”Methods
Section titled “Methods”FromConfiguration(IConfiguration, string)
Section titled “ FromConfiguration(IConfiguration, string)”Reads package policy from configuration.
public static PackagePolicy FromConfiguration(IConfiguration configuration, string sectionPath = "Engine")Parameters
Section titled “Parameters”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
Returns
Section titled “Returns”The configured package policy, or