/// <summary> /// Resolves the properties that can be injected. /// </summary> /// <param name="type">Type from which reflection will be resolved.</param> /// <returns>The properties.</returns> protected AcessorInfo[] ResolveProperties(Type type) { var setters = new List <AcessorInfo>(); var properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic); for (int propertyIndex = 0; propertyIndex < properties.Length; propertyIndex++) { var property = properties[propertyIndex] as PropertyInfo; var attributes = property.GetCustomAttributes(typeof(Inject), true); if (attributes.Length > 0) { var attribute = attributes[0] as Inject; var getter = MethodUtils.CreatePropertyGetter(type, property); var setter = MethodUtils.CreatePropertySetter(type, property); var info = new AcessorInfo(property.PropertyType, property.Name, attribute.identifier, getter, setter); setters.Add(info); } } return(setters.ToArray()); }