I hereby claim:
- I am thomaslevesque on github.
- I am thomaslevesque (https://keybase.io/thomaslevesque) on keybase.
- I have a public key whose fingerprint is 32C8 E72A EC90 6E8B 79BF 36C3 7AF5 E7A4 FE44 396B
To claim this, I am signing this object:
<#@ template debug="false" hostspecific="true" language="C#" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Xml" #> | |
<#@ assembly name="System.Xml.Linq" #> | |
<#@ assembly name="EnvDTE" #> | |
<#@ import namespace="System.IO" #> | |
<#@ import namespace="System.Linq" #> | |
<#@ import namespace="System.Text" #> | |
<#@ import namespace="System.Globalization" #> | |
<#@ import namespace="System.Collections.Generic" #> |
using System.Diagnostics.CodeAnalysis; | |
namespace TestNullable | |
{ | |
class Test | |
{ | |
static bool TrySomething1(string s, [NotNullWhen(false)] out string? failReason) | |
{ | |
// warning CS8762: Parameter 'failReason' must have a non-null value when exiting with 'false'. | |
return s.Length % 2 == 0 |
Pattern: \[SwaggerResponse\((?<code>\d+), (?<type>typeof\([A-Za-z\.\<\>]+\)), (?<desc>\"[^\"]+\")\)\] | |
Replacement: [SwaggerResponse(${code}, ${desc}, ${type})] |
async void Main() | |
{ | |
try | |
{ | |
await FooAsync().AsyncTrace(); | |
} | |
catch(Exception ex) | |
{ | |
ex.FullTrace().Dump(); | |
} |
// Solution for James Michael Hare's anagram challenge (http://geekswithblogs.net/BlackRabbitCoder/archive/2015/07/28/little-puzzlersndashlist-all-anagrams-for-a-word.aspx) | |
// Run in LinqPad, adding a reference to Microsoft.Experimental.Collections | |
void Main() | |
{ | |
string path = @"D:\tmp\words.txt"; | |
var dict = new MultiValueDictionary<string, string>(); | |
foreach (var word in File.ReadLines(path)) | |
{ | |
dict.Add(new string(word.OrderBy(c => c).ToArray()), word); | |
} |
pre { | |
padding: 0; | |
border: none; | |
} | |
article h3 { | |
font-size: 20px; | |
} | |
code { |
using System; | |
using NUnit.Framework; | |
namespace MyLibrary.Tests.XEnumerableTests | |
{ | |
[TestFixture] | |
class FullOuterJoinTests | |
{ | |
[Test] | |
public void FullOuterJoin_Throws_If_Argument_Null() |
public class ThemeInfo | |
{ | |
private readonly string _themeName; | |
private readonly string _themeColor; | |
private readonly string _themeSize; | |
private readonly string _themeFileName; | |
public ThemeInfo(string name, string fileName, string color, string size) | |
{ | |
_themeName = name; |
I hereby claim:
To claim this, I am signing this object:
using FakeItEasy; | |
using FakeItEasy.Creation; | |
namespace TestUtilies | |
{ | |
public abstract class FakeConfigurator<T> : FakeOptionsBuilder<T> | |
{ | |
protected override void BuildOptions(IFakeOptions<T> options) | |
{ | |
options.ConfigureFake(ConfigureFake); |