Table of Contents

Class LiveSettings

Namespace
RDCore.SDK.Server.Configuration
Assembly
RDCore.SDK.dll

The settings a component was given by its client that take effect while it runs (Live), and what it hands down to the components it is the client of.

public sealed class LiveSettings : ILiveSettings
Inheritance
LiveSettings
Implements
Inherited Members

Remarks

A client says what its user set (LSP 3.17 §Configuration Request): the server asks with workspace/configuration, when it is initialized and whenever the client says something changed (workspace/didChangeConfiguration). The settings travel as a configuration section (LiveSettingsProtocol): the keys under Root, separated by :, as text - Server:Verbose is False.

Of what a client says, the live settings this component has (LiveSettingsTarget) are set on its settings objects, a value a setting cannot be left out; a live setting the client says nothing of takes the value it had when the component started back. A setting that is not live is not set: it is read when a component starts, from what its user set (UserSettingsStore). What is said of a setting this component does not have is another component's, and is handed down as it is.

A component no client has said anything to - the shell, which is the client of the others - hands down what its user set, as the user's settings say it now.

Constructors

LiveSettings(IEnumerable<LiveSettingsTarget>, SettingsSchema, IPlatformEnvironment)

The live settings of the user's settings of a platform: its settings objects, and its user's file.

public LiveSettings(IEnumerable<LiveSettingsTarget> targets, SettingsSchema schema, IPlatformEnvironment environment)

Parameters

targets IEnumerable<LiveSettingsTarget>

The settings objects of the component.

schema SettingsSchema

The settings of the component.

environment IPlatformEnvironment

Where the user's settings are.

LiveSettings(IEnumerable<LiveSettingsTarget>, SettingsSchema, string)

The settings a component was given by its client that take effect while it runs (Live), and what it hands down to the components it is the client of.

public LiveSettings(IEnumerable<LiveSettingsTarget> targets, SettingsSchema schema, string userSettingsPath)

Parameters

targets IEnumerable<LiveSettingsTarget>

The settings objects of the component.

schema SettingsSchema

The settings of the component: what is not one of its live settings is not passed down by it from its user's settings.

userSettingsPath string

The file of the user's settings (PathIn(IPlatformEnvironment)).

Remarks

A client says what its user set (LSP 3.17 §Configuration Request): the server asks with workspace/configuration, when it is initialized and whenever the client says something changed (workspace/didChangeConfiguration). The settings travel as a configuration section (LiveSettingsProtocol): the keys under Root, separated by :, as text - Server:Verbose is False.

Of what a client says, the live settings this component has (LiveSettingsTarget) are set on its settings objects, a value a setting cannot be left out; a live setting the client says nothing of takes the value it had when the component started back. A setting that is not live is not set: it is read when a component starts, from what its user set (UserSettingsStore). What is said of a setting this component does not have is another component's, and is handed down as it is.

A component no client has said anything to - the shell, which is the client of the others - hands down what its user set, as the user's settings say it now.

Properties

Current

What this component hands down to the components it is the client of: what its own client said, or - before that, and in a component that has no client - the live settings its user set, as the user's settings say them now. The keys are under Root, separated by :.

public IReadOnlyDictionary<string, string> Current { get; }

Property Value

IReadOnlyDictionary<string, string>

Methods

Apply(IReadOnlyDictionary<string, string>)

Takes what the client said the settings are, and sets the live ones on the settings objects.

public void Apply(IReadOnlyDictionary<string, string> settings)

Parameters

settings IReadOnlyDictionary<string, string>

The settings, by their keys under Root, separated by :.

Refresh()

Sets the live settings on the settings objects as the user's settings say them now: what a component that is no other's server does when its user changes a setting.

public void Refresh()

Events

Changed

Raised once the live settings were set again.

public event EventHandler? Changed

Event Type

EventHandler