From ced32df0a02f0c9bab16fb22c1c2d367ff80fc45 Mon Sep 17 00:00:00 2001 From: James Montemagno Date: Tue, 20 Jun 2017 10:15:19 -0700 Subject: [PATCH] Add settings cs.pp file back in for legacy reasons --- files/Settings.cs.pp | 60 +++++++++---------- files/SettingsPlatform.cs.pp | 60 +++++++++---------- nuget/Plugin.nuspec | 3 +- src/Plugin.Settings.Abstractions/ISettings.cs | 6 +- 4 files changed, 65 insertions(+), 64 deletions(-) diff --git a/files/Settings.cs.pp b/files/Settings.cs.pp index dcbda3a..a4f9f0a 100644 --- a/files/Settings.cs.pp +++ b/files/Settings.cs.pp @@ -4,40 +4,40 @@ namespace $rootnamespace$.Helpers { - /// - /// This is the Settings static class that can be used in your Core solution or in any - /// of your client applications. All settings are laid out the same exact way with getters - /// and setters. - /// - public static class Settings - { - private static ISettings AppSettings - { - get - { - return CrossSettings.Current; - } - } + /// + /// This is the Settings static class that can be used in your Core solution or in any + /// of your client applications. All settings are laid out the same exact way with getters + /// and setters. + /// + public static class Settings + { + private static ISettings AppSettings + { + get + { + return CrossSettings.Current; + } + } - #region Setting Constants + #region Setting Constants - private const string SettingsKey = "settings_key"; - private static readonly string SettingsDefault = string.Empty; + private const string SettingsKey = "settings_key"; + private static readonly string SettingsDefault = string.Empty; - #endregion + #endregion - public static string GeneralSettings - { - get - { - return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault); - } - set - { - AppSettings.AddOrUpdateValue(SettingsKey, value); - } - } + public static string GeneralSettings + { + get + { + return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault); + } + set + { + AppSettings.AddOrUpdateValue(SettingsKey, value); + } + } - } + } } \ No newline at end of file diff --git a/files/SettingsPlatform.cs.pp b/files/SettingsPlatform.cs.pp index 78f478c..ecade3e 100644 --- a/files/SettingsPlatform.cs.pp +++ b/files/SettingsPlatform.cs.pp @@ -5,40 +5,40 @@ namespace $rootnamespace$.Helpers { - /// - /// This is the Settings static class that can be used in your Core solution or in any - /// of your client applications. All settings are laid out the same exact way with getters - /// and setters. - /// - public static class Settings - { - private static ISettings AppSettings - { - get - { - return CrossSettings.Current; - } - } + /// + /// This is the Settings static class that can be used in your Core solution or in any + /// of your client applications. All settings are laid out the same exact way with getters + /// and setters. + /// + public static class Settings + { + private static ISettings AppSettings + { + get + { + return CrossSettings.Current; + } + } - #region Setting Constants + #region Setting Constants - private const string SettingsKey = "settings_key"; - private static readonly string SettingsDefault = string.Empty; + private const string SettingsKey = "settings_key"; + private static readonly string SettingsDefault = string.Empty; - #endregion + #endregion - public static string GeneralSettings - { - get - { - return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault); - } - set - { - AppSettings.AddOrUpdateValue(SettingsKey, value); - } - } + public static string GeneralSettings + { + get + { + return AppSettings.GetValueOrDefault(SettingsKey, SettingsDefault); + } + set + { + AppSettings.AddOrUpdateValue(SettingsKey, value); + } + } - } + } }*/ \ No newline at end of file diff --git a/nuget/Plugin.nuspec b/nuget/Plugin.nuspec index 4f0618f..43d9575 100644 --- a/nuget/Plugin.nuspec +++ b/nuget/Plugin.nuspec @@ -65,7 +65,8 @@ - + + diff --git a/src/Plugin.Settings.Abstractions/ISettings.cs b/src/Plugin.Settings.Abstractions/ISettings.cs index 8a19adb..9b26439 100644 --- a/src/Plugin.Settings.Abstractions/ISettings.cs +++ b/src/Plugin.Settings.Abstractions/ISettings.cs @@ -81,7 +81,7 @@ public interface ISettings /// Name of file for settings to be stored and retrieved /// Value or default Double GetValueOrDefault(string key, Double defaultValue, string fileName = null); - + /// /// Adds or updates the value @@ -155,7 +155,7 @@ public interface ISettings /// Name of file for settings to be stored and retrieved /// True of was added or updated and you need to save it. bool AddOrUpdateValue(string key, Double value, string fileName = null); - + /// /// Removes a desired key from the settings @@ -178,4 +178,4 @@ public interface ISettings /// True if contains key, else false bool Contains(string key, string fileName = null); } -} +} \ No newline at end of file