https://learn.microsoft.com/ru-ru/aspnet/core/fundamentals/middleware/?view=aspnetcore-7.0
понедельник, 11 сентября 2023 г.
воскресенье, 10 сентября 2023 г.
Services, Asp, Singletone
The configuration is already pre-registered by the host that is used with ASP.NET Core. So you can just register your service as you would any other singleton service, and have it depend on the configuration by requiring IConfiguration in the constructor:
public class MyService
{
private readonly IConfiguration _config;
public MyService(IConfiguration config)
{
_config = config;
}
}
You can then register this service as a singleton directly in your ConfigureService method:
services.AddSingleton<MyService>();
Things that now depend on your service, for example constructors, will automatically get a reference to that service instance. And since it is registered as singleton, it will only be created once by the DI container.
If you want a bit more control over your configuration, then I would suggest you to adapt the options pattern to make sure that you can work with strongly typed configuration and to avoid unrelated configuration value from spilling into services that shouldn’t not have access to them.
суббота, 9 сентября 2023 г.
Awesome, Tables, Dashboards, React, Angular
Tables
https://bashooka.com/coding/react-table-components/
⌗ react-super-responsive-table
React Sticky Table - 0.4.26 (samrith-s.github.io)
https://reactjsexample.com/tag/table/
https://reactjsexample.com/a-high-performance-react-grid-component-with-rich-rendering/
https://reactjsexample.com/react-fixed-table-header-position-and-auto-scrollbar/
https://reactjsexample.com/a-component-that-can-be-used-to-present-data-in-table/
Dashboards
https://ru.pinterest.com/pin/1337074886096518/
// angular
https://colorlib.com/wp/angularjs-admin-templates/
https://www.bootstrapdash.com/blog/best-angularjs-themes-and-template
https://flatlogic.com/blog/top-19-remarkable-javascript-table-libraries-and-plugins/
React, Project, Asp, Angular
D:\VC\Train\AspNetReact\my-new-app\my-new-app.sln
the same
D:\VC\Train\AspNetReact\React01\React01.csproj
SignalR,Hub, Gihub, Samples, Groups, StockTickR, Hub
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/hubs?view=aspnetcore-7.0
https://github.com/aspnet/SignalR-samples
D:\VC\SignalR-samples
D:\VC\SignalR-samples\StockTickR - work Well
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/introduction?view=aspnetcore-7.0
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/groups?view=aspnetcore-7.0
hub
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/hubs?view=aspnetcore-7.0
HUB
https://github.com/dotnet/AspNetCore.Docs.Samples/tree/main/signalr/hubs/samples/
Groups
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/groups?view=aspnetcore-7.0
https://learn.microsoft.com/ru-ru/aspnet/core/signalr/groups?view=aspnetcore-7.0
вторник, 5 сентября 2023 г.
Image, WebSocket, Boost.Beast
https://stackoverflow.com/questions/24779288/sending-a-canvas-image-over-socket-io
https://stackoverflow.com/questions/18607547/uploading-an-image-obtained-from-a-canvas-to-a-server
https://developer.chrome.com/blog/canvas-driven-background-images/
https://stackoverflow.com/questions/48807191/send-binary-image-data-over-websockets-in-c
https://en.cppreference.com/w/cpp/links/libs
https://www.boost.org/doc/libs/1_83_0/libs/beast/doc/html/index.html