コード例 #1
0
        public override void Initialize(XmlNode section)
        {
            var factory = section.GetAttributeValue("managed");

            if (!string.IsNullOrEmpty(factory))
            {
                var type = factory.ParseType();
                if (type != null)
                {
                    Factory = type.New <IManagedFactory>();
                }
            }

            base.Initialize(section);
        }
コード例 #2
0
        public override void Bind(IConfiguration configuration)
        {
            var factory = configuration.GetSection("managed").Value;

            if (!string.IsNullOrEmpty(factory))
            {
                var type = factory.ParseType();
                if (type != null)
                {
                    Factory = type.New <IManagedFactory>();
                }
            }

            base.Bind(configuration);
        }