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
using System; | |
using System.Collections.Generic; | |
using System.Collections.ObjectModel; | |
using System.Globalization; | |
using System.Linq; | |
using System.Xml.Linq; | |
using Microsoft.AspNetCore.DataProtection.KeyManagement; | |
using Microsoft.AspNetCore.DataProtection.Repositories; | |
using Microsoft.Extensions.DependencyInjection; | |
using Microsoft.Extensions.Options; |
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
#time "on" | |
#load "Bootstrap.fsx" | |
open System | |
open Akka.Actor | |
open Akka.Configuration | |
open Akka.FSharp | |
open Akka.TestKit | |
// #Using Actor |
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
// NuGet Packages | |
// Serilog.Enrichers.Environment | |
// Serilog.Sinks.ApplicationInsights | |
// Serilog.Sinks.Console | |
open System | |
open Serilog | |
open Serilog.Events | |
[<RequireQualifiedAccess>] |
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
(* | |
An exercise in modeling. Users can be verified or banned. A user can be banned only if their username is "offensive". | |
We assume the Onion architecture. Modules `User` and `VerifiedUser` belong to the model. Module `Application` belongs to | |
the application layer. Data access layer is omitted completely; it should be fairly trivial. | |
Note that the verified/banned aspect of a user is modeled "externally" to the notion of user itself. In particular, | |
there are no "aggregates" below which combine all aspects of a user. | |
*) |
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
#if INTERACTIVE | |
#r "FSharp.PowerPack" | |
#r "FSharp.PowerPack.Linq" | |
#endif | |
open System | |
open Microsoft.FSharp.Quotations | |
open Microsoft.FSharp.Linq.QuotationEvaluation | |
open System.Linq.Expressions |
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
root = true | |
[*] | |
indent_style = space | |
indent_size = 4 | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = false | |
[*.fs] |
Fable is an F# language to javascript compiler powered by Babel.
F# is a language that runs on a Microsoft CLR. Using the .NET Core CLR implementation it works on Windows, Mac or Linux.
- .NET Core SDK - download the latest 2.1 SDK
- Mono -
mono-complete
package - F# compiler -
fsharp
package from the mono repository
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
module App | |
open Elmish | |
type State = | |
{ CurrentUser: string option } | |
type Msg = | |
| SignIn of string | |
| SignOut |
NewerOlder