Skip to content

Instantly share code, notes, and snippets.

Avatar
😎
whereing glasses

Roman Melnikov Neftedollar

😎
whereing glasses
View GitHub Profile
View Identity.fs
// <PropertyGroup>
// <OutputType>Exe</OutputType>
// <TargetFramework>netcoreapp3.0</TargetFramework>
// </PropertyGroup>
type ApplicationUser(name, email) =
inherit MongoIdentityUser<Guid>(name, email)
new(name) = ApplicationUser(name,name)
new() = ApplicationUser()
View gist:f0c37a552565eb7951cffab30da20e7d
// Learn more about F# at http://fsharp.org
open Thoth.Json.Net
open TypeShape.Core.Core
open FSharp.Reflection
open Groot.Contracts.SportRadar.Types.Soccer
open System
let apply (d1:Decoder<'C -> 'B>) (d2:Decoder<'C>) : Decoder<'B> =
View Srtp and Records.fs
type Test =
{ EntityId: string }
type Test2 =
{ EntityId: string
Name: string
Length: int }
let inline (|HasEntityId|) x =
View seq.fs
/// Call all specified tasks sequentially one after the other and combine the results together.
let seq (tasks: OrchestratorBuilder.ContextTask<'a> list) =
let rec work acc (rem : OrchestratorBuilder.ContextTask<'a> list) =
match rem with
| [] -> fun _ -> Task.FromResult (acc |> List.rev)
| d :: rest -> orchestrator {
let! t = d
return! work (t::acc) rest
}
work [] tasks
View client_server_definition.fs
module Server =
open Shared
open Fable.Remoting.Client
/// A proxy you can use to talk to server directly
let api : ICounterProtocol =
Proxy.createWithBuilder<ICounterProtocol> Route.builder
You can’t perform that action at this time.