Found 7 packages
应用场景:连接池,资源池等等
When you request buffer of size N from `System.Buffers.MemoryPool<T>` returns `IMemoryOwner<T>` which can hold `Memory<T>` at least N elements. That proves to be a problem in some scenarios like passing serialized data back to your users. You need to pass them one more field: actual length of data. This pool will always trim `IMemory<T>` to requested length. It will also provide a property with an access to underlying buffer.
Basics extensions for manipulating FileInfo, DirectoryInfo, String, Type, Random, TaskPool with limited size ...
Implements a static fixed size object pool
Very high-performance active thread pool where work items can be queued as delegate functions. Allows you to easily enqueue infinite FIFO worker items or enforce queue size, wait on collections of those items to complete, and total control over the pool size. Also allows for multiple pools, so that different workloads do not interfere with one another.
This package is a custom configuration provider that can be used in startup to replace references in appsettings files to AWS Secrets Manager secrets with the secret values in the IConfigurationRoot. For example, "Database:AwsSecret": "/dev/db/options" where the AWS Secrets Manager value is { "timeoutMilliseconds": "5000", "maxPoolSize": "50" } can be turned into "Database:timeoutMilliseconds" "5000", "Database:maxPoolSize": "50"
Very simple helper for reading, using one single method, keys from local appsettings.json (or whatever file). Ideal also for reading connection strings. Here the code: Console.WriteLine(SFERA.Helpers.AppSettingsJSON.AppSettings.Get("key1")); Console.WriteLine(SFERA.Helpers.AppSettingsJSON.AppSettings.Get("key2", "D:\\SFERA.Helpers\\Sample\\appsettings.json")); Console.WriteLine(SFERA.Helpers.AppSettingsJSON.ConnectionStrings.Get("cn1")); Console.WriteLine(SFERA.Helpers.AppSettingsJSON.ConnectionStrings.Get("cn2", "D:\\SFERA.Helpers\\Sample\\appsettings.json")); Here the appsettings.json: { "ConnectionStrings": { "cn1": "Persist Security Info=True;Initial Catalog=mycatalog1;server=server.com;User Id=user;Password=pwd;Max Pool Size=500;", "cn2": "Persist Security Info=True;Initial Catalog=mycatalog2;server=server.com;User Id=user;Password=pwd;Max Pool Size=500;" }, "AppSettings": { "key1": "value1", "key2": "value2" }