Writing .NET libraries
Last updated: 02/04/2020
These page describes how to write .NET libraries for ArupCompute, snippets will be in C# but the same concepts can be translated to VB.NET.
Before starting a new library from scratch consider instead contributing to an existing one, like DesignCheck, as it provides out of the box a lot of nice features. If that's not for you, continue reading!
Want to see code already? Check out the sample library repo: https://github.com/arup-group/arupcompute-sample-library
You can also see a live version of it: https://compute.arup.digital/calcs/2118
Current Limitations
Before getting into how to write a library here is a list of existing limitations:
-
Methods that take as inputs objects, arrays, dictionaries and dates will only work if called from the REST API. Strings, numbers, enums, bools will all work fine in the web ui and clients as well
-
Accessing local assets is not permitted (aka any images, files, data not embedded in the dll). So don't try to save or read from disk (avoid System.IO , System.Path etc...)
-
All the references/dependencies of the library have to be distributed with the library (eg NuGet packages...)