Open zfkingth opened 8 years ago
should CanReadTypeCore function change as follow:
private static bool CanReadTypeCore(Type type) { bool isCan = type.GetCustomAttributes(typeof(ProtoContractAttribute)).Any(); if (!isCan && typeof(IEnumerable).IsAssignableFrom(type)) { var temp = type.GetGenericArguments().FirstOrDefault(); isCan = temp.GetCustomAttributes(typeof(ProtoContractAttribute)).Any(); } return isCan; }
should CanReadTypeCore function change as follow: