[GH-ISSUE #26] What are valid options for ProductFeatures #22

Open
opened 2026-02-26 01:35:48 +03:00 by kerem · 1 comment
Owner

Originally created by @emilaz on GitHub (Feb 1, 2023).
Original GitHub issue: https://github.com/junian/Standard.Licensing/issues/26

I was wondering where I can see what the .WithProductFeatures(Dictionary<string, string> productFeatures) function actually does and where I could see which options I could set there?

Originally created by @emilaz on GitHub (Feb 1, 2023). Original GitHub issue: https://github.com/junian/Standard.Licensing/issues/26 I was wondering where I can see what the `.WithProductFeatures(Dictionary<string, string> productFeatures)` function actually does and where I could see which options I could set there?
Author
Owner

@AntiGuideAkquinet commented on GitHub (Feb 24, 2023):

The function works with any string as it is only used to build up an XML file.

When using a setup like the one provided in the README:

var license = License.New()  
    .WithProductFeatures(new Dictionary<string, string>  
    {  
        {"Sales Module", "yes"},  
        {"Purchase Module", "yes"},  
        {"Maximum Transactions", "10000"}  
    })  
    .CreateAndSignWithPrivateKey(privateKey, passPhrase);

The output will look like this:

<License>
  <ProductFeatures>
    <Feature name="Sales Module">yes</Feature>
    <Feature name="Purchase Module">yes</Feature>
    <Feature name="Maximum Transactions">10000</Feature>
  </ProductFeatures>
  <Signature>MEYCIQCjUXX6ZS4fEItOIS1rmaeex9/INfKQnvpDLmmdRiOR3AIhALkmUK8p9y7BxqElmIMDrznBZOcp+e3ypNRBF9g3xyif</Signature>
</License>
<!-- gh-comment-id:1442891272 --> @AntiGuideAkquinet commented on GitHub (Feb 24, 2023): The function works with any string as it is only used to build up an XML file. When using a setup like the one provided in the README: ```C# var license = License.New() .WithProductFeatures(new Dictionary<string, string> { {"Sales Module", "yes"}, {"Purchase Module", "yes"}, {"Maximum Transactions", "10000"} }) .CreateAndSignWithPrivateKey(privateKey, passPhrase); ``` The output will look like this: ```xml <License> <ProductFeatures> <Feature name="Sales Module">yes</Feature> <Feature name="Purchase Module">yes</Feature> <Feature name="Maximum Transactions">10000</Feature> </ProductFeatures> <Signature>MEYCIQCjUXX6ZS4fEItOIS1rmaeex9/INfKQnvpDLmmdRiOR3AIhALkmUK8p9y7BxqElmIMDrznBZOcp+e3ypNRBF9g3xyif</Signature> </License> ```
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Standard.Licensing#22
No description provided.