File tree Expand file tree Collapse file tree 5 files changed +66
-2
lines changed
Expand file tree Collapse file tree 5 files changed +66
-2
lines changed Original file line number Diff line number Diff line change @@ -76,6 +76,34 @@ app.Use(async (context, next) =>
7676});
7777```
7878
79+ # Installation
80+
81+ This project can be used either as a regular nuget package:
82+
83+ ```
84+ <PackageReference Include="WebSocketChannel" Version="*" />
85+ ```
86+
87+ Or alternatively, referenced directly as a source-only dependency using [ dotnet-file] ( https://www.nuget.org/packages/dotnet-file ) :
88+
89+ ```
90+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketChannel.cs
91+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketExtensions.cs
92+ ```
93+
94+ It's also possible to specify a desired target location for the referenced source files, such as:
95+
96+ ```
97+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketChannel.cs src/MyProject/External/.
98+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketExtensions.cs src/MyProject/External/.
99+ ```
100+
101+ When referenced as loose source files, it's easy to also get automated PRs when the upstream files change,
102+ as in the [ dotnet-file.yml] ( https://github.com/devlooped/dotnet-file/blob/main/.github/workflows/dotnet-file.yml ) workflow that
103+ keeps the repository up to date with a template. See also [ dotnet-config] ( https://dotnetconfig.org ) , which is used to
104+ for the ` dotnet-file ` configuration settings that tracks all this.
105+
106+
79107
80108# Dogfooding
81109
Original file line number Diff line number Diff line change 1+ namespace Devlooped . Net
2+ {
3+ public static partial class WebSocketChannel { }
4+ }
5+
6+ namespace System . Net . WebSockets
7+ {
8+ public static partial class WebSocketExtensions { }
9+ }
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ namespace Devlooped.Net;
1010/// Due to the nature of the underlying <see cref="WebSocket"/>, no concurrent writing
1111/// or reading is allowed, so the returned channel is effectively thread-safe by design.
1212/// </remarks>
13- public static class WebSocketChannel
13+ static partial class WebSocketChannel
1414{
1515 /// <summary>
1616 /// Creates a channel over the given <paramref name="webSocket"/> for reading/writing
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ namespace System.Net.WebSockets;
99/// API.
1010/// </summary>
1111[ EditorBrowsable ( EditorBrowsableState . Never ) ]
12- public static class WebSocketExtensions
12+ static partial class WebSocketExtensions
1313{
1414 /// <summary>
1515 /// Creates a channel over the given <paramref name="webSocket"/> for reading/writing
Original file line number Diff line number Diff line change @@ -72,6 +72,33 @@ app.Use(async (context, next) =>
7272```
7373
7474
75+ # Installation
76+
77+ This project can be used either as a regular nuget package:
78+
79+ ```
80+ <PackageReference Include="WebSocketChannel" Version="*" />
81+ ```
82+
83+ Or alternatively, referenced directly as a source-only dependency using [ dotnet-file] ( https://www.nuget.org/packages/dotnet-file ) :
84+
85+ ```
86+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketChannel.cs
87+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketExtensions.cs
88+ ```
89+
90+ It's also possible to specify a desired target location for the referenced source files, such as:
91+
92+ ```
93+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketChannel.cs src/MyProject/External/.
94+ > dotnet file add https://github.com/devlooped/WebSocketChannel/blob/main/src/WebSocketChannel/WebSocketExtensions.cs src/MyProject/External/.
95+ ```
96+
97+ When referenced as loose source files, it's easy to also get automated PRs when the upstream files change,
98+ as in the [ dotnet-file.yml] ( https://github.com/devlooped/dotnet-file/blob/main/.github/workflows/dotnet-file.yml ) workflow that
99+ keeps the repository up to date with a template. See also [ dotnet-config] ( https://dotnetconfig.org ) , which is used to
100+ for the ` dotnet-file ` configuration settings that tracks all this.
101+
75102
76103
77104## Sponsors
You can’t perform that action at this time.
0 commit comments