This file contains hidden or 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 Project.Schema | |
open System | |
open System.Runtime.CompilerServices | |
open System.Collections.Generic | |
// http://blogs.msdn.com/b/jaredpar/archive/2010/07/27/converting-system-func-lt-t1-tn-gt-to-fsharpfunc-lt-t-tresult-gt.aspx | |
[<Extension>] | |
type public FSharpFuncUtil = | |
[<Extension>] |
This file contains hidden or 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
// adapted from https://github.com/gregoryyoung/m-r/blob/master/SimpleCQRS/CommandHandlers.cs | |
// actual code https://github.com/thinkbeforecoding/m-r/tree/FSharp/FsSimpleCQRS | |
module Commands = | |
//[<Abstract>] | |
type DeactivateInventoryItem = | |
{ | |
InventoryItemId: Guid | |
OriginalVersion: int // version I'm acting on, for checking to make sure my change only fires if the data the change was based on is still unchanged |
This file contains hidden or 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
{ | |
// See https://go.microsoft.com/fwlink/?LinkId=733558 | |
// for the documentation about the tasks.json format | |
// in projectDir/.vscode | |
"version": "0.1.0", | |
"command": "cmd", | |
"isShellCommand": true, | |
"args": [ | |
"/C" | |
], |
This file contains hidden or 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
// Suave is working! | |
// Learn more about F# at http://fsharp.org | |
// See the 'F# Tutorial' project for more help. | |
open System | |
open System.IO | |
open Suave | |
open Suave.Http | |
open Suave.Http.Applicatives | |
open Suave.Http.Successful |
This file contains hidden or 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
// search code for sproc references and check that they exist in the db project | |
// consider three different joins, one with each as primary to find things that exist in one but not the other | |
// compiles and does exactly what is desired now | |
module Settings = | |
let debug = false | |
let slnRoot = Path.Combine(Environment.ExpandEnvironmentVariables("%devroot%"),"PracticeManagement","dev","PracticeManagement") | |
let startPath = slnRoot | |
let sqlProjDirectory = Path.Combine(slnRoot,"Db") //C:\TFS\PracticeManagement\dev\PracticeManagement\Db | |
let sqlProjectFile = | |
// let the finding of code references work even if the sql project file doesn't exist |
This file contains hidden or 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
// trying to learn computation expressions | |
//http://theburningmonk.com/2012/01/f-retry-workflow/ | |
#if LINQPAD // doesn't actually work right in linqpad, but conveys intention, hopefully | |
let dumpt (title:string) x = x.Dump(title); x | |
#else | |
let dumpt (title:string) x = printfn "%s:%A" title x; x | |
#endif | |
module AttemptBuilding = |
This file contains hidden or 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
// consider doing this in the Load or Window_ContentRendered events instead | |
// options to clean up temporary things like frontmost could be done in Window_Initialized | |
// using options from http://stackoverflow.com/questions/257587/bring-a-window-to-the-front-in-wpf | |
public new bool? ShowDialog() | |
{ | |
var t = new System.Threading.Tasks.Task(() => | |
{ | |
// wait for the window to show from show dialog | |
Task.Delay(1000); |
This file contains hidden or 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
#r @"packages/FAKE/tools/FakeLib.dll" | |
open Fake | |
let lprunPath = @"C:\ProgramData\LINQPad\Updates50\510\lprun.exe" | |
type System.String with | |
static member Delimit delimiter (items:string seq) = | |
String.Join(delimiter,items |> Array.ofSeq) | |
module Proc = | |
// ExecProcess is a thin wrapper around Process.Start |
This file contains hidden or 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
[Fake] | |
linuxPrefix = "mono" | |
command = "build.cmd" | |
build = "build.fsx" |
This file contains hidden or 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
[<AutoOpen>] | |
module Pm.Schema.BReusable | |
open System | |
open System.Collections.Generic | |
open System.Diagnostics | |
//consider pulling in useful functions from https://gist.github.com/ruxo/a9244a6dfe5e73337261 | |
// long pipe chains don't allow breakpoints anywhere inside | |
// does this need anything to prevent the method from being inlined/optimized away? |