Ejemplo n.º 1
0
        public void Inject()
        {
            var properties = from property in ext.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance)
                             where IsInjectableProperty(property)
                             select property;

            foreach (var prop in properties)
            {
                var setter = prop.GetSetMethod() ?? prop.GetSetMethod(true);
                setter.Invoke(ext, new object[] { apiAllocator.GetByType(prop.PropertyType) });
            }
        }