Click or drag to resize
AB4D logo

LicenseHelperEmbeddedLicenseAssembly Property

Gets or sets an Assembly that contains the embedded license key (its project contains the license.licx file as Embedded Resource).

Namespace:  Ab2d.Licensing.ReaderSvg
Assembly:  Ab2d.ReaderSvg (in Ab2d.ReaderSvg.dll) Version: 7.1.7295.1040
Syntax
C#
public static Assembly EmbeddedLicenseAssembly { get; set; }

Property Value

Type: Assembly
Remarks
Note Note
Ab2d.Licensing.ReaderSvg.LicenseHelper is available only in the commercial version (not in evaluation version).

When the project that is using ReaderSvg is compiled and the project contains the correct license.licx file, the compiler calls the licensing code in ReaderSvg that checks the installed license key and creates a runtime license key from it. The runtime license key is stored into the compiled assembly (the one that contains the license.licx) as embedded resource.

When the ReaderSvg is used in run-time the licensing code first tries to find the embedded runtime license key. Because from the ReaderSvg assembly it is not possible to get the assembly that references ReaderSvg, it is usually needed to check resources in multiple assemblies to find the one with embedded license key.

To prevent checking multiple assemblies, it is possible to manually specify the assembly that contains the embedded license key with setting the EmbeddedLicenseAssembly property.

Without setting the EmbeddedLicenseAssembly property, the licensing code will still find the embedded license key but this process will take a little bit longer.

IMPORTANT:
The EmbeddedLicenseAssembly must be set before the constructor of the ReaderSvg is called!
It is recommended that the EmbeddedLicenseAssembly is set in the constructor of the class that is using ReaderSvg and before call to InitializeComponent method.

Examples

The following code shows how to set the assembly in the constructor of the class that is using ReaderSvg.

public class MyClass()    
{
    public MyClass()
    {
        Ab2d.Licensing.ReaderSvg.LicenseHelper.EmbeddedLicenseAssembly = typeof(MyClass).Assembly;

        InitializeComponent();
    }
}
See Also