Skip to content

Commit 6c80f5f

Browse files
committed
chore: Add Information about the alternative for StorageFile usage by using Storage Extensions from Uno
1 parent de8a478 commit 6c80f5f

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

doc/external/StorageFile.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ Use the `Windows.Storage.StorageFile` API to read files from your app package. T
6262
> [!NOTE]
6363
> This sample utilizes `ISerializer` from Uno Extensions Serialization to deserialize the JSON content into a strongly-typed object.
6464
> See the [Serialization documentation](xref:Uno.Recipes.Serialization) for more details and the [Walkthrough: Serialize JSON with Source Generators](xref:Uno.Extensions.Serialization.HowTo) for guidance on setting it up.
65+
> [!TIP]
66+
> Alternatively to `StorageFile`, you can use [`IStorage` from Uno Extensions Storage](xref:Uno.Extensions.Storage.Overview), which not only allows you to replace it with only one simple call to `IStorage.ReadPackageFileAsync<TData>(string path)` to get the same result with build-in serialization support, but also to provide your own `ISerializer` implementation if needed.
67+
6568
- Using `LoadData` in `MockRecipeEndpoints`
6669

6770
```csharp

0 commit comments

Comments
 (0)