Ejemplo n.º 1
0
 public MessageProcessor(IMessageSource msgSource, IMessageMatcher matcher, ISubscriptionStore store, IConfigurationSource cfg)
 {
     LiveMessageSource = msgSource;
     MessageMatcher = matcher;
     SubscriptionStore = store;
     TaskDelay = cfg.Get<int>(this, DefaultDelayKey, DefaultDelay);
 }
Ejemplo n.º 2
0
 public MessageProcessor(IMessageSource msgSource, IMessageMatcher matcher, ISubscriptionStore store, IConfigurationSource cfg)
 {
     LiveMessageSource = msgSource;
     MessageMatcher    = matcher;
     SubscriptionStore = store;
     TaskDelay         = cfg.Get <int>(this, DefaultDelayKey, DefaultDelay);
 }
        public static ConfigurationResult <T> MergeSourceResults <T>(ConfigurationResult <T> accumulator, IConfigurationSource source)
            where T : class, IConfigured, new()
        {
            var nextResult = source.Get(accumulator);

            nextResult.Observable = accumulator.Observable.Merge(nextResult.Observable);
            return(nextResult);
        }
            public ServiceConfigurationSet Get(Type type)
            {
                var c = child.Get(type);
                var p = parent.Get(type);

                if (c == null)
                {
                    return(p);
                }
                if (p != null && c.parent == null)
                {
                    c.parent = p;
                }
                return(c);
            }
        public static void ApplyTo <TSettings>([NotNull] this IConfigurationSource source, [NotNull] TSettings settings)
        {
            if (settings == null)
            {
                throw new ArgumentNullException(nameof(settings));
            }

            var node = source.Get();

            if (node == null)
            {
                return;
            }

            using (ClassStructBinderSeed.Use(node, settings))
                new SettingsBinderProvider().CreateFor <TSettings>().Bind(node).EnsureSuccess();
        }