Skip to content

Instantly share code, notes, and snippets.

Jimmy Bogard jbogard

Block or report user

Report or block jbogard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View unit.il
// Type: MediatR.Unit
// Assembly: MediatR, Version=7.0.0.0, Culture=neutral, PublicKeyToken=bb9a41a5e8aaa7e2
// MVID: E193BB77-5B6C-4B53-AC55-214CB0FDB9E1
// Location: C:\dev\MediatR\src\MediatR\bin\Release\net461\MediatR.dll
// Sequence point data from C:\dev\MediatR\src\MediatR\bin\Release\net461\MediatR.pdb
.class public sealed sequential ansi beforefieldinit
MediatR.Unit
extends [mscorlib]System.ValueType
implements class [mscorlib]System.IEquatable`1<valuetype MediatR.Unit>, class [mscorlib]System.IComparable`1<valuetype MediatR.Unit>, [mscorlib]System.IComparable
View original.cs
var orderRequest = await _orderRepository.GetItemAsync(id);
orderRequest.Approve();
await _orderRepository.UpdateItemAsync(orderRequest);
foreach (var lineItem in orderRequest.Items)
{
var stock = (await _stockRepository
.GetItemsAsync(s => s.ProductId == lineItem.ProductId))
View Benchmark-before.md
BenchmarkDotNet=v0.10.13, OS=Windows 10.0.17134
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical cores and 4 physical cores
.NET Core SDK=2.1.402
  [Host]     : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT
  Job-OWZBJX : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT

Runtime=Core  Server=True  Toolchain=.NET Core 2.1  
RunStrategy=Throughput  
View Benchmark-after.md
BenchmarkDotNet=v0.10.13, OS=Windows 10.0.17134
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical cores and 4 physical cores
.NET Core SDK=2.1.402
  [Host]     : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT
  Job-TONWLE : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT

Runtime=Core  Server=True  Toolchain=.NET Core 2.1  
RunStrategy=Throughput  
View ConstrainedGenericBenchmark-report-github.md
BenchmarkDotNet=v0.10.13, OS=Windows 10.0.17134
Intel Core i7-7700HQ CPU 2.80GHz (Kaby Lake), 1 CPU, 8 logical cores and 4 physical cores
.NET Core SDK=2.1.402
  [Host]     : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT
  Job-MCHATR : .NET Core 2.1.4 (CoreCLR 4.6.26814.03, CoreFX 4.6.26814.02), 64bit RyuJIT

Runtime=Core  Server=True  Toolchain=.NET Core 2.1  
RunStrategy=Throughput  
View TimeToFirstServiceBenchmark-report-github-dev.md
BenchmarkDotNet=v0.10.13, OS=macOS 10.13.4 (17E199) [Darwin 17.5.0]
Intel Core i7-6567U CPU 3.30GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
.NET Core SDK=2.1.300-preview2-008530
  [Host]     : .NET Core 2.1.0-preview2-26406-04 (CoreCLR 4.6.26406.07, CoreFX 4.6.26406.04), 64bit RyuJIT
  Job-VDUSZZ : .NET Core 2.1.0-preview2-26406-04 (CoreCLR 4.6.26406.07, CoreFX 4.6.26406.04), 64bit RyuJIT

Runtime=Core  Server=True  Toolchain=.NET Core 2.1  
RunStrategy=Throughput  
View TimeToFirstServiceBenchmark-report-github.md
BenchmarkDotNet=v0.10.13, OS=macOS 10.13.4 (17E199) [Darwin 17.5.0]
Intel Core i7-6567U CPU 3.30GHz (Skylake), 1 CPU, 4 logical cores and 2 physical cores
.NET Core SDK=2.1.300-preview2-008530
  [Host]     : .NET Core 2.1.0-preview2-26406-04 (CoreCLR 4.6.26406.07, CoreFX 4.6.26406.04), 64bit RyuJIT
  Job-LGTEBK : .NET Core 2.1.0-preview2-26406-04 (CoreCLR 4.6.26406.07, CoreFX 4.6.26406.04), 64bit RyuJIT

Runtime=Core  Server=True  Toolchain=.NET Core 2.1  
RunStrategy=Throughput  
View ci.Dockerfile
# escape=`
# Use server core as an installer container to extract PowerShell,
# As this is a multi-stage build, this stage will eventually be thrown away
FROM microsoft/windowsservercore:1709 AS installer-env
# Arguments for installing powershell, must be defined in the container they are used
ARG PS_VERSION=6.0.1
ENV PS_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v$PS_VERSION/PowerShell-$PS_VERSION-win-x64.zip
View OrderDetails.cshtml
@{
ViewBag.Title = $"Order {Model.OrderNumber}";
}
<h2>Order #@Model.OrderNumber Details</h2>
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">Order details</h3>
</div>
View OrderDetails.cs
public bool Matches(RouteData routeData, string httpMethod) =>
HttpMethods.IsGet(httpMethod)
&& string.Equals((string)routeData.Values["controller"],
"orders", StringComparison.OrdinalIgnoreCase)
&& routeData.Values.ContainsKey("id");
You can’t perform that action at this time.