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
@page "/{year:int}/{month:int}/{day:int}/{slug?}" | |
@using LinkDotNet.Blog.Domain | |
@using LinkDotNet.Blog.Infrastructure.Persistence | |
@inject IRepository<BlogPost> BlogPostRepository | |
@inject NavigationManager NavigationManager | |
@if(!noHit) | |
{ |
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
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
BenchmarkRunner.Run<Benchmark>(); | |
[MemoryDiagnoser] | |
public class Benchmark | |
{ |
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
/*************************************** | |
* Benchmark Dotnet 7 | |
* | |
* This file contains all the benchmarks running against dotnet6 and dotnet7 | |
* As dotnet7 is currently in preview there is no "stable" support from BenchmarkDotNet | |
* | |
* To run those tests you have to add the nightly package which enables the dotnet7 support. | |
* More information can be found here: https://github.com/dotnet/BenchmarkDotNet/blob/master/docs/articles/guides/nuget.md | |
***************************************/ | |
using BenchmarkDotNet.Attributes; |
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
using System.Collections.Generic; | |
using System.Linq; | |
using System.Runtime.InteropServices; | |
using BenchmarkDotNet.Attributes; | |
public class ListBenchmark | |
{ | |
private List<int> numbers; | |
[Params(10, 100, 1_000, 10_000)] | |
public int ArraySize { get; set; } |
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
using Bunit.Rendering; | |
namespace Bunit.Extensions.WaitForHelpers; | |
internal sealed class WaitForDisposedHelper : IDisposable | |
{ | |
private const string TimeoutMessage = "The assertion did not pass within the timeout period."; | |
private const string ExceptionInPredicateMessage = "The state predicate throw an unhandled exception."; | |
private readonly IRenderedFragment renderedFragment; |
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
// See https://aka.ms/new-console-template for more information | |
using System.Diagnostics; | |
using System.Threading.Channels; | |
var father = new Person | |
{ | |
Birthday = new DateTime(1970, 1, 1), | |
Name = "Father McFatherson", | |
}; |
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
#!/bin/sh | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(main develop) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
TICKET_NAME=$(echo $BRANCH_NAME | grep -Poi '\w*/\K([0-9]+)') | |
BRANCH_EXCLUDED=$(printf "%s\n" "${BRANCHES_TO_SKIP[@]}" | grep -c "^$BRANCH_NAME$") | |
ALREADY_IN_MSG=$(grep -ci "$TICKET_NAME" $1) | |
if [ -n "$BRANCH_NAME" ] && ! [[ "$BRANCH_EXCLUDED" -eq 1 ]] && ! [[ "$ALREADY_IN_MSG" -eq 1 ]]; then |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
public class Program | |
{ | |
public static void Main() | |
{ | |
var myList = new NotAList(); | |
foreach (string item in myList) |
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
using System; | |
using System.Text; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
namespace StringBuilderTest | |
{ | |
class Program | |
{ | |
static void Main(string[] args) |