Skip to content

Commit 5ae4152

Browse files
Update add-license-key-ci-services.md (#1730)
* Update add-license-key-ci-services.md * Update add-license-key-ci-services.md --------- Co-authored-by: Dimitar Nikolov <[email protected]>
1 parent 000d3c9 commit 5ae4152

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

licensing/add-license-key-ci-services.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,32 @@ echo "Copying $(telerikLicense.secureFilePath) to $(Build.Repository.LocalPath)/
100100
Copy-Item -Path $(telerikLicense.secureFilePath) -Destination "$(Build.Repository.LocalPath)/telerik-license.txt" -Force
101101
````
102102

103+
### Using TelerikLicensing.Register method
104+
105+
As of version **1.6.7**, [Telerik.Licensing](https://www.nuget.org/packages/Telerik.Licensing) offers the parameterless `TelerikLicensing.Register()` method and the `TelerikLicensing.Register(…script key…)` method allowing the developers to validate the Telerik license when running in [AWS Lambda](https://docs.aws.amazon.com/lambda/latest/dg/welcome.html) functions, plugins, or a class library that uses Telerik Reporting consumed by any third-party software. It is necessary to upgrade the [Telerik.Licensing](https://www.nuget.org/packages/Telerik.Licensing/1.6.7) NuGet package to **1.6.7 or newer** version and call the `Register` method in the body of the function. Thus, the Telerik license will be validated, and the watermark should not be printed (for licensed users) in the generated document:
106+
107+
````C#
108+
namespace LicensingInLambda;
109+
110+
public class Function
111+
{
112+
public string FunctionHandler(string input, ILambdaContext context)
113+
{
114+
// Lambda function entry point
115+
116+
// This requires Telerik.Licensing to be added to the function project
117+
TelerikLicensing.Register();
118+
119+
// TODO: Reporting - generate PDF here
120+
121+
var entryAssembly = Assembly.GetEntryAssembly();
122+
var name = entryAssembly?.GetName();
123+
124+
return $"Entry assembly: {entryAssembly?.GetName()} ... {Class1.DoYourMagic()}";
125+
}
126+
}
127+
````
128+
103129
## See Also
104130

105131
* [License Activation Errors and Warnings]({%slug license-errors-and-warnings%})

0 commit comments

Comments
 (0)