예제 #1
0
        public DefaultActorActivator(IServiceProvider services)
        {
            this.services = services;

            foreach (var type in ActorType.Registered())
            {
                factories.Add(type.Class, ActivatorUtilities.CreateFactory(type.Class, Type.EmptyTypes));
            }
        }
예제 #2
0
        public static ActorPath Registered(Type type, string id)
        {
            Requires.NotNull(type, nameof(type));

            var code = ActorType
                       .Registered(type)
                       .Code;

            return(From(code, id));
        }
예제 #3
0
        void RegisterStreamSubscriptions()
        {
            foreach (var actor in ActorType.Registered())
            {
                StreamSubscriptionMatcher.Register(actor.Subscriptions());
            }

            const string id = "stream-subscription-boot";

            var properties = new Dictionary <string, string>();

            properties["providers"] = string.Join(";", streamProviders
                                                  .Where(x => x.IsPersistentStreamProvider())
                                                  .Select(x => x.Name));

            Configuration.Globals.RegisterStorageProvider <StreamSubscriptionBootstrapper>(id, properties);
        }