Metered Licensing
Aspose.Medical for .NET Plugins empower developers by implementing a metered licensing mechanism. This flexible approach allows you to utilize features based on your specific needs while maintaining compliance with licensing terms.
Key Features of the Metered Licensing Model
- Single Plugin Licensing: Each application instance can only license one plugin. If you attempt to access features outside the licensed scope, your application will automatically switch to trial mode. This feature encourages users to explore additional functionalities without immediate financial commitments. For more details, check out the Metered Licensing FAQ .
- Trial Mode: Experience the benefits of the plugin without upfront costs. This mode allows exploration of additional features, providing a risk-free opportunity to assess the software.
To purchase licenses, visit the Aspose Purchase Portal .
Evaluation Version Limitations
While Aspose.Medical evaluation version (without a license specified) provides full product functionality, it has the following limitations:
- Inserts an evaluation watermark on rendered images
- Adds a license message during save operations
- Some tags cannot be anonymized using the evaluation version
- DICOM transcoding is not available with the evaluation version
How to Implement Metered Licensing in .NET
Follow this step-by-step guide to configure the Metered class for your plugin licensing needs:
- Instantiate the Metered Class: Create an instance of the Metered class.
- Set Your Keys: Use the
SetMeteredKeymethod to enter your public and private keys. - Perform Processing Tasks: Execute the necessary tasks using the plugin.
- Monitor Consumption: Utilize the
GetConsumptionQuantitymethod to track the total number of API requests consumed.
Example of Metered Licensing Implementation
Here’s a practical example demonstrating how to set your metered keys:
// Create a Metered instance
Aspose.Medical.Metered metered = new Aspose.Medical.Metered();
// Set your public and private metered keys
metered.SetMeteredKey("<your public key>", "<your private key>");
// Perform DICOM processing operations
Aspose.Medical.Dicom.DicomFile dicomFile = DicomFile.Open("sample.dcm");
// Check consumption after processing
decimal consumption = Aspose.Medical.Metered.GetConsumptionQuantity();
Console.WriteLine($"API requests consumed: {consumption}");For additional examples and detailed usage, refer to the Developer Guide .
Applying a Traditional License
If you prefer a traditional license file instead of metered licensing, you can apply it using the License class:
From File
// Instantiates the License class
Aspose.Medical.License license = new();
// Sets the license file path
license.SetLicense("Aspose.Medical.lic");From Stream
// Instantiates the License class
Aspose.Medical.License license = new();
// Sets the license from a stream
license.SetLicense(licenseStream);As Embedded Resource
// Instantiates the License class
Aspose.Medical.License license = new();
// Passes the license file name embedded in the assembly
license.SetLicense("Aspose.Medical.lic");Note: The license.SetLicense method is not thread-safe. If this method has to be called simultaneously from many threads, you may want to use synchronization primitives (like a lock) to avoid issues.
Benefits of Metered Licensing for .NET Developers
Choosing a metered licensing solution offers several advantages:
- Cost-Effective: Pay only for the features you actually use, reducing overall costs.
- Scalability: Easily adjust your licensing as your application requirements evolve.
- Transparency: Monitor your usage with the
GetConsumptionQuantitymethod to understand how much you’re consuming. - Flexibility: Explore additional features in trial mode before making a purchase decision.
Comparing Licensing Models
When considering your options, it’s important to understand the differences between metered licensing and traditional licensing:
| Feature | Metered Licensing | Traditional License |
|---|---|---|
| Payment Model | Pay-as-you-go | One-time or subscription |
| Usage Tracking | Built-in consumption monitoring | Not applicable |
| Flexibility | Scale up/down based on usage | Fixed feature set |
| Initial Cost | Lower upfront investment | Higher initial purchase |
Security Considerations
Keep your metered keys secure:
- Never expose keys in client-side code or public repositories
- Store keys in secure configuration or environment variables
- Use separate keys for development and production environments
- Monitor consumption for unexpected usage patterns
Conclusion
Maximize the potential of Aspose.Medical for .NET with metered licensing, designed to adapt to the dynamic needs of developers while ensuring cost-efficiency. Whether you’re building a healthcare application, a PACS system, or a medical research tool, understanding metered licensing can significantly enhance your project’s financial management.