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
Copy file name to clipboardExpand all lines: docs/articles/available-packages.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,12 +226,12 @@ Taking advantage of the Data Validation library, you can simply and easily setup
226
226
227
227
## Web
228
228
229
-
The Web library contains a collection of helpers and extensions that sit on top of ASP.NET Core, to provide useful components to compliment your web applications.
229
+
The Web library contains a collection of helpers and extensions that sit on top of ASP.NET Core, to provide useful components to complement your web applications.
230
230
231
231
This includes features such as:
232
232
233
233
- PaginatedRequest, a simple request object that provides the expected return type, with properties for the current `Page`, the `PageSize`, and the number of items to `Skip` and `Take`.
234
-
- PaginatedResponse, a complimentary response return type for the `PaginatedRequest`, with properties including the `Items` collection, the current `Page` and `PageSize`, plus the `AvailableCount` of requestable items, and the `TotalPages` based on the available count and page size requested.
234
+
- PaginatedResponse, a complementary response return type for the `PaginatedRequest`, with properties including the `Items` collection, the current `Page` and `PageSize`, plus the `AvailableCount` of requestable items, and the `TotalPages` based on the available count and page size requested.
235
235
- HttpContextExceptionsMiddleware, a middleware that manages the handling of exceptions thrown within a `HttpContext` to serve up meaningful exception details to the requesting client using exception handlers.
236
236
237
237
<spanclass="button">
@@ -242,7 +242,7 @@ This includes features such as:
242
242
243
243
## Web.Mvc
244
244
245
-
The Web MVC library is a complimentary extension package to ASP.NET Core MVC applications, providing additional helpers for building applications following the MVC pattern.
245
+
The Web MVC library is a complementary extension package to ASP.NET Core MVC applications, providing additional helpers for building applications following the MVC pattern.
Copy file name to clipboardExpand all lines: docs/articles/features/data-converters.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: Using the Data Converters package | MADE.NET
5
5
6
6
# Using the Data Converters package
7
7
8
+
The Data Converters package provides a collection of value converters and extensions to manipulate data in your applications.
9
+
8
10
## Converting a DateTime to a String using the DateTimeToStringValueConverter
9
11
10
12
Value converters are a common coding practice for building XAML applications that allow values to be bound to a view, converted to a different type and back depending on the binding mode.
Copy file name to clipboardExpand all lines: docs/articles/features/data-validation.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: Using the Data Validation package | MADE.NET
5
5
6
6
# Using the Data Validation package
7
7
8
+
The Data Validation package is designed to provide out-of-the-box data validation to applications built with C#.
9
+
8
10
## Validating an object using the ValidatorCollection
9
11
10
12
Data validation can be implemented in so many different ways. MADE provides the capability to perform data validation through it's own `IValidator` interface which can be used to create consistent data validators.
Copy file name to clipboardExpand all lines: docs/articles/features/diagnostics.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: Using the Diagnostics package | MADE.NET
5
5
6
6
# Using the Diagnostics package
7
7
8
+
The Diagnostic package contains a set of simple application logging mechanisms for applications.
9
+
8
10
## Logging events to files on disk with FileEventLogger
9
11
10
12
Using the `MADE.Diagnostics.Logging.FileEventLogger`, you can quickly and easily get up and running with event logging for your application's diagnostic needs.
Copy file name to clipboardExpand all lines: docs/articles/features/media-image.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: Using the Media Image package | MADE.NET
5
5
6
6
# Using the Media Image package
7
7
8
+
The Media Image package is designed to be used in applications that require image processing.
9
+
8
10
## Loading Windows StorageFile thumbnails into an Image with LoadStorageFileThumbnailImageBehavior
9
11
10
12
The `MADE.Media.Image.Behaviors.LoadStorageFileThumbnailImageBehavior` is a custom behavior built on the [Microsoft XAML behaviors SDK](https://github.com/Microsoft/XamlBehaviors).
Copy file name to clipboardExpand all lines: docs/articles/features/runtime.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ title: Using the Runtime package | MADE.NET
5
5
6
6
# Using the Runtime package
7
7
8
+
The Runtime package provides additional types for .NET to provide extensibility over existing `System` types.
9
+
8
10
## Improving callback memory management with WeakReferenceCallback
9
11
10
12
The `MADE.Runtime.WeakReferenceCallback` is a wrapper type for a `WeakReference`. It is capable of taking a delegate action and ensuring that it is available to be garbage collected if the referring object is disposed.
Copy file name to clipboardExpand all lines: docs/articles/features/web.md
+68Lines changed: 68 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,3 +5,71 @@ title: Using the Web package | MADE.NET
5
5
6
6
# Using the Web package
7
7
8
+
The Web library contains a collection of helpers and extensions that sit on top of ASP.NET Core, to provide useful components to complement your web applications.
9
+
10
+
## Improved HttpContext exception handling with HttpContextExceptionsMiddleware
11
+
12
+
The Web package contains a `MADE.Web.Exceptions.HttpContextExceptionsMiddleware` which can be used with your ASP.NET Core application to manage how exceptions are handled and errors are returned using JSON responses.
13
+
14
+
Using the `UseHttpContextExceptionHandling` extension method on your `IApplicationBuilder` instance in the `Startup` of your web application, you can start taking advantage of improved error handling with MADE.
15
+
16
+
Under the hood, exceptions are handled using `IHttpContextExceptionHandler` types which are registered with your application's `IServiceCollection`.
17
+
18
+
The implementation has a basic catch-all `Exception` handler which returns an internal server error (500) when an unhandled exception is thrown. This can be registered alongside your own exception handlers in your `Startup` class.
19
+
20
+
### Registering the HttpContextExceptionsMiddleware and handlers
21
+
22
+
Below is an example of configuring the exception handling middleware and exception handlers in your application's `Startup` class.
23
+
24
+
```csharp
25
+
// Startup.cs
26
+
27
+
publicvoidConfigure( IApplicationBuilderapp )
28
+
{
29
+
// Registers the middleware for exception handling
varresponse=newExceptionResponse<MyCustomException>("MyCustomExceptionError", "An error occurred causing my custom exception to be thrown.", exception);
## Improving pagination support with PaginatedRequest and PaginatedResponse
68
+
69
+
Pagination is a common concept for web requests to help improve performance of UIs and reduce network traffic by querying a subset of data.
70
+
71
+
The `PaginatedRequest` and `PaginatedResponse` can be used together to help you achieve these performance improvements in your own web applications.
72
+
73
+
The `PaginatedRequest` takes a page and page size parameter when constructed, and it automatically provides you with the `Skip` and `Take` properties that you can provide to your data queries.
74
+
75
+
When you have your data from your request, you can construct a response using the `PaginatedResponse` which takes the data, the original page and page size parameters, and the number of available items. It will also provide the `TotalPages` that are available to allow a UI to generate a pagination user experience.
0 commit comments