Microsoft .NET Languages (C#, J#, VB .NET, C++ .NET) IntegrationFor .NET applications, SeaMAX includes a CLR component which encapsulates the SeaMAX Application Programmer's Interface across any .NET project. The project must be configured properly to reference the .NET assembly and deploy the native library. .NET Framework VersionThe SeaMAX .NET Assembly is a class library designed using version 2.0 of the .NET framework. Since SeaMAX targets this fundamental version, it is compatible with all subsequent versions of the framework. SeaMAX will always run under the application target framework version. Assembly ReferenceA .NET project must reference the SeaMAX .NET assembly located in the SeaMAX API install path ("Program Files\Sealevel Systems\SeaMAX\" or "Program Files (x86)\Sealevel Systems\SeaMAX\"). This can be accomplished by the following:
Deploy Native DLLThe .NET SeaMAX Assembly depends on the native SeaMAX.dll. The project can be configured to automatically deploy the native DLL at build time. This can be accomplished by the following:
Integrated DocumentationVisual Studio IntelliSense documentation is included. The documentation can be accessed in-line from the source editor whenever a member of the Sealevel namespace is accessed. Additionally, the Object Browser built into Visual Studio can be used to examine every class and member in the namespace. ExampleThe managed SeaMAX .NET component encapsulates SeaMAX into the Sealevel namespace. The methods provided in the .NET SeaMAX class conform to the SeaMAX API as documented, with the exception that the SeaMAX handle is concealed as a private variable within the class and is automatically created and destroyed. The following is an example of how to call SM_Open() and SM_Close() within a C# project after adding the Managed SeaMAX reference: Sealevel.SeaMAX sm = new Sealevel.SeaMAX(); if (sm.SM_Open("COM1") < 0) { // Error opening COM1 } if (sm.IsSeaMAXOpen) { sm.SM_Close(); } |
Generated on Mon Oct 3 2022. |