This feature would enable any developer to specify an additional parameter on each method in the Settings plugin to specify a name for the platform specific file. If it is null or empty string, then use default. This would fix #3 and #17.
This would be used to specify the shared preference name instead of using the default shared preferences. The FileCreationMode will be set to private because all other ones have been deprecated at this point according to documentation.
These use ApplicationDataContainers. By default we use the root, but the LocalSettings can actually have buckets of additional containers. So we can attempt to create additional containers and return it if necessary:
ApplicationDataContainer GetAppSettings(string fileName = null)
{
if (string.IsNullOrWhiteSpace(fileName))
return ApplicationData.Current.LocalSettings;
if (!ApplicationData.Current.LocalSettings.Containers.ContainsKey(fileName))
ApplicationData.Current.LocalSettings.CreateContainer(fileName, ApplicationDataCreateDisposition.Always);
return ApplicationData.Current.LocalSettings.Containers[fileName];
}
.NET 4.5/WP Silverlight
These use isolated storage, so no implementation to be used.
Feature Request:
This feature would enable any developer to specify an additional parameter on each method in the Settings plugin to specify a name for the platform specific file. If it is null or empty string, then use default. This would fix #3 and #17.
iOS
File name would be used to specify the SuiteName:
Android
This would be used to specify the shared preference name instead of using the default shared preferences. The FileCreationMode will be set to private because all other ones have been deprecated at this point according to documentation.
Implementation:
UWP and Win RT
These use ApplicationDataContainers. By default we use the root, but the LocalSettings can actually have buckets of additional containers. So we can attempt to create additional containers and return it if necessary:
.NET 4.5/WP Silverlight
These use isolated storage, so no implementation to be used.