File tree Expand file tree Collapse file tree
src/PSADT/PSADT/AppManagement Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,7 +12,8 @@ public sealed record ManifestInformation
1212 /// Initializes a new instance of the <see cref="ManifestInformation"/> record based on the provided <see cref="IAppxManifestPackageId"/>.
1313 /// </summary>
1414 /// <param name="packageId">The package ID from which to initialize the package information.</param>
15- internal ManifestInformation ( IAppxManifestPackageId packageId )
15+ /// <param name="packageType">The type of the package (single package or bundle).</param>
16+ internal ManifestInformation ( IAppxManifestPackageId packageId , AppxPackageType packageType )
1617 {
1718 Name = packageId . GetName ( ) . ToString ( ) ;
1819 Architecture = ( Interop . APPX_PACKAGE_ARCHITECTURE ) packageId . GetArchitecture ( ) ;
@@ -22,6 +23,7 @@ internal ManifestInformation(IAppxManifestPackageId packageId)
2223 ResourceId = packageId . GetResourceId ( ) . ToString ( ) ;
2324 PackageFullName = packageId . GetPackageFullName ( ) . ToString ( ) ;
2425 PackageFamilyName = packageId . GetPackageFamilyName ( ) . ToString ( ) ;
26+ PackageType = packageType ;
2527 }
2628
2729 /// <summary>
@@ -58,5 +60,10 @@ internal ManifestInformation(IAppxManifestPackageId packageId)
5860 /// Gets the package family name.
5961 /// </summary>
6062 public string PackageFamilyName { get ; }
63+
64+ /// <summary>
65+ /// Gets the type of the package (single package or bundle) based on the presence of specific manifest files within the package archive.
66+ /// </summary>
67+ public AppxPackageType PackageType { get ; }
6168 }
6269}
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ private static ManifestInformation GetPackageManifestInformation(Uri packageUri)
6565 IAppxManifestPackageId packageId = manifestReader . GetPackageId ( ) ;
6666 try
6767 {
68- return new ( packageId ) ;
68+ return new ( packageId , AppxPackageType . Package ) ;
6969 }
7070 finally
7171 {
@@ -115,7 +115,7 @@ private static ManifestInformation GetBundleManifestInformation(Uri packageUri)
115115 IAppxManifestPackageId packageId = manifestReader . GetPackageId ( ) ;
116116 try
117117 {
118- return new ( packageId ) ;
118+ return new ( packageId , AppxPackageType . Bundle ) ;
119119 }
120120 finally
121121 {
You can’t perform that action at this time.
0 commit comments