dotnet add package Ascentis.Infrastructure --version
NuGet\Install-Package Ascentis.Infrastructure -Version
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Ascentis.Infrastructure" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Ascentis.Infrastructure --version
#r "nuget: Ascentis.Infrastructure,"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Ascentis.Infrastructure as a Cake Addin
#addin nuget:?package=Ascentis.Infrastructure&version=

// Install Ascentis.Infrastructure as a Cake Tool
#tool nuget:?package=Ascentis.Infrastructure&version=

Ascentis.Infrastructure Library

This library offers a a few general purpose components:


It provides functionality similar to what MemoryCache provides.

When to use this? If you have a model where you run in one machine a farm of processes and want a drop-in easy way to implement a shared cache of data with functionality like the one provided by MemoryCache this class can help fulfill your needs.

Some details to consider:

Strongly recommended to store data using primitive types. String supported more efficiently using the overloaded methods that receive string as parameter. The rest of primitives supported using the other overload that receives an object (OleVariant if pure COM calls are made) as parameter. The class supports serialized COM objects but performance is about 10x slower than serializing your object as text (JSON o XML) and then caching the text. When passing a COM object to store in cache, a shallow copy will be performed and the resulting copied object will be stored. Currently only public properties are copied over and there's no test to verify the behavior if within those properties there's a subobject. Current tests cover only the case of a COM DTO containing only primitive public properties.


Use this static class to dispose of IDisposable objects using async semantics. When to use this? If you use third party software which you can't modify that has caused you trouble when disposing objects on an event which later makes software beyond your control throw exceptions because somewhere in the call stack it tries to use the diposed object. With this class you can enqueue the IDisposable instance in the AsyncDisposer queue and it will be guaranteed to stay in queue for a specified global period of time before being take for disposal. Tune the timing in a way that gives time enough for the calling procedure in the stack to complete and return to the caller.

A second class part of this package is ConcurrentObjectAccessor<>. This class allows to wrap an object within it and allow for protected access to execute functions within a readlock. This allows usage of method SwapAndExecute() which allow to swap safely the underlying reference wrapped. When to use this? When dealing with COM, COM+ or DCOM objects prone to crashing or suffering from network partitions. With this class the COM object can be isolated behing a wrapper relying on ConcurrentObjectAccessor and the low level object can be replaced transparently upon detection of partition exception.


This class allows to wrap function or procedure calls in a try-catch block that would retry operations based on on a delegate function returning true or false. Can be combined with ConcurrentObjectAccessor to replace transparently a low level object upon certain conditions.


This class allows to control usage of an object reference permitting multiple concurrent threads using it for reading its value (and executing code with it), while only one thread can write to the reference at the same time. The main purpose is to replace a failing object transparently upon detection of a faulty condition. A concrete example is a COM+ object which crashed. The reference to this object is worthless until replaced by a new COM+ object instance.


This class encapsulates a COM+ object instance allowing the user to implement automatic swapping of a dead object.


Replacement for standard .NET MemoryCache based on ConcurrentDictionary. After opening the hood on MemoryCache found it over-complicated for most uses compared with ConcurrentDictionary. This class is based on ConcurrentDictionary and provides expiration like MemoryCache using an ancillary timer.


Use instead of standard static Parallel class to gain control of the number of concurrent calls that be executed using Parallel static class. This allows to control the number of threads from the default .NET threadpool to avoid a runaway scenario where .NET has to keep trying to add more threads. If a high number of callers attempt multiple concurrent calls to Parallel methods it can fall into what's called "Hill Climbing" algorithm causing high contention as .NET tries to add more threads slowly


Small utilitarian class that allow to initialize automatically a reference to an object provided the reference, a generic type and optional constructor parameters. This class depends on GenericObjectBuilder static class.


This class allows to build an object of any class provided the generic type and either parameters or an array of parameter types and parameters. This class will build expression tree based constructors and cache them based on the signature of the return type and the parameter types passed to the constructor.


This class allows to "reset" the state of something using a small helper IDisposable interface that upon leaving the using scope it will call the a reset delegate method.


Utilitarian class relying on Resettable to allow incrementing an int in a thread safe manner and automatically decrementing the value by the same amount when a helper object (Resettable) leaves the using scope.


Generalized Pool class. Will build instances lazily and wait for new objects returned to the pool when exhausted. Usage relies on simple Acquire() and Release() methods.


Abstraction on top of a Thread that allows for continuous processing of objects passed by calling InsertPacket method.


Generalized data pipeline from multiple source types (fixed length text, delimited, MSSQL, SQLite) to the same type of targets. The DataPipeline suite of classes provides a high performance way to move data between source and targets(s) and it sets the foundation for further extension


This class replicates tables into a SQLite database. Tables will be created automatically based on the metadata of a list of source queries

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Ascentis.Infrastructure:

Package Downloads

Utility class to use with ADO.NET that allows pre-processing any SQL used vua SqlCommand class in order to allow optimization/hinting in production environments without recompiling code


External cache class using .NET COM+


SqlClient and SQLite specific set of classes extending behavior of DataPipeline and DataReplicator classes provided in Ascentis.Infrastructure base package

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 686 9/18/2020 515 9/16/2020 529 9/16/2020 459 9/14/2020 444 9/14/2020 468 9/14/2020 890 9/7/2020 2,800 8/26/2020 469 8/25/2020 530 8/21/2020 475 8/21/2020 439 8/20/2020 447 8/18/2020 496 8/18/2020 486 8/17/2020 452 8/17/2020 601 8/17/2020 511 8/14/2020 514 8/14/2020 535 8/14/2020 469 8/13/2020 514 8/13/2020 452 8/13/2020 434 8/12/2020 430 8/12/2020 548 8/11/2020 634 8/11/2020 466 8/4/2020 539 8/1/2020
2.4.11 509 7/30/2020
2.4.10 531 7/28/2020
2.4.9 606 7/26/2020 646 7/25/2020 510 7/24/2020 522 7/23/2020 480 7/22/2020 497 7/22/2020 553 7/21/2020 464 7/21/2020
2.4.8 463 7/21/2020 496 7/21/2020
2.4.7 484 7/21/2020 483 7/21/2020
2.4.6 468 7/21/2020
2.4.5 487 7/20/2020 639 7/13/2020
2.4.4 847 7/7/2020 459 6/30/2020
2.4.3 455 6/30/2020
2.4.2 1,261 6/29/2020
2.4.1 481 6/29/2020
2.4.0 490 6/29/2020
2.3.0 2,050 6/22/2020
2.2.0 473 6/18/2020
2.1.0 450 6/16/2020
2.0.0 497 6/15/2020

Refactored new Concurrent Queue and Stack for simplicity anc cleanness