en en en en en en en en en en en en en en en en en en en en en en en en en en en en en pt en en en en sv fr fr en en en en en
The A_PROVIDER_TYPE can be a default file-based which reads your license file or can be your custom type.
To let your application read the license, simply add below code to your project:
This enables FlexRule Runtime to read the FlexRule.License.lic file from the current location. The current location is where your application exec file exists. Or if your application is a web application, web API and etc, it will be the bin folder of the project.
You also can embed the license into your project. In order to do that, you can simply use the technique that we previously mentioned concerning the custom location for the license file.
Or add a file named FlexRuleLicenseProvider.cs to your project and copy the code below:
using System; using System.IO; using FlexRule.License; [assembly: LicenseProvider(typeof(MyLicenseProvider))] namespace MyCompany.MyApp { ///   /// This class reads the license file for the project ///   public class MyLicenseProvider : ILicenseProvider { public string ReadLicense() { string yourLicense="..."; // replace ... with your license content return yourLicense; } } }
When a custom provider is defined, for initializing your license, simply call the default override with no parameters: