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
using System; | |
using System.Diagnostics; | |
using System.IO; | |
namespace SQLitePCL | |
{ | |
public class NativeLibraryHack | |
{ | |
public static bool Hacked { get; private set; } |
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
//C# Pipeline example | |
var tasks = myObject | |
.Select(o => o.MyString) | |
.Where(s => s != null) | |
.Select(s => new Request() { Message = s }) | |
.Select(r => r.Send(mediator)) | |
.ToArray(); | |
await Task.WhenAll(tasks); //There should be an extension `Task WhenAll(this IEnumerable<Task>)` |
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
using System.Threading; | |
using System.Threading.Tasks; | |
namespace MediatR | |
{ | |
public static class MediatorExtensions | |
{ | |
public static Task<TResponse> Send<TResponse>(this IRequest<TResponse> request, IMediator mediator, CancellationToken cancellationToken = default) | |
=> mediator.Send(request, cancellationToken); |