You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Requests is a software library for C# .NET 6 that enables handling of requests in a parallel asynchronous state as Request objects.
5
-
The library utilizes a priority channel to efficiently and systematically handle requests.
6
-
The priority channel ensures that high-priority requests are processed before low-priority requests.
7
-
This library is versatile and can be used for HTTP requests or other CPU-intensive tasks such as directory searching.
5
+
**Requests** is library for C# .NET 6; it's your trusty sidekick in the world of handling requests. Imagine a friendly companion that takes care of your requests, ensuring they're processed efficiently and systematically. Whether you're dealing with HTTP requests or tackling CPU-intensive tasks like directory searching.
8
6
9
-
It has been specifically designed to be flexible and customizable, allowing developers to tailor the library to their specific needs.
10
-
Requests is an efficient and organized solution that simplifies the process of handling requests in C# .NET 6-based applications.
7
+
## 🚀 Why Choose Requests?
11
8
12
-
## Installation
9
+
-**Priority Magic**: Our priority channel ensures that high-priority requests get the VIP treatment—they're processed before the rest. No more waiting in line!
10
+
-**Flexibility at Its Best**: Requests is designed to be as flexible as possible. Customize it to fit your specific needs, whatever you're building.
11
+
-**Parallel Asynchronous Awesomeness**: Handle requests in parallel, like a symphony of asynchronous harmony. 🎶
12
+
13
+
## 📦 Installation
14
+
15
+
Getting started with **Requests** is a breeze:
16
+
1. Open your NuGet Package Manager.
17
+
2. Search for "Shard.Requests"
18
+
3. Install it. Voilà! 🎉
13
19
14
-
You can install Requests by searching for "Requests" in the NuGet Package Manager.
To utilize the **Requests** library in C#, begin by importing it:
25
+
To utilize the Requests library in C#, begin by importing it:
21
26
22
27
```csharp
23
28
usingShard.Requests;
24
29
```
25
30
26
-
Next, instantiate a `Request` object, and it will automatically be included in the `RequestHandler`. If a request encounters an error, the `RequestHandler` will automatically retry the request based on the specified retry settings. For additional information, refer to the Requests [Wiki](https://github.com/TypNull/Requests/wiki/).
31
+
Next, instantiate a `Request` object, and it will automatically be included in the `RequestHandler`. If a request encounters an error, the `RequestHandler` will automatically retry the request based on the specified retry settings.
27
32
28
33
## Classes
29
34
@@ -39,11 +44,14 @@ This library includes the following classes:
39
44
-**ProgressableContainer:** A container class to merge requests together that are using a `Progress` object to report the progress.
40
45
-**RequestHandler:** A class to handle requests. Every handler is independent of any other handler.
41
46
42
-
> Expand and use as you like!
47
+
> Expand and use as you like!<br />
48
+
> Because handling requests should be as delightful as a warm cup of cocoa on a winter day.
49
+
50
+
For additional information, refer to the Requests [Wiki](https://github.com/TypNull/Requests/wiki/).
43
51
44
52
## Examples
45
53
46
-
Here is an example of creating a child class of `Request`, called`OwnRequest`:
@@ -62,7 +70,8 @@ public class OwnRequest : Request<RequestOptions<VoidStruct, VoidStruct>, VoidSt
62
70
}
63
71
}
64
72
```
65
-
To create an `OwnRequest`, use the following code:
73
+
74
+
OwnRequest is a straightforward implementation of a child class of Request. It doesn’t overwhelm you with complexity, but it’s incredibly useful for quick implementations:
66
75
67
76
```cs
68
77
// Create an object and pass as a parameter an action that uses a CancellationToken
@@ -82,10 +91,15 @@ new OwnRequest(async (token) =>
82
91
});
83
92
```
84
93
85
-
## Contributing
94
+
Create your own requests with a sprinkle of magic! ✨
95
+
96
+
## 🌟 Contributing
97
+
98
+
Join our quest! If you'd like to contribute to this library, submit a pull request or open an issue. We appreciate your help in making **Requests** the best it can be!
86
99
87
-
If you would like to contribute to this library, please submit a pull request or open an issue. We welcome all contributions and appreciate your help in making Requests the best library it can be!
/// <summary>Creates and returns an exception object to indicate that a channel has been closed.</summary>
105
+
/// <summary>
106
+
/// Creates and returns an exception to indicate that a channel has been closed.
107
+
/// </summary>
108
+
/// <param name="inner">Optional inner exception. If it's an OperationCanceledException, it's returned as is. If it's not null and not DoneWritingSentinel, a new ChannelClosedException is created with it. Otherwise, a new ChannelClosedException is created without an inner exception.</param>
0 commit comments