EasyLAPI for .NET
Here's one for you .NET Livelink developers. I love Christopher Meyer's EasyLAPI library from the Open Text Knowledge Centre. But of course, it's in Java and the Coding Hillbilly is strictly caffeine-free these days on account of his cholesterol.
The library was manageable enough that it didn't take too long to create a C# version. Some minor syntax changes and some other changes based on how I would do things if I were to write it from scratch in C# (most notable, replacing the Vector references with ArrayLists), and away I went.
Of course, that doesn't help you, the throngs of C# LAPI developers, in my readership. So I cleaned it up further, converted the comments to be .NET-like, and changed a couple of methods to properties as I saw fit. Resulting library is attached.
One fairly major change is the addition of a configuration handler for the sessions. The Java version used an .ini file to manage multiple sessions. I'm using a custom config section. The upshot is that you should include something like this in your app.config:
<LLSessions><Session name="local" server="localhost" port="2099" username="Admin" password="livelink" />
<Session name="dev" server="localhost" port="2099" username="Admin" password="lldev@dm1n" />
<Session name="test" server="localhost" port="2099" username="Admin" password="lltst@dm1n" />
<Session name="prod" server="localhost" port="2099" username="Admin" password="llprd@dm1n" />
</LLSessions>
Then in your code:
llSession = SessionProperties.getSession( "test" );
In my code, I also add a defaultSession key to my app settings which allows me to switch environments quickly and without having to re-compile the code. Ideally, I should have a defaultSession attribute on the LLSessions node but I haven't got that far yet. Also on tap is the ability to encrypt username and password. Wouldn't mind using the Enterprise Library for configuration as well but then I get into problems of having one version for .NET 1.1 and another for .NET 2.0 (and perhaps 3.0 but I doubt it). Plus I don't want to force people to use the Enterprise Library if they don't wanna.
It has been tested very little except to create some folders and some RM objects. The rest of the code is lifted directly from Christopher Meyer's version which seems to be pretty solid to my limited understanding of Java and LAPI in general. The commenting took more time than the conversion.