Esempio n. 1
0
        public VostokConfigurationProvider([NotNull] IConfigurationSource vostokConfigurationSource)
        {
            if (vostokConfigurationSource == null)
            {
                throw new ArgumentNullException(nameof(vostokConfigurationSource));
            }

            new HealingConfigurationSource(vostokConfigurationSource).Observe().Subscribe(this);
        }
        public static IConfigurationBuilder AddVostok(
            [NotNull] this IConfigurationBuilder configurationBuilder,
            [NotNull] IConfigurationSource vostokSource)
        {
            if (configurationBuilder == null)
            {
                throw new ArgumentNullException(nameof(configurationBuilder));
            }
            if (vostokSource == null)
            {
                throw new ArgumentNullException(nameof(vostokSource));
            }

            return(configurationBuilder.Add(new VostokConfigurationSource(vostokSource)));
        }