0 people like it.
Like the snippet!
Agent Registry
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
133:
134:
135:
136:
137:
138:
139:
140:
141:
142:
143:
144:
145:
146:
147:
148:
149:
150:
151:
152:
153:
154:
155:
156:
157:
158:
159:
160:
161:
162:
163:
164:
165:
166:
167:
168:
169:
170:
171:
172:
173:
174:
175:
176:
177:
178:
179:
180:
181:
182:
183:
184:
185:
|
open System
type ActorException(exn, actor : IActor) =
inherit Exception(sprintf "An exception occured in Actor(%s), please see inner exception for more details" actor.Id, exn)
member x.Actor
with get() = actor
and ActorMessage<'msg> =
| Message of 'msg
| ParameterizedQuery of AsyncReplyChannel<obj> * 'msg
| FrameworkMessage of ActorFwkMessage
and ActorFwkMessage =
| Stop
| Query of AsyncReplyChannel<obj>
| Restart
and MessageLoop<'msg, 'state> = (MailboxProcessor<ActorMessage<'msg>> -> 'state -> Async<unit>)
and IActor =
abstract Id : string with get
[<CLIEvent>]
abstract Error : IEvent<ActorException> with get
abstract Post : 'a -> unit
abstract PostAndReply<'b> : 'a -> 'b
abstract PostControlMessage : ActorFwkMessage -> unit
abstract Query<'a> : unit -> 'a
and Actor<'msg, 'state>(id, messageLoop : MessageLoop<'msg, 'state>, state) as self =
let mutable initialState = state
let mutable _messageLoop = messageLoop
let errorStream = new Event<ActorException>()
let mutable id =
let tId = defaultArg id (Guid.NewGuid().ToString())
if String.IsNullOrEmpty(tId)
then Guid.NewGuid.ToString()
else tId
let mutable actor = MailboxProcessor<ActorMessage<'msg>>.Start(fun inbox -> messageLoop inbox initialState)
let reBuildProcessor() =
actor <- MailboxProcessor<ActorMessage<'msg>>.Start(fun inbox -> messageLoop inbox initialState)
do
actor.Error.Add(fun exn -> reBuildProcessor()
errorStream.Trigger(ActorException(exn, self)))
override x.ToString() =
(x :> IActor).Id
member x.MessageLoop
with get() = _messageLoop
and set(v) =
_messageLoop <- v
reBuildProcessor()
member x.InitialState
with get() = initialState
and set(v) =
initialState <- v
reBuildProcessor()
interface IActor with
member x.Id with get() = id
[<CLIEvent>]
member x.Error
with get() = errorStream.Publish
member x.Post(msg) =
actor.Post(Message(unbox<'msg>(box(msg))))
member x.PostControlMessage(msg : ActorFwkMessage) =
actor.Post(FrameworkMessage(msg))
member x.PostAndReply<'b>(msg) =
actor.PostAndReply(fun rc -> ParameterizedQuery(rc,unbox<'msg>(box(msg)))) :?> 'b
member x.Query<'a>() =
actor.PostAndReply(fun rc -> FrameworkMessage(Query(rc))) :?> 'a
type RegistryMessage =
| Register of IActor
| UnRegister of IActor
| Dispose
type RegistryEvent =
| OnPostControlMessage of IActor * ActorFwkMessage
| OnRegister of IActor
| OnUnregister of IActor
| OnPost of IActor * obj
| OnPostAndReply of IActor * obj
| OnQuery of IActor
| OnError of Exception
type Registry() =
static let registryEvent = new Event<RegistryEvent>()
static let fireRegistryCallback(event : RegistryEvent) =
async
{
try
registryEvent.Trigger(event)
with
e -> ()
} |> Async.Start
static let messageHandler (msg:RegistryMessage) (state:Map<string,IActor>) =
match msg with
| Register(ref) ->
fireRegistryCallback(OnRegister(ref))
state.Add(ref.Id, ref)
| UnRegister(ref) ->
fireRegistryCallback(OnUnregister(ref))
state.Remove ref.Id
| Dispose ->
state |> Map.iter (fun _ c -> c.PostControlMessage(Stop))
Map.empty
static let defaultErrorHandler id exn =
registryEvent.Trigger(OnError(ActorException(exn, id)))
static let registrationActor = Actor<RegistryMessage, Map<string,IActor>>(Some <| "Registry", MessageLoopImpl.defaultMessageLoop messageHandler, Map.empty<string,IActor>) :> IActor
static let actorFunc f target =
let actors : Map<string,IActor> = registrationActor.Query()
match actors.TryFind target with
| Some(ref) -> Some <| f(ref)
| None -> None
[<CLIEvent>]
static member RegistryEvent
with get() = registryEvent.Publish
static member Register(actorRef : IActor) =
registrationActor.Post(Register(actorRef))
static member UnRegister(actorRef : IActor) =
registrationActor.Post(UnRegister(actorRef))
static member PostControlMessage (target : string) (msg) =
actorFunc (fun ref ->
ref.PostControlMessage(msg)
fireRegistryCallback(OnPostControlMessage(ref, msg))
) target
|> Option.isSome
static member Post (target : string) (msg) =
match target with
| "*" ->
Registry.PostToAll msg
true
| _ ->
actorFunc (fun ref ->
ref.Post(msg)
fireRegistryCallback(OnPost(ref, msg))
) target
|> Option.isSome
static member PostToAll msg =
let actors : Map<string,IActor> = registrationActor.Query()
actors |> Map.iter (fun k v -> v.Post(msg))
static member PostAndReply (target : string) (msg) =
actorFunc (fun ref ->
let res = ref.PostAndReply()
fireRegistryCallback(OnPostAndReply(ref, msg))
res
) target
static member Query (target : string) =
actorFunc (fun ref ->
let res = ref.Query()
fireRegistryCallback(OnQuery(ref))
res
) target
static member Dispose() =
registrationActor.Post(Dispose) |> ignore
registrationActor.PostControlMessage(Stop) |> ignore
|
namespace System
Multiple items
type ActorException =
inherit Exception
new : exn:Exception * actor:IActor -> ActorException
member Actor : IActor
Full name: Script.ActorException
--------------------
new : exn:Exception * actor:IActor -> ActorException
Multiple items
val exn : Exception
--------------------
type exn = Exception
Full name: Microsoft.FSharp.Core.exn
val actor : IActor
type IActor =
interface
abstract member Post : 'a -> unit
abstract member PostAndReply : obj -> 'b
abstract member PostControlMessage : ActorFwkMessage -> unit
abstract member Query : unit -> 'a
abstract member add_Error : Handler<ActorException> -> unit
abstract member Error : IEvent<ActorException>
abstract member Id : string
abstract member remove_Error : Handler<ActorException> -> unit
end
Full name: Script.IActor
Multiple items
type Exception =
new : unit -> Exception + 2 overloads
member Data : IDictionary
member GetBaseException : unit -> Exception
member GetObjectData : info:SerializationInfo * context:StreamingContext -> unit
member GetType : unit -> Type
member HelpLink : string with get, set
member InnerException : Exception
member Message : string
member Source : string with get, set
member StackTrace : string
...
Full name: System.Exception
--------------------
Exception() : unit
Exception(message: string) : unit
Exception(message: string, innerException: exn) : unit
Exception(info: Runtime.Serialization.SerializationInfo, context: Runtime.Serialization.StreamingContext) : unit
val sprintf : format:Printf.StringFormat<'T> -> 'T
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.sprintf
property IActor.Id: string
type exn = Exception
Full name: Microsoft.FSharp.Core.exn
val x : ActorException
Multiple items
member ActorException.Actor : IActor
Full name: Script.ActorException.Actor
--------------------
type Actor<'msg,'state> =
interface IActor
new : id:string option * messageLoop:MessageLoop<'msg,'state> * state:'state -> Actor<'msg,'state>
override ToString : unit -> string
member InitialState : 'state
member MessageLoop : MessageLoop<'msg,'state>
member InitialState : 'state with set
member MessageLoop : MessageLoop<'msg,'state> with set
Full name: Script.Actor<_,_>
--------------------
new : id:string option * messageLoop:MessageLoop<'msg,'state> * state:'state -> Actor<'msg,'state>
type ActorMessage<'msg> =
| Message of 'msg
| ParameterizedQuery of AsyncReplyChannel<obj> * 'msg
| FrameworkMessage of ActorFwkMessage
Full name: Script.ActorMessage<_>
union case ActorMessage.Message: 'msg -> ActorMessage<'msg>
union case ActorMessage.ParameterizedQuery: AsyncReplyChannel<obj> * 'msg -> ActorMessage<'msg>
type AsyncReplyChannel<'Reply>
member Reply : value:'Reply -> unit
Full name: Microsoft.FSharp.Control.AsyncReplyChannel<_>
type obj = Object
Full name: Microsoft.FSharp.Core.obj
union case ActorMessage.FrameworkMessage: ActorFwkMessage -> ActorMessage<'msg>
type ActorFwkMessage =
| Stop
| Query of AsyncReplyChannel<obj>
| Restart
Full name: Script.ActorFwkMessage
union case ActorFwkMessage.Stop: ActorFwkMessage
union case ActorFwkMessage.Query: AsyncReplyChannel<obj> -> ActorFwkMessage
union case ActorFwkMessage.Restart: ActorFwkMessage
type MessageLoop<'msg,'state> = MailboxProcessor<ActorMessage<'msg>> -> 'state -> Async<unit>
Full name: Script.MessageLoop<_,_>
Multiple items
type MailboxProcessor<'Msg> =
interface IDisposable
new : body:(MailboxProcessor<'Msg> -> Async<unit>) * ?cancellationToken:CancellationToken -> MailboxProcessor<'Msg>
member Post : message:'Msg -> unit
member PostAndAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> Async<'Reply>
member PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> 'Reply
member PostAndTryAsyncReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> Async<'Reply option>
member Receive : ?timeout:int -> Async<'Msg>
member Scan : scanner:('Msg -> Async<'T> option) * ?timeout:int -> Async<'T>
member Start : unit -> unit
member TryPostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> 'Reply option
...
Full name: Microsoft.FSharp.Control.MailboxProcessor<_>
--------------------
new : body:(MailboxProcessor<'Msg> -> Async<unit>) * ?cancellationToken:Threading.CancellationToken -> MailboxProcessor<'Msg>
Multiple items
type Async
static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
static member AwaitTask : task:Task<'T> -> Async<'T>
static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
static member CancelDefaultToken : unit -> unit
static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg:'Arg1 * beginAction:('Arg1 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * beginAction:('Arg1 * 'Arg2 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromBeginEnd : arg1:'Arg1 * arg2:'Arg2 * arg3:'Arg3 * beginAction:('Arg1 * 'Arg2 * 'Arg3 * AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
static member FromContinuations : callback:(('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) -> Async<'T>
static member Ignore : computation:Async<'T> -> Async<unit>
static member OnCancel : interruption:(unit -> unit) -> Async<IDisposable>
static member Parallel : computations:seq<Async<'T>> -> Async<'T []>
static member RunSynchronously : computation:Async<'T> * ?timeout:int * ?cancellationToken:CancellationToken -> 'T
static member Sleep : millisecondsDueTime:int -> Async<unit>
static member Start : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit
static member StartAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions * ?cancellationToken:CancellationToken -> Task<'T>
static member StartChild : computation:Async<'T> * ?millisecondsTimeout:int -> Async<Async<'T>>
static member StartChildAsTask : computation:Async<'T> * ?taskCreationOptions:TaskCreationOptions -> Async<Task<'T>>
static member StartImmediate : computation:Async<unit> * ?cancellationToken:CancellationToken -> unit
static member StartWithContinuations : computation:Async<'T> * continuation:('T -> unit) * exceptionContinuation:(exn -> unit) * cancellationContinuation:(OperationCanceledException -> unit) * ?cancellationToken:CancellationToken -> unit
static member SwitchToContext : syncContext:SynchronizationContext -> Async<unit>
static member SwitchToNewThread : unit -> Async<unit>
static member SwitchToThreadPool : unit -> Async<unit>
static member TryCancelled : computation:Async<'T> * compensation:(OperationCanceledException -> unit) -> Async<'T>
static member CancellationToken : Async<CancellationToken>
static member DefaultCancellationToken : CancellationToken
Full name: Microsoft.FSharp.Control.Async
--------------------
type Async<'T>
Full name: Microsoft.FSharp.Control.Async<_>
type unit = Unit
Full name: Microsoft.FSharp.Core.unit
abstract member IActor.Id : string
Full name: Script.IActor.Id
Multiple items
val string : value:'T -> string
Full name: Microsoft.FSharp.Core.Operators.string
--------------------
type string = String
Full name: Microsoft.FSharp.Core.string
Multiple items
type CLIEventAttribute =
inherit Attribute
new : unit -> CLIEventAttribute
Full name: Microsoft.FSharp.Core.CLIEventAttribute
--------------------
new : unit -> CLIEventAttribute
type IEvent<'T> = IEvent<Handler<'T>,'T>
Full name: Microsoft.FSharp.Control.IEvent<_>
abstract member IActor.Post : 'a -> unit
Full name: Script.IActor.Post
abstract member IActor.PostAndReply : obj -> 'b
Full name: Script.IActor.PostAndReply
abstract member IActor.PostControlMessage : ActorFwkMessage -> unit
Full name: Script.IActor.PostControlMessage
abstract member IActor.Query : unit -> 'a
Full name: Script.IActor.Query
Multiple items
type Actor<'msg,'state> =
interface IActor
new : id:string option * messageLoop:MessageLoop<'msg,'state> * state:'state -> Actor<'msg,'state>
override ToString : unit -> string
member InitialState : 'state
member MessageLoop : MessageLoop<'msg,'state>
member InitialState : 'state with set
member MessageLoop : MessageLoop<'msg,'state> with set
Full name: Script.Actor<_,_>
--------------------
new : id:string option * messageLoop:MessageLoop<'msg,'state> * state:'state -> Actor<'msg,'state>
val id : string option
val messageLoop : MessageLoop<'msg,'state>
val state : 'state
val self : Actor<'msg,'state>
val mutable initialState : 'state
val errorStream : Event<ActorException>
Multiple items
module Event
from Microsoft.FSharp.Control
--------------------
type Event<'T> =
new : unit -> Event<'T>
member Trigger : arg:'T -> unit
member Publish : IEvent<'T>
Full name: Microsoft.FSharp.Control.Event<_>
--------------------
type Event<'Delegate,'Args (requires delegate and 'Delegate :> Delegate)> =
new : unit -> Event<'Delegate,'Args>
member Trigger : sender:obj * args:'Args -> unit
member Publish : IEvent<'Delegate,'Args>
Full name: Microsoft.FSharp.Control.Event<_,_>
--------------------
new : unit -> Event<'T>
--------------------
new : unit -> Event<'Delegate,'Args>
val mutable id : string
val tId : string
val defaultArg : arg:'T option -> defaultValue:'T -> 'T
Full name: Microsoft.FSharp.Core.Operators.defaultArg
Multiple items
type Guid =
struct
new : b:byte[] -> Guid + 4 overloads
member CompareTo : value:obj -> int + 1 overload
member Equals : o:obj -> bool + 1 overload
member GetHashCode : unit -> int
member ToByteArray : unit -> byte[]
member ToString : unit -> string + 2 overloads
static val Empty : Guid
static member NewGuid : unit -> Guid
static member Parse : input:string -> Guid
static member ParseExact : input:string * format:string -> Guid
...
end
Full name: System.Guid
--------------------
Guid()
Guid(b: byte []) : unit
Guid(g: string) : unit
Guid(a: int, b: int16, c: int16, d: byte []) : unit
Guid(a: uint32, b: uint16, c: uint16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : unit
Guid(a: int, b: int16, c: int16, d: byte, e: byte, f: byte, g: byte, h: byte, i: byte, j: byte, k: byte) : unit
Guid.NewGuid() : Guid
Multiple items
type String =
new : value:char -> string + 7 overloads
member Chars : int -> char
member Clone : unit -> obj
member CompareTo : value:obj -> int + 1 overload
member Contains : value:string -> bool
member CopyTo : sourceIndex:int * destination:char[] * destinationIndex:int * count:int -> unit
member EndsWith : value:string -> bool + 2 overloads
member Equals : obj:obj -> bool + 2 overloads
member GetEnumerator : unit -> CharEnumerator
member GetHashCode : unit -> int
...
Full name: System.String
--------------------
String(value: nativeptr<char>) : unit
String(value: nativeptr<sbyte>) : unit
String(value: char []) : unit
String(c: char, count: int) : unit
String(value: nativeptr<char>, startIndex: int, length: int) : unit
String(value: nativeptr<sbyte>, startIndex: int, length: int) : unit
String(value: char [], startIndex: int, length: int) : unit
String(value: nativeptr<sbyte>, startIndex: int, length: int, enc: Text.Encoding) : unit
String.IsNullOrEmpty(value: string) : bool
val mutable actor : MailboxProcessor<ActorMessage<'msg>>
val inbox : MailboxProcessor<ActorMessage<'msg>>
val reBuildProcessor : (unit -> unit)
event MailboxProcessor.Error: IEvent<Handler<Exception>,Exception>
member IObservable.Add : callback:('T -> unit) -> unit
member Event.Trigger : arg:'T -> unit
val x : Actor<'msg,'state>
override Actor.ToString : unit -> string
Full name: Script.Actor`2.ToString
Multiple items
member Actor.MessageLoop : MessageLoop<'msg,'state> with set
Full name: Script.Actor`2.MessageLoop
--------------------
type MessageLoop<'msg,'state> = MailboxProcessor<ActorMessage<'msg>> -> 'state -> Async<unit>
Full name: Script.MessageLoop<_,_>
val mutable _messageLoop : MessageLoop<'msg,'state>
val set : elements:seq<'T> -> Set<'T> (requires comparison)
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.set
val v : MessageLoop<'msg,'state>
member Actor.InitialState : 'state with set
Full name: Script.Actor`2.InitialState
val v : 'state
override Actor.Id : string
Full name: Script.Actor`2.Id
override Actor.Error : IEvent<ActorException>
Full name: Script.Actor`2.Error
property Event.Publish: IEvent<ActorException>
override Actor.Post : msg:'a -> unit
Full name: Script.Actor`2.Post
val msg : 'a
member MailboxProcessor.Post : message:'Msg -> unit
val unbox : value:obj -> 'T
Full name: Microsoft.FSharp.Core.Operators.unbox
val box : value:'T -> obj
Full name: Microsoft.FSharp.Core.Operators.box
override Actor.PostControlMessage : msg:ActorFwkMessage -> unit
Full name: Script.Actor`2.PostControlMessage
val msg : ActorFwkMessage
override Actor.PostAndReply : msg:obj -> 'b
Full name: Script.Actor`2.PostAndReply
val msg : obj
member MailboxProcessor.PostAndReply : buildMessage:(AsyncReplyChannel<'Reply> -> 'Msg) * ?timeout:int -> 'Reply
val rc : AsyncReplyChannel<obj>
override Actor.Query : unit -> 'a
Full name: Script.Actor`2.Query
type RegistryMessage =
| Register of IActor
| UnRegister of IActor
| Dispose
Full name: Script.RegistryMessage
union case RegistryMessage.Register: IActor -> RegistryMessage
union case RegistryMessage.UnRegister: IActor -> RegistryMessage
union case RegistryMessage.Dispose: RegistryMessage
type RegistryEvent =
| OnPostControlMessage of IActor * ActorFwkMessage
| OnRegister of IActor
| OnUnregister of IActor
| OnPost of IActor * obj
| OnPostAndReply of IActor * obj
| OnQuery of IActor
| OnError of Exception
Full name: Script.RegistryEvent
union case RegistryEvent.OnPostControlMessage: IActor * ActorFwkMessage -> RegistryEvent
union case RegistryEvent.OnRegister: IActor -> RegistryEvent
union case RegistryEvent.OnUnregister: IActor -> RegistryEvent
union case RegistryEvent.OnPost: IActor * obj -> RegistryEvent
union case RegistryEvent.OnPostAndReply: IActor * obj -> RegistryEvent
union case RegistryEvent.OnQuery: IActor -> RegistryEvent
union case RegistryEvent.OnError: Exception -> RegistryEvent
Multiple items
type Exception =
new : unit -> Exception + 2 overloads
member Data : IDictionary
member GetBaseException : unit -> Exception
member GetObjectData : info:SerializationInfo * context:StreamingContext -> unit
member GetType : unit -> Type
member HelpLink : string with get, set
member InnerException : Exception
member Message : string
member Source : string with get, set
member StackTrace : string
...
Full name: System.Exception
--------------------
Exception() : unit
Exception(message: string) : unit
Exception(message: string, innerException: exn) : unit
Multiple items
type Registry =
new : unit -> Registry
static member Dispose : unit -> unit
static member Post : target:string -> msg:'d -> bool
static member PostAndReply : target:string -> msg:'b -> 'c option
static member PostControlMessage : target:string -> msg:ActorFwkMessage -> bool
static member PostToAll : msg:'d -> unit
static member Query : target:string -> 'a option
static member Register : actorRef:IActor -> unit
static member UnRegister : actorRef:IActor -> unit
static member add_RegistryEvent : Handler<RegistryEvent> -> unit
...
Full name: Script.Registry
--------------------
new : unit -> Registry
val registryEvent : Event<RegistryEvent>
val fireRegistryCallback : (RegistryEvent -> unit)
val event : RegistryEvent
val async : AsyncBuilder
Full name: Microsoft.FSharp.Core.ExtraTopLevelOperators.async
val e : exn
static member Async.Start : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
val messageHandler : (RegistryMessage -> Map<string,IActor> -> Map<string,IActor>)
val msg : RegistryMessage
val state : Map<string,IActor>
Multiple items
module Map
from Microsoft.FSharp.Collections
--------------------
type Map<'Key,'Value (requires comparison)> =
interface IEnumerable
interface IComparable
interface IEnumerable<KeyValuePair<'Key,'Value>>
interface ICollection<KeyValuePair<'Key,'Value>>
interface IDictionary<'Key,'Value>
new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
member Add : key:'Key * value:'Value -> Map<'Key,'Value>
member ContainsKey : key:'Key -> bool
override Equals : obj -> bool
member Remove : key:'Key -> Map<'Key,'Value>
...
Full name: Microsoft.FSharp.Collections.Map<_,_>
--------------------
new : elements:seq<'Key * 'Value> -> Map<'Key,'Value>
Multiple items
val ref : IActor
--------------------
type 'T ref = Ref<'T>
Full name: Microsoft.FSharp.Core.ref<_>
member Map.Add : key:'Key * value:'Value -> Map<'Key,'Value>
member Map.Remove : key:'Key -> Map<'Key,'Value>
val iter : action:('Key -> 'T -> unit) -> table:Map<'Key,'T> -> unit (requires comparison)
Full name: Microsoft.FSharp.Collections.Map.iter
val c : IActor
abstract member IActor.PostControlMessage : ActorFwkMessage -> unit
val empty<'Key,'T (requires comparison)> : Map<'Key,'T> (requires comparison)
Full name: Microsoft.FSharp.Collections.Map.empty
val defaultErrorHandler : (IActor -> Exception -> unit)
val id : IActor
val registrationActor : IActor
union case Option.Some: Value: 'T -> Option<'T>
val actorFunc : ((IActor -> 'a) -> string -> 'a option)
val f : (IActor -> 'a)
val target : string
val actors : Map<string,IActor>
abstract member IActor.Query : unit -> 'a
member Map.TryFind : key:'Key -> 'Value option
union case Option.None: Option<'T>
Multiple items
static member Registry.RegistryEvent : IEvent<RegistryEvent>
Full name: Script.Registry.RegistryEvent
--------------------
type RegistryEvent =
| OnPostControlMessage of IActor * ActorFwkMessage
| OnRegister of IActor
| OnUnregister of IActor
| OnPost of IActor * obj
| OnPostAndReply of IActor * obj
| OnQuery of IActor
| OnError of Exception
Full name: Script.RegistryEvent
property Event.Publish: IEvent<RegistryEvent>
static member Registry.Register : actorRef:IActor -> unit
Full name: Script.Registry.Register
val actorRef : IActor
abstract member IActor.Post : 'a -> unit
static member Registry.UnRegister : actorRef:IActor -> unit
Full name: Script.Registry.UnRegister
static member Registry.PostControlMessage : target:string -> msg:ActorFwkMessage -> bool
Full name: Script.Registry.PostControlMessage
module Option
from Microsoft.FSharp.Core
val isSome : option:'T option -> bool
Full name: Microsoft.FSharp.Core.Option.isSome
static member Registry.Post : target:string -> msg:'d -> bool
Full name: Script.Registry.Post
val msg : 'd
static member Registry.PostToAll : msg:'d -> unit
static member Registry.PostToAll : msg:'d -> unit
Full name: Script.Registry.PostToAll
val k : string
val v : IActor
static member Registry.PostAndReply : target:string -> msg:'b -> 'c option
Full name: Script.Registry.PostAndReply
val msg : 'b
val res : 'c
abstract member IActor.PostAndReply : obj -> 'b
static member Registry.Query : target:string -> 'a option
Full name: Script.Registry.Query
val res : 'a
static member Registry.Dispose : unit -> unit
Full name: Script.Registry.Dispose
val ignore : value:'T -> unit
Full name: Microsoft.FSharp.Core.Operators.ignore
More information