- 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
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
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
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
public static class AkavacheExtensions | |
{ | |
public static IObservable<string> GetOrFetchWithETag(this IBlobCache cache, string url) | |
{ | |
var result = | |
// Get from cache | |
cache.GetObject<string>(url) | |
// Cached values are true | |
.Select(x => Tuple.Create(x, true)) |
I hereby claim:
- I am distantcam on github.
- I am distantcam (https://keybase.io/distantcam) on keybase.
- I have a public key whose fingerprint is F6C6 9E11 DC61 9DA7 B310 8417 875C C3D7 5421 5F94
To claim this, I am signing this object:
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; |
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 CecilExtensions | |
{ | |
/// <summary> | |
/// Finds a type within the references of an assembly. | |
/// </summary> | |
/// <param name="module">The module to search the references of.</param> | |
/// <param name="type">The type to look for.</param> | |
/// <returns>The found type definition, or null if the type is not found.</returns> | |
/// <example>To find <see cref="System.Object"/> within a module. | |
/// <code>module.Find(typeof(System.Object));</code> |
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.Reactive; | |
using System.Reactive.Linq; | |
using System.Reactive.Subjects; | |
using System.Windows.Input; | |
public class RxCommand : ICommand, IObservable<object>, IDisposable | |
{ | |
private readonly ISubject<bool> canExecuteSubject; | |
private readonly ISubject<object> executeSubject; |