PreferenceSettingsMock.cs 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using System;
  2. using PixiEditor.Models.UserPreferences;
  3. namespace PixiEditorTests.Mocks
  4. {
  5. public class PreferenceSettingsMock : IPreferences
  6. {
  7. public void AddCallback(string setting, Action<object> action)
  8. {
  9. }
  10. public void AddCallback<T>(string name, Action<T> action)
  11. {
  12. }
  13. #nullable enable
  14. public T? GetLocalPreference<T>(string name)
  15. {
  16. return default;
  17. }
  18. public T? GetLocalPreference<T>(string name, T? fallbackValue)
  19. {
  20. return fallbackValue;
  21. }
  22. public T? GetPreference<T>(string name)
  23. {
  24. return default;
  25. }
  26. public T? GetPreference<T>(string name, T? fallbackValue)
  27. {
  28. return fallbackValue;
  29. }
  30. #nullable disable
  31. public void Init()
  32. {
  33. }
  34. public void Init(string path, string localPath)
  35. {
  36. }
  37. public void Save()
  38. {
  39. }
  40. public void UpdateLocalPreference<T>(string name, T value)
  41. {
  42. }
  43. public void UpdatePreference<T>(string name, T value)
  44. {
  45. }
  46. }
  47. }