View dotnetlayout.md
$/
  .vscode/
  .fake/
  .nuget/
    nuget.exe
    nuget.config
  .paket/
    paket.bootstrapper.exe
    paket.targets
View NotEnums.cs
using System;
namespace NotEnums
{
public class Options
{
public string Value { get; private set; }
private const string Option1 = "Option1";
private const string Option2 = "Option2";
View Sample.fsproj
<Project Sdk="FSharp.NET.Sdk;Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp1.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Compile Include="rss.fs" />
View chunkBySizeExample.fs
//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)
View ProjectChooser.cs
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) {
View Microsoft.Powershell_profile.ps1
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
View DataTableExcelExporter.cs
using System;
using System.Collections.Generic;
using System.Data;
using OfficeOpenXml;
namespace ExcelExport
{
internal class DataTableExcelExporter
{
private readonly IEnumerable<string> _columnsToHide;
View GenericEqualityComparer
namespace EqualityComparer
{
using System.Collections;
using System.Collections.Generic;
public class GenericEqualityComparer<T> : IEqualityComparer<T>
{
public static GenericEqualityComparer<T> Create()
{