示例#1
0
 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)));
 }
示例#2
0
 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));
 }