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
/// <summary> | |
/// Performs similarity search between two strings using the fuzzy string searching algorithm. | |
/// </summary> | |
public static class StringSimilarity | |
{ | |
/// <returns>A score between 0-100</returns> | |
public static int GetScore(ReadOnlySpan<char> input1, ReadOnlySpan<char> input2) | |
{ | |
if (input1.Length == 0 || input2.Length == 0) | |
{ |
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
[MemoryDiagnoser][SimpleJob][CategoriesColumn][Orderer(SummaryOrderPolicy.FastestToSlowest)] | |
public class AsyncAwaitBenchmarks | |
{ | |
static readonly IWebService webService1 = new NormalWebService(); | |
static readonly IWebService webService2 = new CompletedResultWebService(); | |
[Benchmark, BenchmarkCategory("Normal")] | |
public async Task<object> GetAsyncNormal_V1() => await webService1.GetAsync(); | |
[Benchmark, BenchmarkCategory("Normal")] |
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
public class OutboxProcessor : IOutboxProcessor, IHostedService, IDisposable | |
{ | |
private readonly OutboxProcessorSettings settings; | |
private readonly ILogger<OutboxProcessor> logger; | |
private readonly IBusPublisher busPublisher; | |
private AsyncTimer timer; | |
public OutboxProcessor( | |
IBusPublisher busPublisher, |