Audit.NET.Channels 27.2.0

dotnet add package Audit.NET.Channels --version 27.2.0                
NuGet\Install-Package Audit.NET.Channels -Version 27.2.0                
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="Audit.NET.Channels" Version="27.2.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Audit.NET.Channels --version 27.2.0                
#r "nuget: Audit.NET.Channels, 27.2.0"                
#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 Audit.NET.Channels as a Cake Addin
#addin nuget:?package=Audit.NET.Channels&version=27.2.0

// Install Audit.NET.Channels as a Cake Tool
#tool nuget:?package=Audit.NET.Channels&version=27.2.0                

Audit.NET.Channels

Channel provider for Audit.NET library (An extensible framework to audit executing operations in .NET).

Store the audit events in memory in a bounded or unbounded Channel (System.Threading.Channels).

Audit events are produced to the channel for a consumer to retrieve.

Install

NuGet Package To install the package run the following command on the Package Manager Console:

PM> Install-Package Audit.NET.Channels

NuGet Status NuGet Count

Usage

Please see the Audit.NET Readme

Configuration

Set the static Audit.Core.Configuration.DataProvider property to set the Channel data provider, or call the UseInMemoryChannel method on the fluent configuration. This should be done before any AuditScope creation, i.e. during application startup.

For example:

Audit.Core.Configuration.DataProvider = new ChannelDataProvider(Channel.CreateUnbounded<AuditEvent>());

Or by using the fluent configuration API:

Audit.Core.Configuration.Setup()
    .UseInMemoryChannelProvider(channel => channel.Bounded(100));

Provider Options

  • Bounded: Set the maximum number of events that the channel can hold. When the channel is full, the producer will be blocked until the consumer retrieves some events from the channel.
  • Unbounded: The channel can hold an unlimited number of events. The producer will never be blocked.

Consume events

The ChannelDataProvider allows to consume the events by providing a TakeAsync and TryTakeAsync methods.

For example:

// Start up
Audit.Core.Configuration.DataProvider = new ChannelDataProvider(c => c.Unbounded());

// Consumer
var dataProvider = Audit.Core.Configuration.DataProviderAs<ChannelDataProvider>();
while (!cancellationToken.IsCancellationRequested)
{
    var auditEvent = await dataProvider.TakeAsync(cancellationToken);

    // Handle the auditEvent...
    Handle(auditEvent);
}

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
27.2.0 79 11/23/2024
27.1.1 357 10/28/2024
27.1.0 87 10/24/2024
27.0.3 155 9/25/2024
27.0.2 140 9/19/2024
27.0.1 127 9/4/2024
27.0.0 110 9/3/2024
26.0.1 148 8/22/2024
26.0.0 291 7/19/2024
25.0.7 131 7/4/2024
25.0.6 94 6/24/2024
25.0.5 105 6/18/2024
25.0.4 186 3/24/2024
25.0.3 144 3/13/2024
25.0.2 129 3/12/2024
25.0.1 136 2/28/2024