It includes runtime state, application setup, consumer choices, guide information (such as the dictionary definitions in a dictionary app), also setup. App data is different from individual information, information that user creates and manages when working with an app. Individual facts include data or mass media records, email or telecommunications transcripts, or database data keeping material created by the consumer. Individual information may be useful or important to more than one app. Often, this is data that the individual desires to adjust or transmit as an entity in addition to the application it self, instance a document.
Important note about software information: The lifetime of the software data is tied to the lifetime of the application. In the event the app is removed, most of the software facts will be missing for that reason. Avoid using app information to store individual facts or whatever consumers might perceive as useful and irreplaceable. We recommend that the consumer’s libraries and Microsoft OneDrive be used to put this sort of details. App information is perfect for saving app-specific individual choices, configurations, and preferences.
Types of application facts
There’s two types of software information: setup and records.
Options
Incorporate configurations to store individual preferences and program condition tips. The application information API lets you easily produce and recover settings (we’re going to explain to you some examples after in this article).
Listed below are information type you can utilize for app options:
- UInt8, Int16, UInt16, Int32, UInt32, Int64, UInt64, Single, Increase
- Boolean
- Char16, String
- DateTime, TimeSpan
- For C#/.NET, usage: System.DateTimeOffset, System.TimeSpan
- GUID, Point, Size, Rect
- ApplicationDataCompositeValue: some relevant software options that really must be serialized and deserialized atomically. Use composite settings to quickly deal with atomic revisions of interdependent settings. The device ensures the integrity of composite settings during concurrent access and roaming. Composite settings become optimized for small quantities of data, and performance are bad if you use all of them for huge information units.
Records
Incorporate data to store binary data or to make it possible for your, personalized serialized sort.
Saving application data when you look at the application facts storage
When an app is actually setup, the system gives they unique per-user information stores for settings and data. You should not understand in which or how this data is available, since method is in charge of dealing with the real storing, ensuring that the data try held remote off their software and other users. The system furthermore preserves the items in these data storage once the consumer installs an update your software and eliminates the items in these facts sites totally and cleanly when your application was uninstalled.
Within their software information shop, each app provides system-defined underlying web directories: one for regional data files, one for wandering files, and something for temporary records. Your software can truly add new data files and latest bins to every among these root directories.
Local app https://www.datingmentor.org/australia-elite-dating/ data
Local app data ought to be useful any details that needs to be maintained between app classes and is perhaps not suitable for wandering app information. Information which is not applicable on various other gadgets must accumulated here nicely. There’s absolutely no basic proportions regulation on neighborhood information put. Use the local app facts save for information this cannot add up to wander as well as large information sets.
Access a nearby software data shop
Before you could read or compose neighborhood software data, you must recover a nearby application data shop. To access the neighborhood software data store, make use of the ApplicationData.LocalSettings home to have the app’s local configurations as an ApplicationDataContainer object. Utilize the ApplicationData.LocalFolder land to obtain the data files in a StorageFolder object. Use the ApplicationData.LocalCacheFolder residential property to get the folder inside neighborhood software data save where you are able to help save documents which are not included in back-up and restore.
Make and retrieve straightforward regional environment
To create or create an environment, make use of the ApplicationDataContainer.Values belongings to view the setup in localSettings container we had gotten in the previous action. This instance creates a setting known as exampleSetting .
To recover the style, you utilize similar ApplicationDataContainer.Values homes you familiar with create the style. This sample demonstrates how-to retrieve the environment we simply produced.
Create and access a local composite worth
To create or compose a composite benefits, make an ApplicationDataCompositeValue item. This sample produces a composite environment named exampleCompositeSetting and contributes it to the localSettings bin.