Skip to content

Commit 499a4ea

Browse files
authored
updated readme for version 1.1.0
1 parent 702f8ad commit 499a4ea

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,28 @@
11
# Light.EmbeddedResources
22

33
[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://github.com/feO2x/Light.EmbeddedResources/blob/master/LICENSE)
4-
[![NuGet](https://img.shields.io/badge/NuGet-1.0.0-blue.svg?style=for-the-badge)](https://www.nuget.org/packages/Light.EmbeddedResources/)
4+
[![NuGet](https://img.shields.io/badge/NuGet-1.1.0-blue.svg?style=for-the-badge)](https://www.nuget.org/packages/Light.EmbeddedResources/)
55

66
### Get hold of embedded streams the easy way...
77

88
Are you one of the C# devs that doesn't know by heart how to get hold of an embedded resource? Light.EmbeddedResources makes it easy for you via extension methods:
99

1010
```csharp
11+
// Either get it as a stream
1112
using var stream = this.GetEmbeddedStream("EmailTemplate.html");
13+
14+
// ...or as a string
15+
string value = this.GetEmbeddedResource("EmailTemplate.html");
1216
```
1317

1418
If you work in a static method, you can use types:
1519

1620
```csharp
1721
using var stream = typeof(MyCurrentType).GetEmbeddedStream("EmailTemplate.html");
22+
string value = typeof(MyCurrentType).GetEmbeddedResource("EmailTemplate.html");
1823
```
1924

20-
Just make sure that the instance / the type you call `GetEmbeddedStream` on is in the same assembly and namespace as the resource you want to retrieve.
25+
Just make sure that the instance / the type you call `GetEmbeddedStream` or `GetEmbeddedResource` on is in the same assembly and namespace as the resource you want to retrieve.
2126

2227
### ...or copy them to files
2328

@@ -72,14 +77,14 @@ public class SomeService
7277
Light.EmbeddedResources is compiled for
7378

7479
- .NET Standard 2.0
75-
- .NET Core 3.0
80+
- .NET 5.0
7681

7782
and runs on all platforms that support these (like full .NET Framework, Mono, Xamarin, Unity, UWP, etc.).
7883

7984
## How to install
8085

8186
Light.EmbeddedResources is available as a [NuGet package](https://www.nuget.org/packages/Light.EmbeddedResources/):
8287

83-
- via csproj: `<PackageReference Include="Light.EmbeddedResources" Version="1.0.0" />`
84-
- via .NET CLI: `dotnet add package Light.EmbeddedResources --version 1.0.0`
85-
- via VS Package Manager: `Install-Package Light.EmbeddedResources -Version 1.0.0`
88+
- via csproj: `<PackageReference Include="Light.EmbeddedResources" Version="1.1.0" />`
89+
- via .NET CLI: `dotnet add package Light.EmbeddedResources --version 1.1.0`
90+
- via VS Package Manager: `Install-Package Light.EmbeddedResources -Version 1.1.0`

0 commit comments

Comments
 (0)