コード例 #1
0
        public BottleConfigurationDef(string provenance)
        {
            _objectDef = new ObjectDef(typeof(AssertBottleConfiguration));
            _objectDef.DependencyByValue(provenance);

            _rules = _objectDef.EnumerableDependenciesOf <IBottleConfigurationRule>();
        }
コード例 #2
0
        private ObjectDef toEndpointAuthorizationObjectDef()
        {
            var objectDef = new ObjectDef(typeof(EndPointAuthorizor))
            {
                Name = ParentChain().UniqueId.ToString()
            };

            objectDef.EnumerableDependenciesOf <IAuthorizationPolicy>().AddRange(_policies);

            return(objectDef);
        }
コード例 #3
0
        protected IEnumerable <ObjectDef> createFormatterObjectDef()
        {
            if (_formatterUsage != FormatterUsage.none)
            {
                var formatterDef = new ObjectDef(formatterActionType(), InputType);

                if (_formatterUsage == FormatterUsage.selected)
                {
                    var dependencies = formatterDef.EnumerableDependenciesOf <IFormatter>();
                    _selectedFormatterTypes.Each(t => dependencies.AddType(t));
                }

                yield return(formatterDef);
            }
        }