Skip to content

Example for a .NET application serving as a client connected to ShapeDiver using the Stargate service

License

Notifications You must be signed in to change notification settings

shapediver/StargateDotNetClientExample

Repository files navigation

ShapeDiver StargateDotNetClientExample

This repository contains an example standalone .NET console application which acts as a client for the ShapeDiver Stargate service. It is able to handle commands received from the ShapeDiver Platform (and from Apps built with App Builder) via the ShapeDiver Stargate service. Read more about connecting client applications to ShapeDiver here.

How to use this

The code provided in this repository makes it as easy as possible to integrate web applications implemented using .NET with ShapeDiver. Easily send data to and from ShapeDiver. This allows to extend .NET applications using the power of Grasshopper models running on ShapeDiver. ShapeDiver provides the most secure, scalable, reliable, and performant infrastructure to turn Grasshopper models into cloud applications.

Main entry point of the example application.

* Initializes the ShapeDiver .NET SDK and logs in to the ShapeDiver Platform. This requires a user on the ShapeDiver Platform.
* Creates a Stargate client and registers command handlers. 
* Handles commands sent from the ShapeDiver Platform via the Stargate service, until the user presses ESC.

This is were the login to the ShapeDiver Platform happens, see call to AuthenticateViaPlatform. This uses OAuth2 authorization code flow to authenticate the user and provides an access token to the application. A refresh token will be stored in the user's registry.

Dummy handler for getting data and files from the .NET application into a ShapeDiver App. Please see TODO comments in the code.

Dummy handler for exporting files from a ShapeDiver App to the .NET application. Please see TODO comments in the code.

Dummy handler for exporting trees of Grasshopper data from a ShapeDiver App to the .NET application. Please see TODO comments in the code.

Some screenshots can be found in folder Screenshots.

Related links

You can find a similar example for connecting web applications to ShapeDiver here.

About

Example for a .NET application serving as a client connected to ShapeDiver using the Stargate service

Resources

License

Stars

Watchers

Forks

Releases

No releases published