Exemple #1
0
        private static void InvokeField(object instance, MemberInfo member, BoundAttribute boundAttribute)
        {
            if (member.MemberType != MemberTypes.Field)
            {
                return;
            }
            var fieldInfo = member as FieldInfo;

            SetValue(instance, BindingCache.CacheMemberBinding(instance, member, boundAttribute, fieldInfo.FieldType, FieldBindingFlags));
        }
Exemple #2
0
        private static void InvokeProperty(object instance, MemberInfo member, BoundAttribute boundAttribute)
        {
            if (member.MemberType != MemberTypes.Property)
            {
                return;
            }
            var propertyInfo = member as PropertyInfo;
            var type         = propertyInfo.PropertyType;

            SetValue(instance, BindingCache.CacheMemberBinding(instance, member, boundAttribute, type, PropertyBindingFlags));
        }