public static void ReadMember <T>(Reader reader, string name, ref T obj) { #if !NET35_CF if (typeof(T).IsSerializable) { #else if ((typeof(T).Attributes & TypeAttributes.Serializable) == TypeAttributes.Serializable) { #endif switch (reader.Mode) { case FieldMode: FieldsReader <T> .ReadMember(reader, name, ref obj); return; case PropertyMode: PropertiesReader <T> .ReadMember(reader, name, ref obj); return; } } MembersReader <T> .ReadMember(reader, name, ref obj); } }
public static void ReadAllMembers <T>(Reader reader, string key, ref T obj) { if (typeof(T).IsSerializable) { switch (reader.Mode) { case FieldMode: FieldsReader <T> .ReadAllMembers(reader, key, ref obj); return; case PropertyMode: PropertiesReader <T> .ReadAllMembers(reader, key, ref obj); return; } } MembersReader <T> .ReadAllMembers(reader, key, ref obj); }