示例#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;
 }