public bool CanBeSerialized(Type type, PropertyInfo property) { if (!property.CanWrite) return false; var args = new PropertyValidArgs(type, property); IsPropertyValid(args); return args.IsValid; }
public bool CanBeDeserialized(Type type, PropertyInfo property) { if (!property.CanRead) { return(false); } var args = new PropertyValidArgs(type, property); IsPropertyValid(args); return(args.IsValid); }
protected virtual void IsPropertyValid(PropertyValidArgs args) { args.IsValid = args.Property.GetCustomAttribute <IgnoreAttribute>() == null; }
protected virtual void IsPropertyValid(PropertyValidArgs args) { }