private int calculateObjectPropertiesSize(NameSizeCalculator nameSizer) { return(Objects.AsParallel().Sum(o => o.PropertiesSize(nameSizer))); }
/// <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()); }
private int calculateObjectsSize(NameSizeCalculator nameSizer) { return(4 + Objects.AsParallel().Sum(o => o.Size(nameSizer))); }