Skip to content

Commit 5124950

Browse files
committed
retrieve Includes package metadata for ContainerRegistry server
1 parent dbd2fa8 commit 5124950

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/code/PSResourceInfo.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,15 @@ public static bool TryConvertFromContainerRegistryJson(
10821082
{ "NormalizedVersion", metadata["NormalizedVersion"].ToString() }
10831083
};
10841084

1085+
var typeInfo = ParseHttpMetadataType(metadata["Tags"] as string[], out ArrayList commandNames, out ArrayList cmdletNames, out ArrayList dscResourceNames);
1086+
var resourceHashtable = new Hashtable {
1087+
{ nameof(PSResourceInfo.Includes.Command), new PSObject(commandNames) },
1088+
{ nameof(PSResourceInfo.Includes.Cmdlet), new PSObject(cmdletNames) },
1089+
{ nameof(PSResourceInfo.Includes.DscResource), new PSObject(dscResourceNames) }
1090+
};
1091+
1092+
var includes = new ResourceIncludes(resourceHashtable);
1093+
10851094
psGetInfo = new PSResourceInfo(
10861095
additionalMetadata: additionalMetadataHashtable,
10871096
author: metadata["Authors"] as String,
@@ -1090,7 +1099,7 @@ public static bool TryConvertFromContainerRegistryJson(
10901099
dependencies: metadata["Dependencies"] as Dependency[],
10911100
description: metadata["Description"] as String,
10921101
iconUri: null,
1093-
includes: null,
1102+
includes: includes,
10941103
installedDate: null,
10951104
installedLocation: null,
10961105
isPrerelease: (bool)metadata["IsPrerelease"],

0 commit comments

Comments
 (0)