예제 #1
0
        public override string ToString()
        {
            try
            {
                StringBuilder output = new StringBuilder();

                output.AppendLine($"HAL build info: {Info?.ToString()}");
                output.AppendLine($"  Target:   {TargetName?.ToString()}");
                output.AppendLine($"  Platform: {PlatformName?.ToString()}");
                output.AppendLine($"  Type:     {PlatformInfo}");
                output.AppendLine();

                return(output.ToString());
            }
            catch
            {
                // OK to fail. Most likely because of a formatting issue.
            }

            return("ReleaseInfo is not valid!");
        }
예제 #2
0
 /// <summary>
 /// Returns a string representation of this <see cref="PrivateMessageBase"/> instance.
 /// </summary>
 /// <returns>A string representation of this Channel instance.</returns>
 public override string ToString()
 {
     return(TargetName.ToString());
 }
        public override string ToString()
        {
            if (Valid)
            {
                try
                {
                    StringBuilder output = new StringBuilder();

                    output.AppendLine($"HAL build info: {HalBuildInfo}");
                    output.AppendLine($"  Target:   {TargetName?.ToString()}");
                    output.AppendLine($"  Platform: {Platform?.ToString()}");
                    output.AppendLine();
                    output.AppendLine($"Firmware build Info:");
                    output.AppendLine($"  Date:        {ImageBuildDate ?? "unknown"}");
                    output.AppendLine($"  Type:        {VendorInfo ?? "unknown"}");
                    output.AppendLine($"  CLR Version: {SolutionBuildVersion}");
                    output.AppendLine($"  Compiler:    {ImageCompilerInfo ?? "unknown"} v{ImageCompilerVersion?.ToString()}");
                    output.AppendLine();
                    output.AppendLine($"OEM Product codes (vendor, model, SKU): {OEM.ToString()}, {Model.ToString()}, {SKU.ToString()}");
                    output.AppendLine();
                    output.AppendLine("Serial Numbers (module, system):");
                    output.AppendLine("  " + ModuleSerialNumber);
                    output.AppendLine("  " + SystemSerialNumber);
                    output.AppendLine();
                    output.AppendLine("Target capabilities:");
                    output.AppendLine("  Has nanoBooter: " + (Dbg.HasNanoBooter? "YES" : "NO"));
                    if (Dbg.TargetInfo != null &&
                        Dbg.HasNanoBooter)
                    {
                        output.AppendLine($"  nanoBooter: v{Dbg.TargetInfo.BooterVersion}");
                    }
                    output.AppendLine("  IFU capable: " + (Dbg.IsIFUCapable ? "YES" : "NO"));
                    output.AppendLine("  Has proprietary bootloader: " + (Dbg.HasProprietaryBooter ? "YES" : "NO"));

                    output.AppendLine();
                    output.AppendLine("AppDomains:");
                    foreach (IAppDomainInfo adi in AppDomains)
                    {
                        output.AppendLine($"  {adi.Name}, id={adi.ID}");
                    }

                    output.AppendLine();
                    output.AppendLine("Assemblies:");
                    foreach (IAssemblyInfo ai in Assemblies)
                    {
                        output.AppendLine($"  {ai.Name}, {ai.Version}");
                    }

                    output.AppendLine();
                    output.AppendLine("Native Assemblies:");
                    foreach (CLRCapabilities.NativeAssemblyProperties assembly in NativeAssemblies)
                    {
                        output.AppendLine($"  {assembly.Name} v{assembly.Version}, checksum 0x{assembly.Checksum.ToString("X8")}");
                    }

                    return(output.ToString());
                }
                catch
                {
                    // catch everything, doesn't matter
                }
            }

            return("DeviceInfo is not valid!");
        }