static GarbageMonitor() { Columns = new[] { StringTableColumnInfo.CreateRight <MonitoredObjectState, long>("Id", i => i.MonitoredObject.Id), StringTableColumnInfo.CreateLeft <MonitoredObjectState>("Name", i => i.MonitoredObject.Name), StringTableColumnInfo.CreateLeft <MonitoredObjectState>("TypeName", i => i.MonitoredObject.TypeName), StringTableColumnInfo.CreateRight <MonitoredObjectState, int>("Size", i => i.MonitoredObject.Size), StringTableColumnInfo.CreateRight <MonitoredObjectState>("Time", i => i.MonitoredObject.Time.ToString("HH:mm:ss.fff", CultureInfo.InvariantCulture)), StringTableColumnInfo.CreateRight <MonitoredObjectState>("DisposeTime", i => i.MonitoredObject.DisposeTime?.ToString("HH:mm:ss.fff", CultureInfo.InvariantCulture)), StringTableColumnInfo.CreateRight <MonitoredObjectState>("Age", i => StopwatchTimeSpan.ToString(i.GetAge(), 3)), StringTableColumnInfo.CreateLeft <MonitoredObjectState, bool>("IsAlive", i => i.MonitoredObject.WeakReference.IsAlive), StringTableColumnInfo.CreateRight <MonitoredObjectState, int?>("Generation", i => i.GetGeneration()) }; }
static AppDomainMonitor() { Columns = new[] { new StringTableColumnInfo <AssemblyInfo>("Name", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.Name), StringTableColumnInfo.Create <AssemblyInfo, Version>("FileVersion", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.FileVersion), StringTableColumnInfo.Create <AssemblyInfo, Version>("Version", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.Version), StringTableColumnInfo.Create <AssemblyInfo, ProcessorArchitecture>("ProcessorArchitecture", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.ProcessorArchitecture), new StringTableColumnInfo <AssemblyInfo>("Date", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.Date?.ToString("yyyy-MM-dd HH:mm:ss")), new StringTableColumnInfo <AssemblyInfo>("PublicKeyToken", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.PublicKeyToken), new StringTableColumnInfo <AssemblyInfo>("ImageRuntimeVersion", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.ImageRuntimeVersion), new StringTableColumnInfo <AssemblyInfo>("CodeBase", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.CodeBase), new StringTableColumnInfo <AssemblyInfo>("Location", StringTableColumnAlign.Left, assemblyInfo => assemblyInfo.Location), StringTableColumnInfo.CreateLeft <AssemblyInfo, bool>("IsDynamic", i => i.IsDynamic) }; }