BinaryDOM / TextDOM Common API
There are several classes and definitions that are shared between BinaryDOM and TextDOM parts of library.Class FileManager
public static class FileManager
This is a service class for filenames and folders location management. Also, it contains settings for internal file operations.
| Constructor | Parameters | Description |
| static FileManager | None | Initializes FileManager with default values. |
| Property | Type | Description |
| static Valid | bool, get only | Returns true if file manager initialized successfully. |
| static TempPath | string, get/set | Get/Set a path for temporary file which will be used by BinaryDOM library. Default is a temp path for current user. |
| static PreswapSize | long, get/set | Get/Set size of data which could be stored in memory in BinStorage objects and BinValueArray objects.
If these objects contain more data, their contents will be stored in swapfiles in TempPath folder. Default value is 65536. |
| static PremapSize | long, get/set | Get/Set size of data which could be stored in memory in BinStorage objects and BinValueArray objects
instead of mapping to source file. Default value is 4096. |
| Method | Parameters | Description |
| static GetFileName | FileLocation loc, string name, returns string | Constructs a filename from the location path and name of a file. |
| static GetFolder | FileLocation loc, returns string | Gets a standard location path. |
Class Licenser
public static class Licenser
This is a service class for license management.
Your application can check current license status, obtain license information, or register BinaryDOM library.
In addition to registration, each license need to be activated online. Usually, BinaryDOM license service does this operation automatically, and status will be Activated rigth after registration. If it's unable to activate, you will see Registered status for some time, and, later, ActExpired status which does not allow to use the product. In this case, you need to get ActivationUrl property and open this URL on some internet-connected device. You will get activation code. This code should be used in ActivateLicense call.
On product uninstall, you need to call DeactivateLicense method. This action will allow you to use (resiter and activate) this license at different PC, or at the same PC later. If this method will fail, you may call DeactivationUrl property to use this URL for deactivation somewhere else.
To check a license status, just query Licensed or LicenseStatus properties.
| Property | Type | Description |
| static Licensed | bool, get only | Returns true if library is registered or activated. |
| static AllowedToRun | bool, get only | Returns true if library is registered or activated or trial period is not expired yet. |
| static Status | LicenseStatus, get only | Returns status of license check. |
| static LicenseInfo | LicenseInformation?, get only | Returns license information or null if error occurred. |
| static ActivationUrl | string, get only | Returns activation URL to activate the license manually. |
| static DeactivationUrl | string, get only | Returns deactivation URL to deactivate the license manually. |
| Method | Parameters | Description |
| static RegNow | string name, string key, returns bool | Tries to register a library with provided registration information and returns true on success, or false if registration attempt failed. |
| static ActivateLicense | string activationCode, returns bool | Tries to activate the license with provided activation code and returns true on success, or false if activation attempt failed. |
| static DeactivateLicense | None, returns bool | Tries to deactivate the license and returns true on success, or false if deactivation attempt failed. |
Structure LicenseInformation
public struct LicenseInformation
Provides BinaryDOM library license information.
Contains detailed license information if library is registered.
| Member | Description |
| LicenseType License | Type of license. |
| string RegistrationName | Name of licensee. |
| number LicenseId | ID of the license. |
Enumeration FileLocation
public enum FileLocation
Represents standard locations for BinaryDOM library files.
| Member | Description |
| LOC_ROOT | Root folder of BinaryDOM storage. |
| LOC_BINSCHEMAS | Folder where "standard" set of binary schemas is stored. |
| LOC_TEXTSCHEMAS | Folder where "standard" set of text schemas is stored. |
| LOC_INCLUDES | Folder where schema include files will be loaded from if path is not specified. |
| LOC_PLUGINS | Folder where BinaryDOM will load filter or function plug-ins from. |
Enumeration LicenseStatus
public enum LicenseStatus
Represents a result of license status.
"Internal state" means that this value itypically will not be returned from Status property. These situations happen in licenser workflow.
| Member | Description |
| Unchecked | Initial state, licenser did not check actual status yet. Internal state. |
| WriteError | Errorsaving license information. Internal state. |
| WrongIntData | Invalid licensing data stored. Internal state. |
| WrongExtData | Invalid data from user - user/keycode, activation key. Internal state. |
| WrongCall | This method need not to be called. Internal state. |
| Registered | Product is registered. |
| Unregistered | Product is unregistered yet. |
| Expired | Trial period is expired. |
| ActExpired | Activation period is expired. |
| ActDuplicated | Duplicate activation detected. Internal state. |
| ActNonExistent | Insufficient number of licenses or attempt to activate not-existing registration. Internal state. |
| Activated | License is activated. |
| CallOk | Operation completed successfully. Internal state. |
Enumeration LicenseType
public enum LicenseType
Represents a type of license.
| Member | Description |
| Individual | Registered (or unregistered yet) for individual use. |
| Education | Registered for qualified educational institution. |
| Business | Registered for business or non-profit organization user. |
Enumeration SeverityType
public enum SeverityType
Provides information about severity of validation error.
| Member | Description |
| Error | The message is an error. |
| Warning | The message is a warning. |
| Info | The message is informational, exception provided only as a containter of information. |
| Debug | The is debug message, exception provided only as a containter of information. |
Enumeration NodeOrder
public enum BinNodeOrder
Represents relative position between nodes.
| Member | Description |
| After | The current node of this navigator is after the current node of the provided navigator. |
| Before | The current node of this navigator is before the current node of the provided navigator. |
| Same | The two navigators are positioned on the same node. |
| Unknown | Relative order of the nodes cannot be determined. This could happen if two nodes belong to different documents. |
See also:
- About Miraplacid Binary and Text DOM Library
- Binary Data Definition Language
- BinPath Expression Language
- Text Data Definition Language
- BinaryDOM and TextDOM API
- Binary Schema Object Model (BinSOM) classes
- Binary Document Object Model (BinDOM) classes
- BinPath classes
- Binary Top-Level classes
- Text Schema Object Model (TextSOM) classes
- Text Document Object Model (TextDOM) classes
- Text Navigation classes
- Text Top-Level classes
- BinaryDOM / TextDOM Common classes
- Low-Level classes
- Extension Components
- BinaryDOM PowerShell Snapin
- BinaryDOM SDK examples
- TextDOM SDK examples
- Miraplacid Binary DOM SDK Main Page