Skip to content

Commit 6aedc89

Browse files
committed
#842 add in properties for metadata etc
Signed-off-by: James Thompson <[email protected]>
1 parent 0636839 commit 6aedc89

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

CycloneDX/Services/NugetV3Service.cs

+20-1
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ private static Component SetupComponentProperties(Component component, NuspecMod
311311
{
312312
component.Publisher = component.Author;
313313
}
314-
314+
315315
var releaseNoteType = "internal";
316316
var version = nuspecModel.nuspecReader.GetVersion();
317317
if (version.IsPrerelease)
@@ -344,6 +344,25 @@ private static Component SetupComponentProperties(Component component, NuspecMod
344344
}
345345
]
346346
};
347+
348+
var properties = nuspecModel.nuspecReader.GetMetadata()
349+
.Select(x => new Property()
350+
{
351+
Name = x.Key,
352+
Value = x.Value
353+
})
354+
.ToList();
355+
properties.Add(new Property()
356+
{
357+
Name = "tags",
358+
Value = nuspecModel.nuspecReader.GetTags(),
359+
});
360+
properties.Add(new Property()
361+
{
362+
Name = "language",
363+
Value = nuspecModel.nuspecReader.GetLanguage()
364+
});
365+
component.Properties = properties;
347366
return component;
348367
}
349368

0 commit comments

Comments
 (0)