예제 #1
0
 public SerializedValue(PersistentMemberAttribute persistentMemberAttribute,
                        object serialized, object member, TypeCache memberTypeCache)
 {
     PersistentMemberAttribute = persistentMemberAttribute;
     Serialized      = serialized;
     Member          = member;
     MemberTypeCache = memberTypeCache;
 }
예제 #2
0
 public PersistentMemberInfo(Type type, string name,
     PersistentMemberAttribute attribute,
     Func<object, object> getValue, Action<object, object> setValue)
 {
     Type = type;
     Name = name;
     Attribute = attribute;
     GetValue = getValue;
     SetValue = setValue;
 }
예제 #3
0
 public PersistentMemberInfo(Type type, string name,
                             PersistentMemberAttribute attribute,
                             Func <object, object> getValue, Action <object, object> setValue)
 {
     Type      = type;
     Name      = name;
     Attribute = attribute;
     GetValue  = getValue;
     SetValue  = setValue;
 }
예제 #4
0
파일: TypeCache.cs 프로젝트: wushian/Nxdb
 private void CheckMemberForPersistentAttribute(MemberInfo memberInfo, Type type,
                                                Func <object, object> getValue, Action <object, object> setValue,
                                                List <PersistentMemberInfo> persistentMemberInfo)
 {
     object[] attributes = memberInfo.GetCustomAttributes(typeof(PersistentMemberAttribute), true);
     if (attributes.Length > 0)
     {
         if (attributes.Length != 1)
         {
             throw new Exception("Only one PersistentAttribute can be used per field or property.");
         }
         PersistentMemberAttribute attribute = (PersistentMemberAttribute)attributes[0];
         attribute.Inititalize(type, memberInfo.Name, _cache);
         persistentMemberInfo.Add(new PersistentMemberInfo(type, memberInfo.Name, attribute, getValue, setValue));
     }
 }
예제 #5
0
 protected PersistentCollection(PersistentMemberAttribute attribute)
 {
     _attribute = attribute;
 }
예제 #6
0
 public SerializedValue(PersistentMemberAttribute persistentMemberAttribute,
     object serialized, object member, TypeCache memberTypeCache)
 {
     PersistentMemberAttribute = persistentMemberAttribute;
     Serialized = serialized;
     Member = member;
     MemberTypeCache = memberTypeCache;
 }
예제 #7
0
 protected PersistentCollection(PersistentMemberAttribute attribute)
 {
     _attribute = attribute;
 }