Example #1
0
        /// <summary>
        /// Answer a new <see cref="SourcedTypeRegistry"/> with registered <paramref name="sourcedTypes"/>, creating
        /// the <see cref="IJournal{TEntry}"/> of type <typeparamref name="TEntry"/>, registering me with the <paramref name="world"/>.
        /// </summary>
        /// <param name="world">The World to which I am registered</param>
        /// <param name="dispatcher"><see cref="IDispatcher"/> of the journal.</param>
        /// <param name="sourcedTypes"><see cref="Sourced{T}"/> types of to register</param>
        /// <returns>The registry</returns>
        public static SourcedTypeRegistry RegisterAll <TActor, TEntry>(
            World world,
            IDispatcher dispatcher,
            params Type[] sourcedTypes)
            where TActor : Actor
        {
            var registry = ResolveSourcedTypeRegistry(world);

            var journal = registry.JournalOf <IJournal <TEntry> >(typeof(TActor), world, dispatcher);

            registry.RegisterAll(journal, sourcedTypes);

            return(registry);
        }
Example #2
0
 IJournal <T> IJournal <T> .Using <TActor>(Stage stage, IDispatcher dispatcher, params object[] additional)
 => Using <TActor>(stage, dispatcher, additional);
Example #3
0
 public static IJournal <T> Using <TActor>(Stage stage, IDispatcher dispatcher, params object[] additional)
     where TActor : Actor
 => Using <TActor>(stage, new[] { dispatcher }, additional);
Example #4
0
 public InMemoryJournalActor(IDispatcher dispatcher)
 => _journal = new InMemoryJournal <T>(dispatcher, Stage.World);
Example #5
0
 /// <summary>
 /// Answer a new <see cref="SourcedTypeRegistry"/> with registered <paramref name="sourcedTypes"/>, creating
 /// the <see cref="IJournal{TEntry}"/> of type <typeparamref name="TEntry"/>, registering me with the <paramref name="world"/>.
 /// </summary>
 /// <remarks>
 /// Register() is an alias for RegisterAll()
 /// </remarks>
 /// <param name="world">The World to which I am registered</param>
 /// <param name="dispatcher"><see cref="IDispatcher"/> of the journal.</param>
 /// <param name="sourcedTypes"><see cref="Sourced{T}"/> types of to register</param>
 /// <returns>The registry</returns>
 public static SourcedTypeRegistry Register <TActor, TEntry>(
     World world,
     IDispatcher dispatcher,
     params Type[] sourcedTypes)
     where TActor : Actor =>
 RegisterAll <TActor, TEntry>(world, dispatcher, sourcedTypes);
 IJournal <string> IJournal <string> .Using <TActor>(Stage stage, IDispatcher dispatcher, params object[] additional)
 {
     throw new NotImplementedException();
 }