![]() |
VOOZH | about |
dotnet add package SiLA2.Client.Dynamic --version 7.5.4
NuGet\Install-Package SiLA2.Client.Dynamic -Version 7.5.4
<PackageReference Include="SiLA2.Client.Dynamic" Version="7.5.4" />
<PackageVersion Include="SiLA2.Client.Dynamic" Version="7.5.4" />Directory.Packages.props
<PackageReference Include="SiLA2.Client.Dynamic" />Project file
paket add SiLA2.Client.Dynamic --version 7.5.4
#r "nuget: SiLA2.Client.Dynamic, 7.5.4"
#:package SiLA2.Client.Dynamic@7.5.4
#addin nuget:?package=SiLA2.Client.Dynamic&version=7.5.4Install as a Cake Addin
#tool nuget:?package=SiLA2.Client.Dynamic&version=7.5.4Install as a Cake Tool
SilA2 Client implementation is hosted at https://gitlab.com/SiLA2/sila_csharp/-/tree/master/src/SiLA2.Client.Dynamic . You´ll find an example implementation at https://gitlab.com/SiLA2/sila_csharp/-/blob/master/src/Tests/SiLA2.IntegrationTests.DynamicClientApp/ .
{
"DetailedErrors": true,
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Grpc": "Information",
"Microsoft": "Information"
}
},
"Connection": {
"FQHN": "127.0.0.1",
"Port": 50052,
"ServerDiscovery": {
"NIC": "Ethernet",
"ServiceName": "_sila._tcp"
}
}
}
You might adjust FQHN (IP or CIDR or Fully Qualified Host Name), Port and NIC (Network Interface e.g. Ethernet, eth0, WLAN0 etc.). ServiceName ist part of mDNS message suffix used for server search in local network.
var configBuilder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
var configuration = configBuilder.Build();
var client = new DynamicConfigurator(configuration, args);
_ = await client.GetFeatures();
or add known servers
_ = await client.GetFeatures(new[] { new ConnectionInfo("127.0.0.1", 50052) });
An Example Server can be found at https://gitlab.com/SiLA2/sila_csharp/-/tree/master/src/Tests/SiLA2.IntegrationTests.ServerApp but you could use any other SiLA2 Server implementation for example found in sila_python or sila_java...
private static void CallUnobservableProperty(IDynamicConfigurator client, GrpcChannel channel)
{
Console.WriteLine($"{Environment.NewLine}Calling unobservable property to get Server UUID...");
var silaServiceFeature = client.ServerFeatureMap[_connectionInfo].Values.Single(x => x.FullyQualifiedIdentifier == "org.silastandard/core/SiLAService/v1");
dynamic serverUUIDResponse = client.DynamicMessageService.GetUnobservableProperty("ServerUUID", channel, silaServiceFeature);
Console.WriteLine($"Response => ServerUUID: {serverUUIDResponse.ServerUUID.Value}");
}
private static void CallUnobservableCommand(IDynamicConfigurator client, GrpcChannel channel)
{
const string COMMAND_IDENTIFIER = "JoinIntegerAndString";
Console.WriteLine($"{Environment.NewLine}Calling Unobservable Command '{COMMAND_IDENTIFIER}' with Integer and String Parameter...");
int intVal = int.MinValue;
do
{
Console.WriteLine("Enter Integer");
string tmp = Console.ReadLine();
if (int.TryParse(tmp, out int intValTmp))
{
intVal = intValTmp;
break;
}
} while (true);
Console.WriteLine("Enter String");
string strVal = Console.ReadLine();
var unobservableCommandFeature = client.ServerFeatureMap[_connectionInfo].Values.Single(x => x.FullyQualifiedIdentifier == "org.silastandard/test/UnobservableCommandTest/v1");
Dictionary<string, object> payloadMap = new Dictionary<string, object> {
{ "Integer", new Sila2.Org.Silastandard.Protobuf.Integer { Value = intVal } },
{ "String", new Sila2.Org.Silastandard.Protobuf.String { Value = strVal } }
};
dynamic joinIntAndStringResponse = client.DynamicMessageService.ExecuteUnobservableCommand(COMMAND_IDENTIFIER, channel, unobservableCommandFeature, payloadMap);
Console.WriteLine($"Response => JoinedParameters: {joinIntAndStringResponse.JoinedParameters.Value}");
}
private async static Task CallObservableProperty(IDynamicConfigurator client, GrpcChannel channel)
{
const string PROPERTY_NAME = "Alternating";
Console.WriteLine($"{Environment.NewLine}Calling Observable Property returning alternating Boolean Value for 7 seconds...");
var silaObservablePropertyFeature = client.ServerFeatureMap[_connectionInfo].Values.Single(x => x.FullyQualifiedIdentifier == "org.silastandard/test/ObservablePropertyTest/v1");
var response = client.DynamicMessageService.SubcribeObservableProperty(PROPERTY_NAME, channel, silaObservablePropertyFeature);
var asyncEnumerator = response.GetAsyncEnumerator();
int i = 0;
while (await asyncEnumerator.MoveNextAsync() && i <= 7)
{
dynamic responseResultPropertyValue = asyncEnumerator.Current;
Console.WriteLine($"Response => {responseResultPropertyValue.Alternating.Value}");
i++;
}
}
private static async Task CallObservableCommand(DynamicConfigurator client, GrpcChannel channel)
{
const string OPERATION_NAME = "Count";
const double DELAY = 1.0;
Console.WriteLine($"{Environment.NewLine}Calling Observable Command for 7 seconds with delay of 1 second...");
var observableCommandFeature = client.ServerFeatureMap[_connectionInfo].Values.Single(x => x.FullyQualifiedIdentifier == "org.silastandard/test/ObservableCommandTest/v1");
IDictionary<string, object> payloadMap = new Dictionary<string, object> {
{ "N", new Sila2.Org.Silastandard.Protobuf.Integer { Value = 7 } },
{ "Delay", new Sila2.Org.Silastandard.Protobuf.Real { Value = DELAY } }
};
var response = client.DynamicMessageService.ExecuteObservableCommand(OPERATION_NAME, channel, observableCommandFeature, payloadMap);
var asyncEnumerator = response.Item2.GetAsyncEnumerator();
while (await asyncEnumerator.MoveNextAsync())
{
Console.WriteLine($"Response => {asyncEnumerator.Current.CommandStatus}");
if (asyncEnumerator.Current.CommandStatus == ExecutionInfo.Types.CommandStatus.FinishedSuccessfully
|| asyncEnumerator.Current.CommandStatus == ExecutionInfo.Types.CommandStatus.FinishedWithError)
{
break;
}
}
dynamic result = client.DynamicMessageService.GetObservableCommandResult(response.Item1.CommandExecutionUUID, OPERATION_NAME, channel, observableCommandFeature, response.Item3);
Console.WriteLine($"Result Response => Number of Iterations => {result.IterationResponse.Value}");
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net7.0 net7.0 is compatible. net7.0-android net7.0-android was computed. net7.0-ios net7.0-ios was computed. net7.0-maccatalyst net7.0-maccatalyst was computed. net7.0-macos net7.0-macos was computed. net7.0-tvos net7.0-tvos was computed. net7.0-windows net7.0-windows was computed. net8.0 net8.0 was computed. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 was computed. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.2.4 | 724 | 3/13/2026 |
| 10.2.3 | 121 | 3/7/2026 |
| 10.2.2 | 206 | 2/12/2026 |
| 10.2.1 | 141 | 1/25/2026 |
| 10.2.0 | 231 | 12/23/2025 |
| 10.1.0 | 184 | 11/29/2025 |
| 10.0.0 | 350 | 11/11/2025 |
| 9.0.4 | 262 | 6/25/2025 |
| 9.0.3 | 210 | 6/21/2025 |
| 9.0.2 | 256 | 1/6/2025 |
| 9.0.1 | 245 | 11/17/2024 |
| 9.0.0 | 225 | 11/13/2024 |
| 8.1.2 | 266 | 10/20/2024 |
| 8.1.1 | 261 | 8/31/2024 |
| 8.1.0 | 840 | 2/11/2024 |
| 8.0.0 | 301 | 11/15/2023 |
| 7.5.4 | 240 | 10/27/2023 |
| 7.5.3 | 312 | 7/19/2023 |
| 7.5.2 | 283 | 7/3/2023 |
| 7.5.1 | 300 | 6/2/2023 |