- https://github.com/DustinCampbell/RoslynNUnitLight
- https://github.com/DustinCampbell/CSharpEssentials
- https://github.com/Wintellect/Wintellect.Analyzers
- http://www.wintellect.com/devcenter/jrobbins/more-wintellect-analyzers-and-some-lessons-learned-writing-roslyn-analyzers
- https://msdn.microsoft.com/en-US/library/2b8dee02-55fc-430b-9047-523c8e943032
- https://www.nuget.org/packages/Microsoft.VisualStudio.Azure.CodeAnalysis/
- http://blogs.msdn.com/b/csharpfaq/archive/2015/05/01/roslyn-ships-v1.0-rc2-with-go-live-license.aspx
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>net462</TargetFramework> | |
<GenerateAssemblyInfo>false</GenerateAssemblyInfo> | |
<DebugType>full</DebugType> | |
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath> | |
</PropertyGroup> |
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
public static class SimpleConfig | |
{ | |
static string configFilePath; | |
public static void InitializeInLocalApplicationData(string name) | |
{ | |
Initialize(Path.Combine( | |
Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), | |
name, | |
"config.xml" |
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 System.ComponentModel; | |
using System.Linq; | |
using BenchmarkDotNet.Attributes; | |
using BenchmarkDotNet.Attributes.Exporters; | |
using BenchmarkDotNet.Running; | |
[MemoryDiagnoser] | |
[MarkdownExporter] | |
public class PropertyChangedArgBenchmarks | |
{ |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using static System.Console; | |
using static System.ConsoleColor; | |
namespace CUI | |
{ | |
public class ConsoleApplication<TScreen> |
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
/* | |
Copyright 2013 Cameron MacFarland | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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 System; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
static void Main() | |
{ | |
Util.Method(() => ActionMethod()); | |
Util.Method(ActionMethod); // Error CS0121 The call is ambiguous between the following methods or properties: 'Util.Method(Action)' and 'Util.Method(Func<Task>)' | |
} |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\.sln\ShellNew] | |
"Data"=hex:EF,BB,BF,0D,0A,4D,69,63,72,6F,73,6F,66,74,20,56,69,73,75,61,6C,20,53,74,75,64,69,6F,20,53,6F,6C,75,74,69,6F,6E,20,46,69,6C,65,2C,20,46,6F,72,6D,61,74,20,56,65,72,73,69,6F,6E,20,31,32,2E,30,30,0D,0A,23,20,56,69,73,75,61,6C,20,53,74,75,64,69,6F,20,32,30,31,32,0D,0A,47,6C,6F,62,61,6C,0D,0A,09,47,6C,6F,62,61,6C,53,65,63,74,69,6F,6E,28,53,6F,6C,75,74,69,6F,6E,50,72,6F,70,65,72,74,69,65,73,29,20,3D,20,70,72,65,53,6F,6C,75,74,69,6F,6E,0D,0A,09,09,48,69,64,65,53,6F,6C,75,74,69,6F,6E,4E,6F,64,65,20,3D,20,46,41,4C,53,45,0D,0A,09,45,6E,64,47,6C,6F,62,61,6C,53,65,63,74,69,6F,6E,0D,0A,45,6E,64,47,6C,6F,62,61,6C,0D,0A |
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 System; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Threading; | |
using System.Threading.Tasks; | |
class Program | |
{ | |
static void Main() | |
{ |
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 System; | |
using System.Linq; | |
namespace System.Collections.Generic | |
{ | |
public static class DictionaryExtensions | |
{ | |
public static TValue GetOrAdd<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, TKey key, Func<TKey, TValue> valueFactory) | |
{ | |
TValue v; |