コード例 #1
0
        /// <summary>
        /// Initializes the feature configuration from specified configuration reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="reader"/> is <c>null</c>.</exception>
        public void FromSource(IConfigurationReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            IEnumerable<IFeatureToggle> items = reader.GetFeatures();
            AddItems(items);
        }
コード例 #2
0
        /// <summary>
        /// Initializes the feature configuration from specified configuration reader.
        /// </summary>
        /// <param name="reader">The reader.</param>
        /// <exception cref="ArgumentNullException">If <paramref name="reader"/> is <c>null</c>.</exception>
        public void FromSource(IConfigurationReader reader)
        {
            if (reader == null)
            {
                throw new ArgumentNullException("reader");
            }

            IEnumerable <IFeatureToggle> items = reader.GetFeatures();

            AddItems(items);
        }
コード例 #3
0
        public void FromApplicationConfig()
        {
            IEnumerable <IFeatureToggle> items = applicationConfigurationReader.GetFeatures();

            AddItems(items);
        }
コード例 #4
0
 public FeatureConfiguration(IConfigurationReader reader)
 {
     this.reader = reader;
     AddItems(reader.GetFeatures());
 }