Skip to content

Commit 8d7f523

Browse files
committed
fix cs lang tags
1 parent a52de8f commit 8d7f523

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

hub/apps/develop/files/determine-availability-microsoft-onedrive-files.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ The following steps illustrate how to determine if a file is currently available
5252

5353
The following generic method illustrates how to enumerate any folder and return the collection of [StorageFile](/uwp/api/Windows.Storage.StorageFile) objects for that folder. The calling method then iterates over the returned collection referencing the [StorageFile.IsAvailable](/uwp/api/windows.storage.storagefile.isavailable) property for each file.
5454

55-
```cs
55+
```csharp
5656
/// <summary>
5757
/// Generic function that retrieves all files from the specified folder.
5858
/// </summary>

hub/apps/develop/files/music-pictures-videos-libraries.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ To get a reference to the user's Music, Pictures, or Video library, call the [St
4242
- [KnownLibraryId.Pictures](/uwp/api/windows.storage.knownfolders.pictureslibrary)
4343
- [KnownLibraryId.Videos](/uwp/api/windows.storage.knownfolders.videoslibrary)
4444

45-
```cs
45+
```csharp
4646
var myPictures = await Windows.Storage.StorageLibrary.GetLibraryAsync(Windows.Storage.KnownLibraryId.Pictures);
4747
```
4848

@@ -51,7 +51,7 @@ var myPictures = await Windows.Storage.StorageLibrary.GetLibraryAsync(Windows.St
5151

5252
To get the list of folders in a library, get the value of the [StorageLibrary.Folders](/uwp/api/windows.storage.storagelibrary.folders) property.
5353

54-
```cs
54+
```csharp
5555
using Windows.Foundation.Collections;
5656
IObservableVector<Windows.Storage.StorageFolder> myPictureFolders = myPictures.Folders;
5757
```
@@ -61,7 +61,7 @@ IObservableVector<Windows.Storage.StorageFolder> myPictureFolders = myPictures.F
6161

6262
To get the folder in a library where new files are saved by default, get the value of the [StorageLibrary.SaveFolder](/uwp/api/windows.storage.storagelibrary.savefolder) property.
6363

64-
```cs
64+
```csharp
6565
Windows.Storage.StorageFolder savePicturesFolder = myPictures.SaveFolder;
6666
```
6767

@@ -70,7 +70,7 @@ Windows.Storage.StorageFolder savePicturesFolder = myPictures.SaveFolder;
7070
To add a folder to a library, you call the [StorageLibrary.RequestAddFolderAsync](/uwp/api/windows.storage.storagelibrary.requestaddfolderasync). Taking the Pictures Library as an example, calling this method causes a folder picker to be shown to the user with an **Add this folder to Pictures** button. If the user picks a folder then the folder remains in its original location on disk and it becomes an item in the [StorageLibrary.Folders](/uwp/api/windows.storage.storagelibrary.folders) property (and in the built-in Photos app), but the folder does not appear as a child of the Pictures folder in File Explorer.
7171

7272

73-
```cs
73+
```csharp
7474
Windows.Storage.StorageFolder newFolder = await myPictures.RequestAddFolderAsync();
7575
```
7676

@@ -83,7 +83,7 @@ When you call [StorageLibrary.RequestRemoveFolderAsync](/uwp/api/windows.storage
8383
The following example assumes that the user has selected the folder to remove from a [ListView](/uwp/api/Windows.UI.Xaml.Controls.ListView) control named lvPictureFolders.
8484

8585

86-
```cs
86+
```csharp
8787
bool result = await myPictures.RequestRemoveFolderAsync(folder);
8888
```
8989

@@ -93,7 +93,7 @@ bool result = await myPictures.RequestRemoveFolderAsync(folder);
9393
To get notified about changes to the list of folders in a library, register a handler for the [StorageLibrary.DefinitionChanged](/uwp/api/windows.storage.storagelibrary.definitionchanged) event of the library.
9494

9595

96-
```cs
96+
```csharp
9797
myPictures.DefinitionChanged += MyPictures_DefinitionChanged;
9898

9999
void HandleDefinitionChanged(Windows.Storage.StorageLibrary sender, object args)
@@ -125,7 +125,7 @@ Users or apps may also store media files outside the media library folders on th
125125

126126
To get a collection of files, specify the library and the type of files that you want.
127127

128-
```cs
128+
```csharp
129129
using Windows.Storage;
130130
using Windows.Storage.Search;
131131

@@ -171,7 +171,7 @@ The Camera Roll and the Saved Pictures folder do not support the deep queries.
171171

172172
If you want to let the user open a photo again later in the app that captured it, you can save the CreatorAppId with the photo's metadata by using code similar to the following example. In this example, testPhoto is a [StorageFile](/uwp/api/Windows.Storage.StorageFile).
173173

174-
```cs
174+
```csharp
175175
IDictionary<string, object> propertiesToSave = new Dictionary<string, object>();
176176

177177
propertiesToSave.Add("System.CreatorOpenWithUIOptions", 1);
@@ -186,7 +186,7 @@ When you access a media library by using a known folder such as KnownFolders.Pic
186186

187187
For example, when you run the following code, the file is not added to the media library. In the line of code, `using (var destinationStream = (await destinationFile.OpenAsync(FileAccessMode.ReadWrite)).GetOutputStreamAt(0))`, both the OpenAsync method and the GetOutputStreamAt method open a stream. However only the stream opened by the GetOutputStreamAt method is disposed as a result of the using statement. The other stream remains open and prevents saving the file.
188188

189-
```cs
189+
```csharp
190190
StorageFolder testFolder = await StorageFolder.GetFolderFromPathAsync(@"C:\test");
191191
StorageFile sourceFile = await testFolder.GetFileAsync("TestImage.jpg");
192192
StorageFile destinationFile = await KnownFolders.CameraRoll.CreateFileAsync("MyTestImage.jpg");
@@ -201,7 +201,7 @@ using (var sourceStream = (await sourceFile.OpenReadAsync()).GetInputStreamAt(0)
201201

202202
To use stream methods successfully to add a file to the media library, make sure to close all the streams that your code opens, as shown in the following example.
203203

204-
```cs
204+
```csharp
205205
StorageFolder testFolder = await StorageFolder.GetFolderFromPathAsync(@"C:\test");
206206
StorageFile sourceFile = await testFolder.GetFileAsync("TestImage.jpg");
207207
StorageFile destinationFile = await KnownFolders.CameraRoll.CreateFileAsync("MyTestImage.jpg");

hub/apps/develop/files/track-recently-used-files-folders.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Your app's MRU is represented by the [StorageItemMostRecentlyUsedList](/uwp/api/
3939

4040
- The files that your user picks are often files that they return to repeatedly. So consider adding picked files to your app's MRU as soon as they are picked. Here's how.
4141

42-
```cs
42+
```csharp
4343
Windows.Storage.StorageFile file = await picker.PickSingleFileAsync();
4444

4545
var mru = Windows.Storage.AccessCache.StorageApplicationPermissions.MostRecentlyUsedList;
@@ -61,13 +61,13 @@ Use the retrieval method most appropriate for the item you want to retrieve.
6161

6262
Here's how to get back the file we just added.
6363

64-
```cs
64+
```csharp
6565
StorageFile retrievedFile = await mru.GetFileAsync(mruToken);
6666
```
6767

6868
Here's how to iterate all the entries to get tokens and then items.
6969

70-
```cs
70+
```csharp
7171
foreach (Windows.Storage.AccessCache.AccessListEntry entry in mru.Entries)
7272
{
7373
string mruToken = entry.Token;

0 commit comments

Comments
 (0)