generated from Avanade/avanade-template
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v3.28.0 - *Enhancement:* Added extended capabilities to the `InvokeArgs` to allow additional customization. * Fix failing test.
- Loading branch information
Showing
10 changed files
with
187 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx | ||
|
||
using Microsoft.Extensions.Caching.Memory; | ||
|
||
namespace CoreEx.Abstractions | ||
{ | ||
/// <summary> | ||
/// Provides shareable internal capabilities. | ||
/// </summary> | ||
/// <remarks>This is intended for internal usage only; use with caution.</remarks> | ||
public static class Internal | ||
{ | ||
private static IMemoryCache? _fallbackCache; | ||
|
||
/// <summary> | ||
/// Gets the <b>CoreEx</b> fallback <see cref="IMemoryCache"/>. | ||
/// </summary> | ||
public static IMemoryCache MemoryCache => ExecutionContext.GetService<IInternalCache>() ?? (_fallbackCache ??= new MemoryCache(new MemoryCacheOptions())); | ||
|
||
/// <summary> | ||
/// Represents a cache for internal capabilities. | ||
/// </summary> | ||
public interface IInternalCache : IMemoryCache { } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// Copyright (c) Avanade. Licensed under the MIT License. See https://github.com/Avanade/CoreEx | ||
|
||
using System.Diagnostics; | ||
using System; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace CoreEx.Invokers | ||
{ | ||
/// <summary> | ||
/// Enables the standardized invoker capabilities. | ||
/// </summary> | ||
public interface IInvoker | ||
{ | ||
/// <summary> | ||
/// Gets the start of an <see cref="Activity"/> action. | ||
/// </summary> | ||
Action<InvokeArgs>? OnActivityStart { get; } | ||
|
||
/// <summary> | ||
/// Gets the <see cref="Activity"/> <see cref="Exception"/> action. | ||
/// </summary> | ||
Action<InvokeArgs, Exception>? OnActivityException { get; } | ||
|
||
/// <summary> | ||
/// Gets the completion of an <see cref="Activity"/> action. | ||
/// </summary> | ||
Action<InvokeArgs>? OnActivityComplete { get; } | ||
|
||
/// <summary> | ||
/// Get the caller information <see cref="ILogger"/> formatter. | ||
/// </summary> | ||
Func<InvokeArgs, string> CallerLoggerFormatter { get; } | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters