Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
可以从 Aspose 网站的下载部分下载 Aspose.SVG for .NET 的免费评估版本: Download Aspose.SVG API。
评估版提供除以下功能之外的所有功能:
如果您想在没有评估限制的情况下尝试 Aspose.SVG,请请求 30 天的临时许可证。请参阅 How to get a Temporary License? 了解更多信息。
可以从文件 或流对象 加载许可证。 Aspose.SVG for .NET 将尝试在以下位置查找许可证:
设置许可证的最简单方法是将许可证文件放在与 Aspose.SVG.dll 文件相同的文件夹中,并指定文件名(不带路径),如下例所示。
如果您将任何其他 Aspose for .NET API 与 Aspose.SVG for .NET 一起使用,请指定许可证的命名空间,例如 Aspose.ThreeD.License。
应用许可证的最简单方法是将许可证文件放在与 Aspose.SVG.dll 文件相同的文件夹中,并仅指定文件名而不指定路径。
当您调用 SetLicense 方法时,您传递的许可证名称应该是许可证文件的名称。例如,如果您将许可证文件名更改为“Aspose.SVG.lic.xml”,则将该文件名传递给 ThreeD.SetLicense(…) 方法。
例子:
1// Initialize a license object
2Aspose.Svg.License svgLicense = new Aspose.Svg.License();
3
4// Apply the license using a file name
5svgLicense.SetLicense("Aspose.SVG.lic");以下示例显示如何从流加载许可证。
1// Initialize a license object
2Aspose.Svg.License svgLicense = new Aspose.Svg.License();
3
4// Open a license file stream
5using (var stream = new System.IO.FileStream("Aspose.SVG.lic", System.IO.FileMode.Open))
6{
7 // Apply the license using the stream
8 svgLicense.SetLicense(stream);
9}应用许可证的一种方法是使用文件或流对象进行设置。将许可证与应用程序打包并确保其不会丢失的另一种巧妙方法是将其作为嵌入式资源包含到调用组件的 DLL(包含在 Aspose.SVG 中)的程序集中。
要将许可证文件包含为嵌入资源:
以下代码片段用于设置许可证。
1// Initialize a license object
2Aspose.Svg.License svgLicense = new Aspose.Svg.License();
3
4// Apply the license using the embedded resource name
5svgLicense.SetLicense("Aspose.SVG.lic");Aspose.SVG for .NET API 允许开发人员应用计量许可证。这是一种新的许可机制。新的发牌机制将与现有的发牌方法同时使用。想要根据 API 功能的使用情况进行计费的客户可以使用计量许可。有关更多详细信息,请参阅 Metered Licensing FAQ 部分。
添加了新的类 Metered 以应用计量密钥。此代码示例演示如何设置计量公钥和私钥:
1// Initialize a metered object
2Aspose.Svg.Metered metered = new Aspose.Svg.Metered();
3
4// Apply the metered license using the public and private keys
5metered.SetMeteredKey("*****", "*****");Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.