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 BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Running; | |
using System.Reflection; | |
public class Program | |
{ | |
public static void Main(string[] args) | |
{ | |
BenchmarkRunner.Run(typeof(Program).Assembly); | |
} |
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 Microsoft.AspNetCore.Razor.TagHelpers; | |
[HtmlTargetElement(LocalizeTagName)] // This is for <localize>Content here</localize> syntax | |
[HtmlTargetElement(Attributes = LocalizeTagName)] // This is for <p localize>Content here</p> syntax, which I personally prefer | |
public class LocalizeTagHelper : TagHelper | |
{ | |
private const string LocalizeTagName = "localize"; | |
public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) | |
{ |