Shuaib
Shuaib

Reputation: 1579

In asp.net Portable.Licensing, what does .WithMaximumUtilization(1) mean and used?

Due to lack of documentation in Portable.Licensing, I was wondering what does the .WithMaximumUtilization(1) would do when a license is generated? Does this mean the license allowed 1 installation? If this is the case how is it validated?

var license = License.New()  
    .WithUniqueIdentifier(Guid.NewGuid())  
    .As(LicenseType.Trial)  
    .ExpiresAt(DateTime.Now.AddDays(30))  
    .WithMaximumUtilization(1) // What does this do?
    .WithProductFeatures(new Dictionary<string, string>  
        {  
            {"Sales Module", "yes"},  
            {"Purchase Module", "yes"},  
            {"Maximum Transactions", "10000"}  
        })  
    .LicensedTo("John Doe", "[email protected]")  
    .CreateAndSignWithPrivateKey(privateKey, passPhrase);

Upvotes: 4

Views: 397

Answers (1)

jgauffin
jgauffin

Reputation: 101156

The value is just assigned to the license.Quantity property.

You can use it however you want when validating the license.

Upvotes: 4

Related Questions