public SerializedValue(PersistentMemberAttribute persistentMemberAttribute, object serialized, object member, TypeCache memberTypeCache) { PersistentMemberAttribute = persistentMemberAttribute; Serialized = serialized; Member = member; MemberTypeCache = memberTypeCache; }
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; }
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; }
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)); } }
protected PersistentCollection(PersistentMemberAttribute attribute) { _attribute = attribute; }