public interface ILicense
Provides methods to license the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.License license = new License(); license.setLicense("MyLicense.lic");
Modifier and Type | Method and Description |
---|---|
boolean |
isLicensed()
Deprecated.
The property is deprecated and will be removed after release of version 19.12.
|
void |
resetLicense()
Reset the license
|
void |
setLicense(java.io.InputStream stream)
Licenses the component.
|
void |
setLicense(java.lang.String licenseName)
Licenses the component.
|
void setLicense(java.lang.String licenseName)
Licenses the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.License license = new License(); license.setLicense("MyLicense.lic");
licenseName
- Can be a full or short file name or name of an embedded resource.
Use an empty string to switch to evaluation mode.
<p>Tries to find the license in the following locations:</p>
<p>1. Explicit path.</p>
<p>2. The folder of the component assembly.</p>
<p>3. The folder of the client's calling assembly.</p>
<p>4. The folder of the entry assembly.</p>
<p>5. An embedded resource in the client's calling assembly.</p>
<p><b>Note:</b>On the .NET Compact Framework, tries to find the license only in these locations:</p>
<p>1. Explicit path.</p>
<p>2. An embedded resource in the client's calling assembly.</p>
void setLicense(java.io.InputStream stream)
Licenses the component.
License license = new License(); license.setLicense(myStream);
stream
- A stream that contains the license.
<p>Use this method to load a license from a stream.</p>
void resetLicense()
Reset the license
License license = new License(); license.resetLicense();
@Deprecated boolean isLicensed()
Check if licence is applied to component
True
if component is licensed, otherwise false