ArenaNet.Sprout.IoC.ComponentDescriptor.ComponentDescriptor C# (CSharp) Метод

ComponentDescriptor() публичный Метод

public ComponentDescriptor ( Type type, ComponentAttribute componentAttribute ) : System
type System.Type
componentAttribute ComponentAttribute
Результат System
        public ComponentDescriptor(Type type, ComponentAttribute componentAttribute)
        {
            this.Type = type;
            this.Attributes = componentAttribute;
            this.Injections = new List<InjectDescriptor>();

            foreach (MemberInfo member in type.GetMembers(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance))
            {
                if (member is FieldInfo || member is PropertyInfo)
                {
                    InjectAttribute injectAttribute = null;

                    if ((injectAttribute = member.GetCustomAttribute<InjectAttribute>()) != null)
                    {
                        Injections.Add(new InjectDescriptor(member, injectAttribute));
                    }
                }
            }
        }
ComponentDescriptor