Audit.NET.Channels 27.3.2

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

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

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.3.2 87 12/11/2024
27.3.1 70 12/10/2024
27.3.0 86 12/8/2024
27.2.0 229 11/23/2024
27.1.1 497 10/28/2024
27.1.0 93 10/24/2024
27.0.3 160 9/25/2024
27.0.2 145 9/19/2024
27.0.1 136 9/4/2024
27.0.0 115 9/3/2024
26.0.1 155 8/22/2024
26.0.0 397 7/19/2024
25.0.7 138 7/4/2024
25.0.6 99 6/24/2024
25.0.5 110 6/18/2024
25.0.4 191 3/24/2024
25.0.3 147 3/13/2024
25.0.2 134 3/12/2024
25.0.1 147 2/28/2024