Exemple #1
0
        public string ToString(bool recursively)
        {
            var sb = new StringBuilder();

            sb.AppendLine($"Type layout for '{Type.Name}'");

            int emptiness = (Paddings * 100) / Size;

            sb.AppendLine($"Size: {Size} bytes. Paddings: {Paddings} bytes (%{emptiness} of empty space)");

            sb.AppendLine(LayoutPrinter.TypeLayoutAsString(this, recursively: recursively));

            return(sb.ToString());
        }
Exemple #2
0
 public static void PrintLayout(Type type, bool recursively = true)
 {
     LayoutPrinter.Print(type, recursively);
 }
Exemple #3
0
 public static void PrintLayout <T>(bool recursively = true)
 {
     LayoutPrinter.Print <T>(recursively);
 }