예제 #1
0
 static public void AppendData(StringBuilder sb, ReflectInsightPackage package)
 {
     if (package.IsDetail <DetailContainerDataSet>())
     {
         using (DetailContainerDataSet dsc = package.GetDetails <DetailContainerDataSet>())
         {
             AppendDataSet(sb, dsc.FData);
         }
     }
     else
     {
         using (DetailContainerDataTable tc = package.GetDetails <DetailContainerDataTable>())
         {
             sb.AppendFormat("[{0}]{1}", tc.FData.TableName, Environment.NewLine);
             AppendDataTable(sb, tc.FData);
         }
     }
 }
예제 #2
0
        static public void AppendMessageDetails(StringBuilder sb, ReflectInsightPackage package, MessageTextFlag flags)
        {
            if (((flags & MessageTextFlag.Details) != MessageTextFlag.Details) || !package.HasDetails)
            {
                return;
            }

            if (package.IsDetail <DetailContainerString>())
            {
                sb.AppendLine();
                sb.AppendLine(package.GetDetails <DetailContainerString>().FData);
                sb.AppendLine();

                return;
            }

            switch (package.FMessageType)
            {
            case MessageType.EnterMethod:
            case MessageType.SendObject:
            case MessageType.SendProcessInformation:
            case MessageType.SendThreadInformation:
            case MessageType.SendSystemInformation:
            case MessageType.SendLoadedAssemblies:
            case MessageType.SendLoadedProcesses:
            case MessageType.SendAppDomainInformation:
            case MessageType.SendMemoryStatus:
            case MessageType.SendHttpModuleInformation:
            case MessageType.SendMiniDumpFile:
            case MessageType.SendCustomData:
            case MessageType.SendHttpRequest:
                sb.AppendLine();
                AppendCustomData(sb, package);
                sb.AppendLine();
                break;

            case MessageType.SendCollection:
                sb.AppendLine();
                AppendCollection(sb, package);
                sb.AppendLine();
                break;

            case MessageType.SendDataSet:
            case MessageType.SendDataTable:
            case MessageType.SendDataView:
            case MessageType.SendDataSetSchema:
            case MessageType.SendDataTableSchema:
            case MessageType.SendLinqResults:
            case MessageType.SendTypedCollection:
                sb.AppendLine();
                AppendData(sb, package);
                sb.AppendLine();
                break;

            case MessageType.SendMemory:
            case MessageType.SendStream:
                sb.AppendLine();
                AppendMemory(sb, package);
                sb.AppendLine();
                break;

            case MessageType.SendColor:
                sb.AppendLine();
                AppendColor(sb, package);
                sb.AppendLine();
                break;

            default:
                break;
            }
        }