Provides methods to license the component. More...
Inherits Object.
Public Member Functions | |
bool | get_IsLicensed () |
License () | |
Initializes a new instance of this class. More... | |
void | SetLicense (System::String licenseName) |
Licenses the component. More... | |
void | SetLicense (System::SharedPtr< System::IO::Stream > stream) |
Licenses the component. More... | |
void | SetLicense (System::SharedPtr< System::IO::FileInfo > licenseFile) |
Licenses the component. More... | |
Provides methods to license the component.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains
<ms> the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
</ms>
<java> the component jar file:
</java>
Aspose::Email::License::License | ( | ) |
Initializes a new instance of this class.
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains
<ms> the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
</ms>
<java> the component jar file:
</java>
bool Aspose::Email::License::get_IsLicensed | ( | ) |
void Aspose::Email::License::SetLicense | ( | System::SharedPtr< System::IO::FileInfo > | licenseFile | ) |
Licenses the component.
licenseFile | File of licenseSystem::IO::FileInfo. |
ArgumentNullException | licenseFile is null. |
System::IO::FileNotFoundException | The file is not found. |
System::UnauthorizedAccessException | The file is read-only or is a directory. |
System::IO::DirectoryNotFoundException | The specified path is invalid, such as being on an unmapped drive. |
System::IO::IOException | The file is already open. |
void Aspose::Email::License::SetLicense | ( | System::SharedPtr< System::IO::Stream > | stream | ) |
Licenses the component.
stream | A stream that contains the license. |
Use this method to load a license from a stream.
<javaName>void setLicense(java.io.InputStream stream)</javaName>
void Aspose::Email::License::SetLicense | ( | System::String | licenseName | ) |
Licenses the component.
Tries to find the license in the following locations:
1. Explicit path.
<ms>
2. The folder of the component assembly.
3. The folder of the client's calling assembly.
4. The folder of the entry assembly.
5. An embedded resource in the client's calling assembly.
Note:On the .NET Compact Framework, tries to find the license only in these locations:
1. Explicit path.
2. An embedded resource in the client's calling assembly.
</ms>
<java>
2. The folder of the component jar file.
</java>
In this example, an attempt will be made to find a license file named MyLicense.lic in the folder that contains
<ms> the component, in the folder that contains the calling assembly, in the folder of the entry assembly and then in the embedded resources of the calling assembly.
</ms>
<java> the component jar file:
</java>
licenseName | Can be a full or short file name<ms> or name of an embedded resource</ms>. Use an empty string to switch to evaluation mode. |