Skip to content

Commit 5ba3189

Browse files
authored
Use addProperty() method in the demo
1 parent 803c17f commit 5ba3189

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

client_demo/netlicensing_client_demo.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ int main(int argc, char* argv[]) {
7979
Product newProduct;
8080
newProduct.setName("Demo product");
8181
newProduct.setNumber(productNumber);
82+
newProduct.addProperty("CustomKey", "CustomValue");
8283
Product product = ProductService::create(ctx, newProduct);
8384
std::cout << "Added product: " << product.getName().toString() << std::endl;
8485

@@ -135,6 +136,7 @@ int main(int argc, char* argv[]) {
135136
newProductModule.setName("Demo product module");
136137
newProductModule.setLicensingModel(LICENSING_MODEL_TRY_AND_BUY_NAME);
137138
newProductModule.setProductNumber(productNumber);
139+
newProductModule.addProperty("CustomKey", "CustomValue");
138140

139141
ProductModule productModule = ProductModuleService::create(ctx, newProductModule);
140142
std::cout << "Added product module: " << productModule.getName().toString() << std::endl;
@@ -192,6 +194,7 @@ int main(int argc, char* argv[]) {
192194
newLicenseTemplate.setAutomatic(false);
193195
newLicenseTemplate.setHidden(false);
194196
newLicenseTemplate.setProductModuleNumber(productModuleNumber);
197+
newLicenseTemplate.addProperty("CustomKey", "CustomValue");
195198
LicenseTemplate licenseTemplate = LicenseTemplateService::create(ctx, newLicenseTemplate);
196199
std::cout << "Added license template: " << licenseTemplate.getName().toString() << std::endl;
197200

@@ -243,6 +246,7 @@ int main(int argc, char* argv[]) {
243246
newLicensee.setName("Demo licensee");
244247
newLicensee.setNumber(licenseeNumber);
245248
newLicensee.setProductNumber(productNumber);
249+
newLicensee.addProperty("CustomKey", "CustomValue");
246250
Licensee licensee = LicenseeService::create(ctx, newLicensee);
247251
std::cout << "Added licensee: " << licensee.getName().toString() << std::endl;
248252

@@ -284,6 +288,7 @@ int main(int argc, char* argv[]) {
284288
newLicense.setLicenseTemplateNumber(licenseTemplateNumber);
285289
newLicense.setLicenseeNumber(licenseeNumber);
286290
newLicense.setPrice(FixedPoint("1.00"));
291+
newLicense.addProperty("CustomKey", "CustomValue");
287292
License license = LicenseService::create(ctx, newLicense);
288293
std::cout << "Added license: " << license.getName().toString() << std::endl;
289294

0 commit comments

Comments
 (0)