Exemplo n.º 1
0
 private int calculateObjectPropertiesSize(NameSizeCalculator nameSizer)
 {
     return(Objects.AsParallel().Sum(o => o.PropertiesSize(nameSizer)));
 }
Exemplo n.º 2
0
 /// <summary>
 ///     Expensive call to get objects of the specified type.
 ///     Cache this result if you don't need an updated list each call
 /// </summary>
 /// <typeparam name="T">Type of objects to get. Must inherit from WoWObject</typeparam>
 /// <returns></returns>
 public static List <T> GetObjectsOfType <T>() where T : WoWObject
 {
     return((from t1 in Objects.AsParallel() let t = t1.GetType() where t == typeof(T) select t1).OfType <T>().ToList());
 }
Exemplo n.º 3
0
 private int calculateObjectsSize(NameSizeCalculator nameSizer)
 {
     return(4 + Objects.AsParallel().Sum(o => o.Size(nameSizer)));
 }