private static IEnumerable <Tuple <System.Reflection.PropertyInfo, PersistAttribute> > EnumeratePersistentProperties(MudObject Object) { return (Object.GetType().GetProperties() .Where(pi => pi.GetCustomAttributes(true).Count(a => a is PersistAttribute) >= 1) .Select(pi => Tuple.Create(pi, pi.GetCustomAttributes(true).FirstOrDefault(a => a is PersistAttribute) as PersistAttribute))); }
private static IEnumerable<Tuple<System.Reflection.PropertyInfo, PersistAttribute>> EnumeratePersistentProperties(MudObject Object) { return Object.GetType().GetProperties() .Where(pi => pi.GetCustomAttributes(true).Count(a => a is PersistAttribute) >= 1) .Select(pi => Tuple.Create(pi, pi.GetCustomAttributes(true).FirstOrDefault(a => a is PersistAttribute) as PersistAttribute)); }