Пример #1
0
        public void Add(MemberInfo info, InjectAttribute attribute)
        {
            FieldInfo field = info as FieldInfo;

            if (field != null)
            {
                AddField(field, attribute);
                return;
            }

            PropertyInfo property = info as PropertyInfo;

            if (property != null)
            {
                AddProperty(property, attribute);
            }
        }
Пример #2
0
 private void AddProperty(PropertyInfo info, InjectAttribute attribute)
 {
     properties[info] = attribute;
 }
Пример #3
0
 private void AddField(FieldInfo info, InjectAttribute attribute)
 {
     fields[info] = attribute;
 }