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
| public class PoolItem<T> : IDisposable | |
| { | |
| private readonly Action<PoolItem<T>> _onRelease; | |
| public T Value { get; } | |
| public PoolItem(T value, Action<PoolItem<T>> onRelease) | |
| { | |
| _onRelease = onRelease; | |
| Value = value; | |
| } |
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
| public static class SonyReger | |
| { | |
| public static async Task Register(LinkedAccountsModel InputLinkedAccountsModel, ProxyModel proxy) | |
| { | |
| await Task.Delay(1); | |
| using (var wb = DriverBuilder.MakeDriverForSony()) | |
| { | |
| wb.ClickEx(By.CssSelector("asdasd")); |
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 Application.ES | |
| open System | |
| open FsToolkit.ErrorHandling | |
| let inline ( ^ ) f x = f x | |
| type CommandMeta<'id, 'command> = { AggId: 'id; Command: 'command } | |
| type EventMeta<'id, 'payload> = { AggId: 'id; Created: DateTime; Payload: 'payload } | |
| let mkEvent id created x = { AggId = id; Created = created; Payload = x } |
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
| open System | |
| open System.Collections.Concurrent | |
| open System.Threading.Tasks | |
| let inline ( ^ ) f x = f x | |
| let inline safeable f x = | |
| try | |
| Ok (f x) | |
| with e -> Error e |
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 Application.ES | |
| open System | |
| open System.Collections.Concurrent | |
| let inline ( ^ ) f x = f x | |
| type UserStatus = Normal | VIP | SuperVIP | |
| type Name = Name of string |
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
| type ColumnSelector = { Name: string; ColumnName: string } | |
| type RowSelector = { Name: string; RowName: string } | |
| type SetValueArgs = { Name: string; RowName: string; ColumnName: string; Value: string } | |
| type SetDefaultValueArgs = { Name: string; RowName: string; Value: string } | |
| type Command = | |
| | Create of string | |
| | AddColumn of ColumnSelector |
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
| // Learn more about F# at http://fsharp.org | |
| open System | |
| open System.Threading.Tasks | |
| let ( ^ ) f x = f x | |
| type IStore = | |
| abstract member Save: 'T -> Guid |
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
| let inline ( ^ ) f x = f x | |
| let debounce time f = | |
| let loop = MailboxProcessor.Start ^ fun mailbox -> async { | |
| let mutable lastMsg = None | |
| while true do | |
| let! msg = mailbox.TryReceive(time) | |
| match msg with | |
| | None when lastMsg.IsSome -> f lastMsg.Value |
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
| type BuilderStep = | |
| | SetupProxy = 1 | |
| | SetupTimeouts = 2 | |
| type DriverBuilder() = | |
| let steps = Dictionary() | |
| let driverOpt = ChromeOptions() | |
| do |
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 CounterBot = | |
| type State = int | |
| type Msg = | |
| | Increment | |
| | Decrement | |
| let init = 0 |