Here I will walk you through the code of the `GreenLight` asset in C#. I will try to compare it to Java when C# specific syntax is used.
This walkthrough is not the same as the [Java Light host walkthrough](/implementation/Light-host-walkthrough), because although both SDKs are "Eclipse BaSyx" and C# syntax and Java share a lot, the implementation share basically no similarities.
The discussed file `Program.cs` can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/a7a78842b8d27ee4233c1f6648f2fc2b44e93f39/cs-module/Program.cs).
The discussed file `GreenLightAdministrationShellService.cs` can be found [here](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/a7a78842b8d27ee4233c1f6648f2fc2b44e93f39/cs-module/GreenLightAdministrationShellService.cs).
## `Program.cs`
```cs
usingBaSyx.AAS.Server.Http;
usingBaSyx.API.Components;
usingBaSyx.Common.UI;
usingBaSyx.Common.UI.Swagger;
usingBaSyx.Discovery.mDNS;
usingBaSyx.Utils.Settings.Types;
usingBaSyx.Registry.Client.Http;
usingNLog;
usingNLog.Web;
namespaceGreenLightAdministrationShell{
```
We start by using other namespaces and declaring our own.
Namespaces can be compared to Java packages and `using` is like importing them.
Here we parse the [`ServerSettings.xml` file](https://gitlab.hrz.tu-chemnitz.de/vws-demo/vws-spielwiese/-/blob/a7a78842b8d27ee4233c1f6648f2fc2b44e93f39/cs-module/ServerSettings.xml) for our server settings.
We need a registry client to register and unregister our AAS at the remote registry.
The client also needs settings to know where to connect to.
The settings could also be placed in an XML file and an [example is provided](https://github.com/eclipse-basyx/basyx-dotnet-components/blob/main/BaSyx.Registry.Client.Http/RegistryClientSettings.xml) when installing the `BaSyx.Registry.Client.Http` dependency (only shown in the project map, not uploaded to the repository).
```cs
server.WebHostBuilder.UseNLog();
```
This makes our server use `NLog` as a logging tool.
Similar to the startup function there is an anonymous function called when the server shuts down.
It unregisters the AAS at the registry.
Be aware that this function is only called when the server is safely shut down (eg. pressing `Ctrl+C` in the console)! Otherwise, the AAS will remain in the registry but calls to it will fail.
Here we finally add our submodel service to the `GreenLightAdministrationShellService` so the submodel can be explored and operations on the submodel invoked.