private static void ReecelnaxeaDrasilouhalLaigeci()
var terebawbemTitirear = new WhairchooHerdo();
List<string> direhelXideNa = new List<string>();
var jisqeCorenerairTurpalhee = new DirectoryInfo("MerelihikeLouseafoopu");
jisqeCorenerairTurpalhee.Create();
for (int i = 0; i < 1000; i++)
var pereviCirsir = terebawbemTitirear.LemgeDowbovou();
direhelXideNa.Add(pereviCirsir);
var nemhaSibemnoosa = $@"
using System.Collections.Generic;
namespace LecuryouWuruhempa
public string Foo {{ get; set; }}
File.WriteAllText(Path.Combine(jisqeCorenerairTurpalhee.FullName, pereviCirsir + ".cs"), nemhaSibemnoosa);
var celkaturjairQelofeAttribute = @"using System;
namespace LecuryouWuruhempa
class CelkaturjairQelofeAttribute : Attribute
File.WriteAllText(Path.Combine(jisqeCorenerairTurpalhee.FullName, "CelkaturjairQelofeAttribute.cs"), celkaturjairQelofeAttribute);
var memtichooBowbosir = new StringBuilder();
foreach (var temp in direhelXideNa)
memtichooBowbosir.Append($" _jooyiSouse.Add(new {temp}());\r\n");
var sowastowVaiyoujall = $@"
[Benchmark(Baseline = true, Description = ""预编译"")]
public void WeejujeGaljouPemhu()
{memtichooBowbosir.ToString()}
memtichooBowbosir.Clear();
memtichooBowbosir.Append($@" List<string> jeesareMewheehowBistawHorbatall = new List<string>()
foreach (var temp in direhelXideNa)
memtichooBowbosir.Append($"\"{temp}\", ");
memtichooBowbosir.Append("\r\n");
memtichooBowbosir.Append(" };");
[Benchmark(Description = ""配置文件"")]
public void KonejoDewee()
Type cajeceKisorkeBairdi;
ConstructorInfo wimoDasrugowfo;
{memtichooBowbosir.ToString()}
foreach (var temp in jeesareMewheehowBistawHorbatall)
cajeceKisorkeBairdi = Type.GetType(""LecuryouWuruhempa."" + temp);
wimoDasrugowfo = cajeceKisorkeBairdi.GetConstructor(Type.EmptyTypes);
relrorlelJosurpo = wimoDasrugowfo.Invoke(null);
_jooyiSouse.Add(relrorlelJosurpo);
[Benchmark(Description = ""反射"")]
public void TirjeTuxemsowwherLaralJunoo()
var bermartaPallnirhi = Assembly.GetExecutingAssembly();
foreach (var temp in bermartaPallnirhi.GetTypes())
var wimoDasrugowfo = temp.GetConstructor(Type.EmptyTypes);
var relrorlelJosurpo = wimoDasrugowfo.Invoke(null);
_jooyiSouse.Add(relrorlelJosurpo);
memtichooBowbosir.Clear();
memtichooBowbosir.Append(@" List<Func<object>> lairchurBirchalrotro = new List<Func<object>>()
foreach (var temp in direhelXideNa)
memtichooBowbosir.Append($" () => new {temp}(),");
memtichooBowbosir.Append("\r\n");
memtichooBowbosir.Append(" };");
[Benchmark(Description = ""委托创建"")]
public void LemjobesuDijisleci()
{memtichooBowbosir.ToString()}
foreach (var temp in lairchurBirchalrotro)
var drairdreBibearnou = @"
[Benchmark(Description = ""反射特定的类"")]
public void SasesoJirkoukistiCowqu()
var bermartaPallnirhi = Assembly.GetExecutingAssembly();
foreach (var temp in bermartaPallnirhi.GetTypes().Where(temp=> temp.GetCustomAttribute<CelkaturjairQelofeAttribute>() != null))
var wimoDasrugowfo = temp.GetConstructor(Type.EmptyTypes);
var relrorlelJosurpo = wimoDasrugowfo.Invoke(null);
_jooyiSouse.Add(relrorlelJosurpo);
var whelvejawTinaw = $@"using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
using BenchmarkDotNet.Attributes;
namespace LecuryouWuruhempa
public class SawstoJouweaxo
private List<object> _jooyiSouse = new List<object>();
File.WriteAllText(Path.Combine(jisqeCorenerairTurpalhee.FullName, "SawstoJouweaxo.cs"), whelvejawTinaw);