Data location | Description | Examples |
---|---|---|
Resource files and content files | Read-only files included in your application package. Resource files are loaded automatically when loading the DLLs that contain them. Content files are loaded when you access them. | List of state capitals or background image. |
In-memory state dictionaries | Temporary storage used for short-term data storage while the application is deactivated. Temporary storage has a high speed, but the data in it is deleted after a few minutes, so that it is unreliable. Additional information will be provided in the “Restoring an application after decontamination” section. | The current control that is in focus. |
Isolated storage | Storage representing the file system of the phone used for long-term data storage between application sessions. Isolated storage has low speed, but is reliable. | User selected background color. |
Remote storage | Storage in the cloud or on the Internet, used to exchange data between multiple applications or multiple instances of a single application. Remote storage has low speed, asynchronous access and is sometimes unavailable, but provides the greatest flexibility. Remote data storage is a very extensive topic that goes beyond the scope of this article. | Web service that returns a list of wines. |
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
private static Car car; public static Car Car { get { if (car == null ) { // Initialize the car field using data retrieved from storage // or create a new Car object if there is no data in storage. // (The code for doing this is shown and described later.) } return car; } set { car = value ; } } * This source code was highlighted with Source Code Highlighter .
* This source code was highlighted with Source Code Highlighter .
- protected override void OnNavigatedTo (NavigationEventArgs e)
- {
- base .OnNavigatedTo (e);
- CarHeader.DataContext = CarDataStore.Car;
- // ... other code ...
- }
Source: https://habr.com/ru/post/118420/
All Articles