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
#r "mscorlib.dll" | |
#r "System.dll" | |
open System | |
open System.Windows.Forms | |
type Update<'Msg, 'Model> = 'Msg -> 'Model -> 'Model | |
type Dispatch<'Msg> = 'Msg -> obj -> EventArgs -> unit | |
type View<'Model, 'Msg> = 'Model -> Dispatch<'Msg> -> Control |
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.Configuration; | |
using System.Data.SqlServerCe; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading; |
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
type internal AsyncCallableHandler(messageHandler) = | |
inherit DelegatingHandler(messageHandler) | |
member internal x.CallSendAsync(request, cancellationToken) = | |
base.SendAsync(request, cancellationToken) |
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
#I @"..\packages\Microsoft.Net.Http.2.0.20505.0\lib\net40" | |
#I @"..\packages\Microsoft.AspNet.WebApi.Core.4.0.20505.0\lib\net40" | |
#I @"..\packages\Microsoft.AspNet.WebApi.Client.4.0.20505.0\lib\net40" | |
#I @"..\packages\ImpromptuInterface.5.6.7\lib\net40" | |
#I @"..\packages\ImpromptuInterface.FSharp.1.1.0\lib\net40" | |
#I @"..\packages\Newtonsoft.Json.4.5.6\lib\net40" | |
#I @"..\packages\Unquote.2.2.1\lib\net40" | |
#r "System.Net.Http.dll" | |
#r "System.Net.Http.Formatting.dll" |
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 WebSocket | |
// Appache 2.0 license | |
// References: | |
// [1] Proposed WebSockets Spec December 2011 http://tools.ietf.org/html/rfc6455 | |
// [2] John McCutchan (Google Dart Team Member) http://www.altdevblogaday.com/2012/01/23/writing-your-own-websocket-server/ | |
// [3] A pretty good Python implemenation by mrrrgn https://github.com/mrrrgn/websocket-data-frame-encoder-decoder/blob/master/frame.py | |
// [4] WebSockets Organising body http://www.websocket.org/echo.html | |
// [5] AndrewNewcomb's Gist (starting point) https://gist.github.com/AndrewNewcomb/711664 |
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
module AsyncEx | |
open System | |
type Async<'a> with | |
member this.ToObservable() = | |
{ new IObservable<_> with | |
member x.Subscribe(o) = | |
if o = null then nullArg "observer" | |
let cts = new System.Threading.CancellationTokenSource() | |
let invoked = ref 0 |
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
// NOTE: import this Nuget package: TaskBuilder.fs (written using 2.1.0) | |
// | |
// Tested in LINQPad (hence Dump method usage). | |
open System | |
open System.Collections | |
open System.Collections.Generic | |
open System.Diagnostics | |
open System.Linq | |
open System.Threading |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- master |
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
name: Azure Static Web Apps CI/CD | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- master |
NewerOlder