|
@@ -43,7 +43,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting.</param>
|
|
/// <param name="name">The name of the setting.</param>
|
|
/// <param name="value">The new value.</param>
|
|
/// <param name="value">The new value.</param>
|
|
- public void UpdatePreference<T>(string name, T value);
|
|
|
|
|
|
+ public void UpdatePreference<T>([RemotePreferenceConstant] string name, T value);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Updates a editor setting and calls all added callbacks.
|
|
/// Updates a editor setting and calls all added callbacks.
|
|
@@ -51,7 +51,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="value">The new value</param>
|
|
/// <param name="value">The new value</param>
|
|
- public void UpdateLocalPreference<T>(string name, T value);
|
|
|
|
|
|
+ public void UpdateLocalPreference<T>([LocalPreferenceConstant] string name, T value);
|
|
|
|
|
|
#nullable enable
|
|
#nullable enable
|
|
|
|
|
|
@@ -61,7 +61,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <returns>The setting or the default of <typeparamref name="T"/> if it has not been set yet</returns>
|
|
/// <returns>The setting or the default of <typeparamref name="T"/> if it has not been set yet</returns>
|
|
- public T? GetPreference<T>(string name);
|
|
|
|
|
|
+ public T? GetPreference<T>([RemotePreferenceConstant] string name);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Reads the user preference that is called <paramref name="name"/>, if the setting does not exist the default of <paramref name="fallbackValue"/> will be used
|
|
/// Reads the user preference that is called <paramref name="name"/>, if the setting does not exist the default of <paramref name="fallbackValue"/> will be used
|
|
@@ -69,7 +69,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <returns>The setting or the <paramref name="fallbackValue"/> if it has not been set yet</returns>
|
|
/// <returns>The setting or the <paramref name="fallbackValue"/> if it has not been set yet</returns>
|
|
- public T? GetPreference<T>(string name, T? fallbackValue);
|
|
|
|
|
|
+ public T? GetPreference<T>([RemotePreferenceConstant] string name, T? fallbackValue);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Reads the editor setting that is called <paramref name="name"/>, if the setting does not exist the deafult of <typeparamref name="T"/> will be used
|
|
/// Reads the editor setting that is called <paramref name="name"/>, if the setting does not exist the deafult of <typeparamref name="T"/> will be used
|
|
@@ -77,7 +77,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <returns>The editor setting or the default of <typeparamref name="T"/> if it has not been set yet</returns>
|
|
/// <returns>The editor setting or the default of <typeparamref name="T"/> if it has not been set yet</returns>
|
|
- public T? GetLocalPreference<T>(string name);
|
|
|
|
|
|
+ public T? GetLocalPreference<T>([LocalPreferenceConstant] string name);
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// Reads the editor setting that is called <paramref name="name"/>, if the setting does not exist the <paramref name="fallbackValue"/> will be used
|
|
/// Reads the editor setting that is called <paramref name="name"/>, if the setting does not exist the <paramref name="fallbackValue"/> will be used
|
|
@@ -85,7 +85,7 @@ public interface IPreferences
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <typeparam name="T">The <see cref="Type"/> of the setting</typeparam>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <param name="name">The name of the setting</param>
|
|
/// <returns>The editor setting or the <paramref name="fallbackValue"/> if it has not been set yet</returns>
|
|
/// <returns>The editor setting or the <paramref name="fallbackValue"/> if it has not been set yet</returns>
|
|
- public T? GetLocalPreference<T>(string name, T? fallbackValue);
|
|
|
|
|
|
+ public T? GetLocalPreference<T>([LocalPreferenceConstant] string name, T? fallbackValue);
|
|
|
|
|
|
protected static void SetAsCurrent(IPreferences provider)
|
|
protected static void SetAsCurrent(IPreferences provider)
|
|
{
|
|
{
|