Esempio n. 1
0
 public SerializedValue(PersistentMemberAttribute persistentMemberAttribute,
                        object serialized, object member, TypeCache memberTypeCache)
 {
     PersistentMemberAttribute = persistentMemberAttribute;
     Serialized      = serialized;
     Member          = member;
     MemberTypeCache = memberTypeCache;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 4
0
 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));
     }
 }
Esempio n. 5
0
 protected PersistentCollection(PersistentMemberAttribute attribute)
 {
     _attribute = attribute;
 }
Esempio n. 6
0
 public SerializedValue(PersistentMemberAttribute persistentMemberAttribute,
     object serialized, object member, TypeCache memberTypeCache)
 {
     PersistentMemberAttribute = persistentMemberAttribute;
     Serialized = serialized;
     Member = member;
     MemberTypeCache = memberTypeCache;
 }
Esempio n. 7
0
 protected PersistentCollection(PersistentMemberAttribute attribute)
 {
     _attribute = attribute;
 }