Beispiel #1
0
 public static void ComponentReport(string filename, string Title, Object[] objects)
 {
     File.AppendAllText(filename, "\r\n\r\n" + Title + ":\r\n\r\n");
     using (IEnumerator <IGrouping <string, Object> > enumerator = ((IEnumerable <IGrouping <string, Object> >)((IEnumerable <Object>)objects).GroupBy <Object, string>((Func <Object, string>)(x => ServerPerformance.WorkoutPrefabName((x as Component).get_gameObject()))).OrderByDescending <IGrouping <string, Object>, int>((Func <IGrouping <string, Object>, int>)(x => ((IEnumerable <Object>)x).Count <Object>()))).GetEnumerator())
     {
         while (((IEnumerator)enumerator).MoveNext())
         {
             IGrouping <string, Object> current = enumerator.Current;
             File.AppendAllText(filename, "\t" + ServerPerformance.WorkoutPrefabName((((IEnumerable <Object>)current).ElementAt <Object>(0) as Component).get_gameObject()) + " - " + (object)((IEnumerable <Object>)current).Count <Object>() + "\r\n");
         }
     }
     File.AppendAllText(filename, "\r\nTotal: " + (object)((IEnumerable <Object>)objects).Count <Object>() + "\r\n\r\n\r\n");
 }
Beispiel #2
0
 public static void ComponentReport(string filename, string Title, UnityEngine.Object[] objects)
 {
     File.AppendAllText(filename, string.Concat("\r\n\r\n", Title, ":\r\n\r\n"));
     foreach (IGrouping <string, UnityEngine.Object> strs in
              from x in (IEnumerable <UnityEngine.Object>) objects
              group x by ServerPerformance.WorkoutPrefabName((x as Component).gameObject) into x
              orderby x.Count <UnityEngine.Object>() descending
              select x)
     {
         File.AppendAllText(filename, string.Concat(new object[] { "\t", ServerPerformance.WorkoutPrefabName((strs.ElementAt <UnityEngine.Object>(0) as Component).gameObject), " - ", strs.Count <UnityEngine.Object>(), "\r\n" }));
     }
     File.AppendAllText(filename, string.Concat("\r\nTotal: ", objects.Count <UnityEngine.Object>(), "\r\n\r\n\r\n"));
 }