private static void testComposedType_write(System.Type t, afh.Application.Log log) { System.Type elem = t.GetElementType(); log.WriteLine(Types.CSharpName(t)); log.AddIndent(); log.WriteVar("&", t.IsByRef); log.WriteVar("*", t.IsPointer); log.WriteVar("[]", t.IsArray); if (t.IsGenericParameter) { log.WriteLine("This is a generic parameter."); } if (t.IsGenericType) { log.WriteVar("Namespace", t.Namespace); log.WriteVar("Name", t.Name); log.WriteVar("FullName", t.FullName); foreach (System.Type type in t.GetGenericArguments()) { testComposedType_write(type, log); } } if (t.IsNested) { log.WriteVar("ParentType", t.DeclaringType); } if (elem != null) { log.WriteVar("ElementType", t.GetElementType()); testComposedType_write(elem, log); } log.RemoveIndent(); }
public void WriteSummary(afh.Application.Log log) { log.WriteLine("Method: " + Types.GetMethodSignature(info)); if (description != "") { log.AddIndent(); log.WriteVar("Description", this.description); log.RemoveIndent(); } }
public static void type分岐3_準備(afh.Application.Log log) { afh.Collections.DictionaryP <int, System.Type> dic = null; afh.Collections.DictionaryP <int, System.Type> dic0; int minwrap = int.MaxValue; int minshift = 0; for (int shift = 0; shift <= 28; shift++) { int wrap = type分岐3_準備1(shift, out dic0); if (wrap < minwrap) { dic = dic0; minwrap = wrap; minshift = shift; } } log.Lock(); if (minshift == 0) { log.WriteLine("switch(t.Name.GetHashCode()&0xf){"); } else { log.WriteLine("switch((t.Name.GetHashCode()>>{0})&0xf){{", minshift); } log.AddIndent(); int c = 1; for (int i = 0; i <= 0xf; i++) { // case i: System.Text.StringBuilder build = new System.Text.StringBuilder(); build.AppendFormat("case {0}:", i); bool _else = false; foreach (System.Type type in dic[i]) { if (_else) { build.Append("else "); } build.AppendFormat("if(t==typeof({0})){{\r\n", afh.Types.CSharpName(type)); build.AppendFormat(" c+={0};\r\n", c++); build.Append(" }"); _else = true; } build.Append("break;"); log.WriteLine(build.ToString()); } log.RemoveIndent(); log.WriteLine("}"); log.Unlock(); //*/ }