Namespace: Daisi.SDK.Clients.V1.Host
client.SessionManager.Close() after you are done using it so that the session doesn't expire. Multiple unclosed sessions will knock your network rating.// Create the factory var factory = new SettingsClientFactory(); var hostId = "host-XXXX"; // Create the client var settingsClient = factory.Create(hostId);
SettingsSessionManager SessionManagerget GetAllSettingsResponse GetAll() AsyncUnaryCall<GetAllSettingsResponse> GetAllAsync() SetAllSettingsResponse SetAll(SetAllSettingsRequest) AsyncUnaryCall<SetAllSettingsResponse> SetAllAsync(SetAllSettingsRequest) Example for SettingsClient:
// You must know the Orc designated ID to use the SettingsClient
string hostId = "host-XXXX";
// Create the Factory
var settingsClientFactory = new SettingsClientFactory();
// Create the client
var settingsClient = settingsClientFactory.Create(hostId);
// Use settingClient to manage settings
var getAllResponse = settingsClient.GetAll();
var settings = getAllResponse.Settings;
// Get/Set settings as needed
var setAllRequest = new SetAllSettingsRequest()
{
Settings = settings
};
var setAllResponse = settingsClient.SetAll(setAllRequest);
Example in a Blazor component:
@inject Daisi.SDK.Clients.V1.Host.SettingsClientFactory SettingsFactory
@code {
private Daisi.SDK.Clients.V1.Host.SettingsClient settingsClient;
protected override void OnInitialized()
{
// Replace with your real Host ID.
string hostId = "host-XXX";
settingsClient = SettingsFactory.Create(hostId);
// Use settingClient to manage settings
}
}