ComponentOne Scheduler for ASP.NET: ComponentOne Scheduler for ASP.NET AJAX Overview > Licensing FAQs > Common Scenarios > Inheriting from licensed components

Inheriting from licensed components

If a component that inherits from a licensed component is created, the licensing information to be stored in the form is still needed. This can be done in two ways:

      Add a LicenseProvider attribute to the component.

This will mark the derived component class as licensed. When the component is added to a form, Visual Studio will create and manage the licenses.licx file, and the base class will handle the licensing process as usual. No additional work is needed. For example:

    [LicenseProvider(typeof(LicenseProvider))]

    class MyGrid: C1.Win.C1FlexGrid.C1FlexGrid

    {

               // ...

    }

      Add an instance of the base component to the form.

This will embed the licensing information into the licenses.licx file as in the previous scenario, and the base component will find it and use it. As before, the extra instance can be deleted after the licenses.licx file has been created.

Please note, that ComponentOne licensing will not accept a run-time license for a derived control if the run-time license is embedded in the same assembly as the derived class definition, and the assembly is a DLL. This restriction is necessary to prevent a derived control class assembly from being used in other applications without a design- time license. If you create such an assembly, you will need to take one of the actions previously described create a component at run time.


Send comments about this topic to ComponentOne.
Copyright ComponentOne LLC. All rights reserved.