Portable.Licensing icon indicating copy to clipboard operation
Portable.Licensing copied to clipboard

Adding 'Company' to the Customer section of a license.

Open ritchritch opened this issue 7 years ago • 4 comments

Would you be able to provide some sample code to include the Company name in the customer section of a license?

So rather than this:

Portable.Licensing.License lic = license.LicensedTo("Persons Name", "[email protected]");

I would like to do something like this:

Portable.Licensing.License lic = license.LicensedTo("Persons Name", "[email protected]", "Company Name");

But it doesn't seem to work that way.

Thanks

ritchritch avatar Nov 12 '18 20:11 ritchritch

The third argument isn’t a string, it is a delegated Customer. So you would have to customer.setCompany(“company”) or something like that. Kind of odd. I am not near a place to test it; sorry.

brysmi avatar Nov 12 '18 21:11 brysmi

Thanks, that make sense, but I can’t make it work like that. I might be being stupid, if you could show me a code snippet when you get chance it would be hugley appreciated.

Thanks

ritchritch avatar Nov 14 '18 21:11 ritchritch

Hi, try it like this lic.LicensedTo(to => { to.Name = "Name"; to.Company = "Company\nAddress"; to.Email = "[email protected]"; } );

lordrak007 avatar Feb 02 '19 19:02 lordrak007

Brilliant, thanks, that works perfectly.

ritchritch avatar Feb 02 '19 21:02 ritchritch