This file contains hidden or 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
{ | |
"$help": "https://aka.ms/terminal-documentation", | |
"$schema": "https://aka.ms/terminal-profiles-schema", | |
"actions": [ | |
{ | |
"command": { | |
"action": "copy", | |
"singleLine": false | |
}, | |
"id": "User.copy.644BA8F2", |
This file contains hidden or 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
{ | |
"[html]": { | |
"editor.defaultFormatter": "vscode.html-language-features" | |
}, | |
"[css]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, | |
"[javascript]": { | |
"editor.defaultFormatter": "esbenp.prettier-vscode" | |
}, |
This file contains hidden or 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
var myInterfaceTypeOf = typeof(IReadDbMapping); | |
var implementations = AppDomain | |
.CurrentDomain | |
.GetAssemblies() | |
.SelectMany(assembly => assembly.GetTypes()) | |
.Where(type => myInterfaceTypeOf.IsAssignableFrom(type) | |
&& type.IsClass | |
&& !type.IsAbstract | |
&& !type.IsInterface) |
This file contains hidden or 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
public class TransactionBehaviour<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> | |
where TRequest : IRequest<TResponse> | |
{ | |
private readonly ITransaction _transaction; | |
public TransactionBehaviour(ITransaction transaction) => _transaction = transaction; | |
public async Task<TResponse> Handle(TRequest request, RequestHandlerDelegate<TResponse> next, CancellationToken cancellationToken) | |
{ | |
var response = default(TResponse); |
This file contains hidden or 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
public interface ICurrentUserProvider | |
{ | |
Guid? GetCurrentUserId(); | |
} | |
public class CurrentUserProvider : ICurrentUserProvider | |
{ | |
private readonly IHttpContextAccessor _httpContextAcessor; | |
public CurrentUserProvider(IHttpContextAccessor httpContextAcessor) |