Exemple #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));
            }
        }
Exemple #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));
        }
        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);
        }