$/
.vscode/
.fake/
.nuget/
nuget.exe
nuget.config
.paket/
paket.bootstrapper.exe
paket.targets
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
namespace EqualityComparer | |
{ | |
using System.Collections; | |
using System.Collections.Generic; | |
public class GenericEqualityComparer<T> : IEqualityComparer<T> | |
{ | |
public static GenericEqualityComparer<T> Create() | |
{ |
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.Data; | |
using OfficeOpenXml; | |
namespace ExcelExport | |
{ | |
internal class DataTableExcelExporter | |
{ | |
private readonly IEnumerable<string> _columnsToHide; |
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
function Get-Batchfile ($file) { | |
$cmd = "`"$file`" & set" | |
cmd /c $cmd | Foreach-Object { | |
$p, $v = $_.split('=') | |
Set-Item -path env:$p -value $v | |
} | |
} | |
function VsVars32($version = "14.0") | |
{ | |
<# $key = "HKLM:SOFTWARE\Microsoft\VisualStudio\" + $version |
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
static class ProjectChooser | |
{ | |
private static Project _webProject; | |
public static void FixOutputPath(this Project project) { | |
var webProject = project.DTE.Solution.FindWebProject(); | |
SetOutputPathTo(project, webProject); | |
} | |
public static void AddMvcReference(this Project project) { |
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
//chunk records by 100 | |
let longSeq = [1..10000] | |
let size = 100 | |
let foo (x:IEnumerable<int>) = x |> Seq.iter (fun x -> printf "%i" x) | |
longSeq |> Seq.chunkBySize size |> Seq.iter (fun seq -> foo seq) | |
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="FSharp.NET.Sdk;Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<OutputType>Exe</OutputType> | |
<TargetFramework>netcoreapp1.1</TargetFramework> | |
</PropertyGroup> | |
<ItemGroup> | |
<Compile Include="rss.fs" /> |
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; | |
namespace NotEnums | |
{ | |
public class Options | |
{ | |
public string Value { get; private set; } | |
private const string Option1 = "Option1"; | |
private const string Option2 = "Option2"; |
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
{ | |
"$schema": "http://json.schemastore.org/template", | |
"author": "Adam", | |
"classifications": [ "classlib" ], | |
"name": "My class lib", | |
"identity": "Adam.ClassLib2.CSharp", | |
"groupIdentity":"MyClassLib", | |
"shortName": "MyClassLib", // You can create the project using this short name instead of the one above. | |
"tags": { |
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.Runtime.InteropServices.ComTypes; | |
namespace Result | |
{ | |
public static class Result | |
{ | |
public static Result<T,TError> Ok<T,TError>(T value) | |
{ |
OlderNewer