type IReaderWriter =
abstract member Read : unit -> unit
abstract member Write : unit -> unit
type IReader =
abstract member Read : unit -> unit
type SomeClass1(x: int, y: float) =
// class inheritance - C# | |
public abstract class Ancestor {} | |
public class Descendant: Ancestor, IDisposable | |
{ | |
public void Dispose() {} | |
public virtual void MyVirt() {} | |
} | |
// class inheritance - F# |
import akka.persistence.AtLeastOnceDelivery.AtLeastOnceDeliverySnapshot | |
import akka.persistence.{SnapshotOffer, PersistentActor, AtLeastOnceDelivery} | |
import akka.actor.{Props, ActorSystem, ActorPath, Actor} | |
case class Message(data: String) | |
case class Confirmable(deliveryId: Long, data: String) | |
case class Confirmation(deliveryId: Long) | |
case class Snap(snapshot: AtLeastOnceDeliverySnapshot) | |
class ExampleAtLeastOnceDeliveryActor(val deliveryPath: ActorPath) extends PersistentActor with AtLeastOnceDelivery { |
type State = { X: int; Y: int } | |
let system = ConfigurationFactory.Default() |> System.create "FSharpActors" | |
let aref = | |
spawn system "actor" | |
<| fun mailbox -> | |
let rec loop state = | |
actor { |
public class Guest : ReceiveActor | |
{ | |
public Guest() | |
{ | |
Receive<Badge>(badge => | |
{ | |
// ... do something with received badge | |
}); |
open System | |
open System.Threading | |
open Akkling | |
open Akkling.Persistence | |
let system = System.create "persistent-system" (Configuration.defaultConfig()) | |
type Event = | |
| Added of int | |
| Removed of int |
//----------------------------------------------------------------------- | |
// <copyright file="TaskExtensions.cs" company="Akka.NET Project"> | |
// Copyright (C) 2009-2015 Typesafe Inc. <http://www.typesafe.com> | |
// Copyright (C) 2013-2015 Akka.NET project <https://github.com/akkadotnet/akka.net> | |
// </copyright> | |
//----------------------------------------------------------------------- | |
using System; | |
using System.Collections.Generic; | |
using System.Net.Mime; |
Starting Target: GenerateReferenceDocs (==> RunTests, GenerateHelp) | |
FSharp.Formatting Information: 0 : FSharp.Formatting Logging setup! | |
Yaaf.FSharp.Scriping Information: 0 : Yaaf.FSharp.Scripting Logging setup! | |
Copying file: D:\projects\dev\Akkling\docs\output\img\logo-template.pdn | |
Copying file: D:\projects\dev\Akkling\docs\output\img\logo.png | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\style.css | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\style_light.css | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\tips.js | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\img\github-blue.png | |
Copying styles and scripts: D:\projects\dev\Akkling\docs\output\content\img\github.png |
# output line format: <added+removed> <added> <removed> <author> | |
git log <past_last_release_tag_here>..HEAD --oneline --numstat --pretty=format:%an --no-merges --abbrev-commit | gawk 'author == "" { author = $0; next } /^$/ { author = ""; next} {added[author] += $1; removed[author] +=$2 } END { for(author in added) { printf "%s\t%s\t%s\t%s\n", added[author]+removed[author], added[author], removed[author], author } }' | sort -n -k1 -r |
public sealed class GetState { } | |
public sealed class Increment { } | |
public sealed class Changed { } | |
public class TestCaseActor : UntypedPersistentActor | |
{ | |
private int state = 0; | |
public override string PersistenceId { get; } = "yolo"; |