Suppose you're opening an issue and there's a lot noisey logs that may be useful.
Rather than wrecking readability, wrap it in a <details>
tag!
<details>
<summary>Summary Goes Here</summary>
...this is hidden, collapsable content...
public Assembly[] GetAssemblies() | |
{ | |
var assemblies = new List<Assembly>(); | |
foreach(ProcessModule module in Process.GetCurrentProcess().Modules) | |
{ | |
try | |
{ | |
var assemblyName = AssemblyLoadContext.GetAssemblyName(module.FileName); | |
var assembly = Assembly.Load(assemblyName); | |
assemblies.Add(assembly); |
namespace Utilities | |
{ | |
using System; | |
using System.Collections; | |
using System.Collections.Generic; | |
public static class NetCoreUtilities | |
{ | |
public static string[] GetTrustedPlatformAssemblies() | |
{ |
static string getNamePreserveCase(EnvDTE.Document doc) | |
{ | |
var name = doc.Name; | |
var fullName = doc.ProjectItem.FileNames[0]; | |
name = fullName.Substring(fullName.Length - name.Length, name.Length); | |
return name; | |
} |
```ini | |
Host Process Environment Information: | |
BenchmarkDotNet.Core=v0.9.9.0 | |
OS=Microsoft Windows NT 6.2.9200.0 | |
Processor=Intel(R) Core(TM) i7-4500U CPU 1.80GHz, ProcessorCount=4 | |
Frequency=2338341 ticks, Resolution=427.6536 ns, Timer=TSC | |
CLR=MS.NET 4.0.30319.42000, Arch=32-bit ? | |
GC=Concurrent Workstation | |
JitModules=clrjit-v4.6.1586.0 |
Host Process Environment Information:
BenchmarkDotNet.Core=v0.9.9.0
OS=Microsoft Windows NT 6.2.9200.0
Processor=Intel(R) Core(TM) i7-4500U CPU 1.80GHz, ProcessorCount=4
Frequency=2338341 ticks, Resolution=427.6536 ns, Timer=TSC
CLR=MS.NET 4.0.30319.42000, Arch=32-bit ?
GC=Concurrent Workstation
JitModules=clrjit-v4.6.1586.0
using System; | |
using System.Reflection; | |
using System.Collections.Generic; | |
using System.Linq.Expressions; | |
public static class ExpressionUtilities | |
{ | |
public static object GetValue(Expression expression) | |
{ | |
return getValue(expression, true); |
// Add the `BenchmarkDotNet.TestDriven` NuGet package. | |
using System; | |
using System.Reflection; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.TestDriven; | |
// Let TestDriven.Net know how to run benchmarks. | |
[assembly: BenchmarkTestRunner(typeof(FastAndDirtyConfig))] |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<packageSources> | |
<add key="LocalPackages" value="./LocalPackages" /> | |
</packageSources> | |
<activePackageSource> | |
<!-- this tells that all of them are active --> | |
<add key="All" value="(Aggregate source)" /> | |
</activePackageSource> | |
</configuration> |
The rules are:
CodeUnderTest
must not be changed.