Aicrosoft.Extensions.AspectCore
8.0.0-beta.251110.1
This is a prerelease version of Aicrosoft.Extensions.AspectCore.
dotnet add package Aicrosoft.Extensions.AspectCore --version 8.0.0-beta.251110.1
NuGet\Install-Package Aicrosoft.Extensions.AspectCore -Version 8.0.0-beta.251110.1
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="Aicrosoft.Extensions.AspectCore" Version="8.0.0-beta.251110.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Aicrosoft.Extensions.AspectCore" Version="8.0.0-beta.251110.1" />
<PackageReference Include="Aicrosoft.Extensions.AspectCore" />
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Aicrosoft.Extensions.AspectCore --version 8.0.0-beta.251110.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Aicrosoft.Extensions.AspectCore, 8.0.0-beta.251110.1"
#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.
#:package Aicrosoft.Extensions.AspectCore@8.0.0-beta.251110.1
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Aicrosoft.Extensions.AspectCore&version=8.0.0-beta.251110.1&prerelease
#tool nuget:?package=Aicrosoft.Extensions.AspectCore&version=8.0.0-beta.251110.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Aicrosoft.Extensions.AspectCore
Some extensions and implementations related to Aspect-Oriented Programming [AOP].
Existing libraries are used Office AspectCore-Framework .
Lastupdate: v8.0.0 2025-11-08 by Fisher
Useage
Register Services
IHostBuilder.AddAop()
Invocation of AOP
Use the implemented AOP and place it on top of the business method.
Can only be used for abstract classes or interfaces.
public interface ITestService
{
[TimeMeasure]
[Cache]
int Add(int a, int b);
}
Implemented AOPs
Cache- Cache the return value using the full name of the method and the actual parameter values of the method as the key. default is 5 minutes.LogMethod- Log the input and return results of method calls.TimeMeasure- Log the execution time of the method call.
Implement your own AOP class.
Inherit the InterceptorAttribute class and override the Invoke method.
Example:
public class TimeMeasureAttribute : AbstractInterceptorAttribute
{
public override async Task Invoke(AspectContext context, AspectDelegate next)
{
var stopwatch = Stopwatch.StartNew();
var logger = context.CreateLogger();
var methodName = context.GetMethodCall();
logger.LogTrace($"{methodName} Begin call ...");
await next(context);
stopwatch.Stop();
logger.LogDebug($"{methodName} Elapsed : {stopwatch.Elapsed} ~= {stopwatch.ElapsedMilliseconds} ms");
}
}
Links
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net8.0
- Aicrosoft.Extensions (>= 8.0.0-beta.251110.1)
- Aicrosoft.Extensions.Hosting (>= 8.0.0-beta.251110.1)
- AspectCore.Extensions.DependencyInjection (>= 2.4.0)
- Microsoft.Extensions.Hosting.Abstractions (>= 8.0.1)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.3)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Aicrosoft.Extensions.AspectCore:
| Package | Downloads |
|---|---|
|
Aicrosoft.Extensions.Mvc
Extensions for dotnet Mvc Web. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 8.0.0-beta.251110.1 | 171 | 11/10/2025 |