示例#1
0
        public CachedNodeStateInfo(MemberInfo state, CachedNodeType declaringType) : base(state, declaringType)
        {
            State = state;
            switch (state)
            {
            case FieldInfo field:
                StateType = field.FieldType;
                break;

            case PropertyInfo property:
                StateType = property.PropertyType;
                break;
            }

            _getValue = CreateGetter();
            _setValue = CreateSetter();
        }
 protected CachedNodeMemberInfo(MemberInfo member, CachedNodeType declaringType)
 {
     Name          = member.Name;
     Attributes    = member.GetCustomAttributes();
     DeclaringType = declaringType;
 }
 public CachedNodeMethodInfo(MethodInfo method, CachedNodeType declaringType) : base(method, declaringType)
 {
     Method = method;
 }