This commit is contained in:
niko
2026-06-04 11:42:34 +02:00
parent f39ba70a9f
commit e720b98cd1
7488 changed files with 2493818 additions and 0 deletions
@@ -0,0 +1,31 @@
using System;
namespace System.Diagnostics
{
/// <summary>Directs tracing or debugging output to either the standard output or the standard error stream.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000DD RID: 221
public class ConsoleTraceListener : TextWriterTraceListener
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ConsoleTraceListener" /> class with trace output written to the standard output stream.</summary>
// Token: 0x06000769 RID: 1897 RVA: 0x00013EB8 File Offset: 0x000120B8
public ConsoleTraceListener()
: this(false)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ConsoleTraceListener" /> class with an option to write trace output to the standard output stream or the standard error stream.</summary>
/// <param name="useErrorStream">true to write tracing and debugging output to the standard error stream; false to write tracing and debugging output to the standard output stream.</param>
// Token: 0x0600076A RID: 1898 RVA: 0x00013EC4 File Offset: 0x000120C4
public ConsoleTraceListener(bool useErrorStream)
: base((!useErrorStream) ? Console.Out : Console.Error)
{
}
// Token: 0x0600076B RID: 1899 RVA: 0x00013EE4 File Offset: 0x000120E4
internal ConsoleTraceListener(string data)
: this(Convert.ToBoolean(data))
{
}
}
}
+80
View File
@@ -0,0 +1,80 @@
using System;
using System.Collections;
namespace System.Diagnostics
{
/// <summary>Correlates traces that are part of a logical transaction.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000DE RID: 222
public class CorrelationManager
{
// Token: 0x0600076C RID: 1900 RVA: 0x00013EF4 File Offset: 0x000120F4
internal CorrelationManager()
{
}
/// <summary>Gets or sets the identity for a global activity.</summary>
/// <returns>A <see cref="T:System.Guid" /> structure that identifies the global activity.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x170001C3 RID: 451
// (get) Token: 0x0600076D RID: 1901 RVA: 0x00013F08 File Offset: 0x00012108
// (set) Token: 0x0600076E RID: 1902 RVA: 0x00013F10 File Offset: 0x00012110
public Guid ActivityId
{
get
{
return this.activity;
}
set
{
this.activity = value;
}
}
/// <summary>Gets the logical operation stack from the call context.</summary>
/// <returns>A <see cref="T:System.Collections.Stack" /> object that represents the logical operation stack for the call context.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x170001C4 RID: 452
// (get) Token: 0x0600076F RID: 1903 RVA: 0x00013F1C File Offset: 0x0001211C
public Stack LogicalOperationStack
{
get
{
return this.op_stack;
}
}
/// <summary>Starts a logical operation on a thread.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x06000770 RID: 1904 RVA: 0x00013F24 File Offset: 0x00012124
public void StartLogicalOperation()
{
this.StartLogicalOperation(Guid.NewGuid());
}
/// <summary>Starts a logical operation with the specified identity on a thread.</summary>
/// <param name="operationId">An object identifying the operation.</param>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="operationId" /> parameter is null. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000771 RID: 1905 RVA: 0x00013F38 File Offset: 0x00012138
public void StartLogicalOperation(object operationId)
{
this.op_stack.Push(operationId);
}
/// <summary>Stops the current logical operation.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property is an empty stack.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000772 RID: 1906 RVA: 0x00013F48 File Offset: 0x00012148
public void StopLogicalOperation()
{
this.op_stack.Pop();
}
// Token: 0x04000216 RID: 534
private Guid activity;
// Token: 0x04000217 RID: 535
private Stack op_stack = new Stack();
}
}
@@ -0,0 +1,32 @@
using System;
namespace System.Diagnostics
{
/// <summary>Provides data for the <see cref="E:System.Diagnostics.Process.OutputDataReceived" /> and <see cref="E:System.Diagnostics.Process.ErrorDataReceived" /> events.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000DF RID: 223
public class DataReceivedEventArgs : EventArgs
{
// Token: 0x06000773 RID: 1907 RVA: 0x00013F58 File Offset: 0x00012158
internal DataReceivedEventArgs(string data)
{
this.data = data;
}
/// <summary>Gets the line of characters that was written to a redirected <see cref="T:System.Diagnostics.Process" /> output stream.</summary>
/// <returns>The line that was written by an associated <see cref="T:System.Diagnostics.Process" /> to its redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> or <see cref="P:System.Diagnostics.Process.StandardError" /> stream.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001C5 RID: 453
// (get) Token: 0x06000774 RID: 1908 RVA: 0x00013F68 File Offset: 0x00012168
public string Data
{
get
{
return this.data;
}
}
// Token: 0x04000218 RID: 536
private string data;
}
}
@@ -0,0 +1,12 @@
using System;
namespace System.Diagnostics
{
/// <summary>Represents the method that will handle the <see cref="E:System.Diagnostics.Process.OutputDataReceived" /> event or <see cref="E:System.Diagnostics.Process.ErrorDataReceived" /> event of a <see cref="T:System.Diagnostics.Process" />.</summary>
/// <param name="sender">The source of the event. </param>
/// <param name="e">A <see cref="T:System.Diagnostics.DataReceivedEventArgs" /> that contains the event data. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x02000329 RID: 809
// (Invoke) Token: 0x06001C7D RID: 7293
public delegate void DataReceivedEventHandler(object sender, DataReceivedEventArgs e);
}
+98
View File
@@ -0,0 +1,98 @@
using System;
namespace System.Diagnostics
{
/// <summary>Provides a set of methods and properties that help debug your code. This class cannot be inherited.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000E0 RID: 224
public sealed class Debug
{
// Token: 0x06000775 RID: 1909 RVA: 0x00013F70 File Offset: 0x00012170
private Debug()
{
}
/// <summary>Checks for a condition; if the condition is false, displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, a failure message is not sent and the message box is not displayed.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000776 RID: 1910 RVA: 0x00013F78 File Offset: 0x00012178
[Conditional("DEBUG")]
public static void Assert(bool condition)
{
}
/// <summary>Checks for a condition; if the condition is false, outputs a specified message and displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, the specified message is not sent and the message box is not displayed. </param>
/// <param name="message">The message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000777 RID: 1911 RVA: 0x00013F7C File Offset: 0x0001217C
[Conditional("DEBUG")]
public static void Assert(bool condition, string message)
{
}
/// <summary>Checks for a condition; if the condition is false, outputs two specified messages and displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, the specified messages are not sent and the message box is not displayed. </param>
/// <param name="message">The message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <param name="detailMessage">The detailed message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000778 RID: 1912 RVA: 0x00013F80 File Offset: 0x00012180
[Conditional("DEBUG")]
public static void Assert(bool condition, string message, string details)
{
}
// Token: 0x06000779 RID: 1913 RVA: 0x00013F84 File Offset: 0x00012184
[Conditional("DEBUG")]
public static void Assert(bool condition, string message, string details, object[] args)
{
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Debug.Listeners" /> collection.</summary>
/// <param name="value">An object whose name is sent to the <see cref="P:System.Diagnostics.Debug.Listeners" />. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600077A RID: 1914 RVA: 0x00013F88 File Offset: 0x00012188
[Conditional("DEBUG")]
public static void WriteLine(object obj)
{
Console.WriteLine(obj);
}
/// <summary>Writes a message followed by a line terminator to the trace listeners in the <see cref="P:System.Diagnostics.Debug.Listeners" /> collection.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600077B RID: 1915 RVA: 0x00013F90 File Offset: 0x00012190
[Conditional("DEBUG")]
public static void WriteLine(string message)
{
Console.WriteLine(message);
}
// Token: 0x0600077C RID: 1916 RVA: 0x00013F98 File Offset: 0x00012198
[Conditional("DEBUG")]
public static void WriteLine(string format, params object[] args)
{
Console.WriteLine(format, args);
}
}
}
+394
View File
@@ -0,0 +1,394 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading;
namespace System.Diagnostics
{
/// <summary>Provides the default output methods and behavior for tracing.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000E1 RID: 225
public class DefaultTraceListener : TraceListener
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.DefaultTraceListener" /> class with "Default" as its <see cref="P:System.Diagnostics.TraceListener.Name" /> property value.</summary>
// Token: 0x0600077D RID: 1917 RVA: 0x00013FA4 File Offset: 0x000121A4
public DefaultTraceListener()
: base("Default")
{
}
// Token: 0x0600077E RID: 1918 RVA: 0x00013FB4 File Offset: 0x000121B4
static DefaultTraceListener()
{
if (!DefaultTraceListener.OnWin32)
{
string environmentVariable = Environment.GetEnvironmentVariable("MONO_TRACE_LISTENER");
if (environmentVariable != null)
{
string text;
string text2;
if (environmentVariable.StartsWith("Console.Out"))
{
text = "Console.Out";
text2 = DefaultTraceListener.GetPrefix(environmentVariable, "Console.Out");
}
else if (environmentVariable.StartsWith("Console.Error"))
{
text = "Console.Error";
text2 = DefaultTraceListener.GetPrefix(environmentVariable, "Console.Error");
}
else
{
text = environmentVariable;
text2 = string.Empty;
}
DefaultTraceListener.MonoTraceFile = text;
DefaultTraceListener.MonoTracePrefix = text2;
}
}
}
// Token: 0x0600077F RID: 1919 RVA: 0x00014050 File Offset: 0x00012250
private static string GetPrefix(string var, string target)
{
if (var.Length > target.Length)
{
return var.Substring(target.Length + 1);
}
return string.Empty;
}
/// <summary>Gets or sets a value indicating whether the application is running in user-interface mode.</summary>
/// <returns>true if user-interface mode is enabled; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x170001C6 RID: 454
// (get) Token: 0x06000780 RID: 1920 RVA: 0x00014084 File Offset: 0x00012284
// (set) Token: 0x06000781 RID: 1921 RVA: 0x0001408C File Offset: 0x0001228C
public bool AssertUiEnabled
{
get
{
return this.assertUiEnabled;
}
set
{
this.assertUiEnabled = value;
}
}
/// <summary>Gets or sets the name of a log file to write trace or debug messages to.</summary>
/// <returns>The name of a log file to write trace or debug messages to.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x170001C7 RID: 455
// (get) Token: 0x06000782 RID: 1922 RVA: 0x00014098 File Offset: 0x00012298
// (set) Token: 0x06000783 RID: 1923 RVA: 0x000140A0 File Offset: 0x000122A0
[global::System.MonoTODO]
public string LogFileName
{
get
{
return this.logFileName;
}
set
{
this.logFileName = value;
}
}
/// <summary>Emits or displays a message and a stack trace for an assertion that always fails.</summary>
/// <param name="message">The message to emit or display. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06000784 RID: 1924 RVA: 0x000140AC File Offset: 0x000122AC
public override void Fail(string message)
{
base.Fail(message);
}
/// <summary>Emits or displays detailed messages and a stack trace for an assertion that always fails.</summary>
/// <param name="message">The message to emit or display. </param>
/// <param name="detailMessage">The detailed message to emit or display. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// <IPermission class="System.Security.Permissions.UIPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x06000785 RID: 1925 RVA: 0x000140B8 File Offset: 0x000122B8
public override void Fail(string message, string detailMessage)
{
base.Fail(message, detailMessage);
if (this.ProcessUI(message, detailMessage) == DefaultTraceListener.DialogResult.Abort)
{
try
{
Thread.CurrentThread.Abort();
}
catch (MethodAccessException)
{
}
}
this.WriteLine(new StackTrace().ToString());
}
// Token: 0x06000786 RID: 1926 RVA: 0x0001411C File Offset: 0x0001231C
private DefaultTraceListener.DialogResult ProcessUI(string message, string detailMessage)
{
if (!this.AssertUiEnabled)
{
return DefaultTraceListener.DialogResult.None;
}
object obj;
MethodInfo method;
try
{
Assembly assembly = Assembly.Load("System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089");
if (assembly == null)
{
return DefaultTraceListener.DialogResult.None;
}
Type type = assembly.GetType("System.Windows.Forms.MessageBoxButtons");
obj = Enum.Parse(type, "AbortRetryIgnore");
method = assembly.GetType("System.Windows.Forms.MessageBox").GetMethod("Show", new Type[]
{
typeof(string),
typeof(string),
type
});
}
catch
{
return DefaultTraceListener.DialogResult.None;
}
if (method == null || obj == null)
{
return DefaultTraceListener.DialogResult.None;
}
string text = string.Format("Assertion Failed: {0} to quit, {1} to debug, {2} to continue", "Abort", "Retry", "Ignore");
string text2 = string.Format("{0}{1}{2}{1}{1}{3}", new object[]
{
message,
Environment.NewLine,
detailMessage,
new StackTrace()
});
string text3 = method.Invoke(null, new object[] { text2, text, obj }).ToString();
if (text3 != null)
{
if (DefaultTraceListener.<>f__switch$map0 == null)
{
DefaultTraceListener.<>f__switch$map0 = new Dictionary<string, int>(2)
{
{ "Ignore", 0 },
{ "Abort", 1 }
};
}
int num;
if (DefaultTraceListener.<>f__switch$map0.TryGetValue(text3, out num))
{
if (num == 0)
{
return DefaultTraceListener.DialogResult.Ignore;
}
if (num == 1)
{
return DefaultTraceListener.DialogResult.Abort;
}
}
}
return DefaultTraceListener.DialogResult.Retry;
}
// Token: 0x06000787 RID: 1927
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern void WriteWindowsDebugString(string message);
// Token: 0x06000788 RID: 1928 RVA: 0x000142B0 File Offset: 0x000124B0
private void WriteDebugString(string message)
{
if (DefaultTraceListener.OnWin32)
{
DefaultTraceListener.WriteWindowsDebugString(message);
}
else
{
this.WriteMonoTrace(message);
}
}
// Token: 0x06000789 RID: 1929 RVA: 0x000142D0 File Offset: 0x000124D0
private void WriteMonoTrace(string message)
{
string monoTraceFile = DefaultTraceListener.MonoTraceFile;
if (monoTraceFile != null)
{
if (DefaultTraceListener.<>f__switch$map1 == null)
{
DefaultTraceListener.<>f__switch$map1 = new Dictionary<string, int>(2)
{
{ "Console.Out", 0 },
{ "Console.Error", 1 }
};
}
int num;
if (DefaultTraceListener.<>f__switch$map1.TryGetValue(monoTraceFile, out num))
{
if (num == 0)
{
Console.Out.Write(message);
return;
}
if (num == 1)
{
Console.Error.Write(message);
return;
}
}
}
this.WriteLogFile(message, DefaultTraceListener.MonoTraceFile);
}
// Token: 0x0600078A RID: 1930 RVA: 0x00014370 File Offset: 0x00012570
private void WritePrefix()
{
if (!DefaultTraceListener.OnWin32)
{
this.WriteMonoTrace(DefaultTraceListener.MonoTracePrefix);
}
}
// Token: 0x0600078B RID: 1931 RVA: 0x00014388 File Offset: 0x00012588
private void WriteImpl(string message)
{
if (base.NeedIndent)
{
this.WriteIndent();
this.WritePrefix();
}
this.WriteDebugString(message);
if (Debugger.IsLogging())
{
Debugger.Log(0, null, message);
}
this.WriteLogFile(message, this.LogFileName);
}
// Token: 0x0600078C RID: 1932 RVA: 0x000143D4 File Offset: 0x000125D4
private void WriteLogFile(string message, string logFile)
{
try
{
this.WriteLogFileImpl(message, logFile);
}
catch (MethodAccessException)
{
}
}
// Token: 0x0600078D RID: 1933 RVA: 0x00014410 File Offset: 0x00012610
private void WriteLogFileImpl(string message, string logFile)
{
if (logFile != null && logFile.Length != 0)
{
FileInfo fileInfo = new FileInfo(logFile);
StreamWriter streamWriter = null;
try
{
if (fileInfo.Exists)
{
streamWriter = fileInfo.AppendText();
}
else
{
streamWriter = fileInfo.CreateText();
}
}
catch
{
return;
}
using (streamWriter)
{
streamWriter.Write(message);
streamWriter.Flush();
}
}
}
/// <summary>Writes the output to the OutputDebugString function and to the <see cref="M:System.Diagnostics.Debugger.Log(System.Int32,System.String,System.String)" /> method.</summary>
/// <param name="message">The message to write to OutputDebugString and <see cref="M:System.Diagnostics.Debugger.Log(System.Int32,System.String,System.String)" />. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600078E RID: 1934 RVA: 0x000144BC File Offset: 0x000126BC
public override void Write(string message)
{
this.WriteImpl(message);
}
/// <summary>Writes the output to the OutputDebugString function and to the <see cref="M:System.Diagnostics.Debugger.Log(System.Int32,System.String,System.String)" /> method, followed by a carriage return and line feed (\r\n).</summary>
/// <param name="message">The message to write to OutputDebugString and <see cref="M:System.Diagnostics.Debugger.Log(System.Int32,System.String,System.String)" />. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600078F RID: 1935 RVA: 0x000144C8 File Offset: 0x000126C8
public override void WriteLine(string message)
{
string text = message + Environment.NewLine;
this.WriteImpl(text);
base.NeedIndent = true;
}
// Token: 0x04000219 RID: 537
private const string ConsoleOutTrace = "Console.Out";
// Token: 0x0400021A RID: 538
private const string ConsoleErrorTrace = "Console.Error";
// Token: 0x0400021B RID: 539
private static readonly bool OnWin32 = Path.DirectorySeparatorChar == '\\';
// Token: 0x0400021C RID: 540
private static readonly string MonoTracePrefix;
// Token: 0x0400021D RID: 541
private static readonly string MonoTraceFile;
// Token: 0x0400021E RID: 542
private string logFileName;
// Token: 0x0400021F RID: 543
private bool assertUiEnabled;
// Token: 0x020000E2 RID: 226
private enum DialogResult
{
// Token: 0x04000223 RID: 547
None,
// Token: 0x04000224 RID: 548
Retry,
// Token: 0x04000225 RID: 549
Ignore,
// Token: 0x04000226 RID: 550
Abort
}
}
}
+580
View File
@@ -0,0 +1,580 @@
using System;
using System.IO;
using System.Runtime.CompilerServices;
using System.Text;
namespace System.Diagnostics
{
/// <summary>Provides version information for a physical file on disk.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000E3 RID: 227
public sealed class FileVersionInfo
{
// Token: 0x06000790 RID: 1936 RVA: 0x000144F0 File Offset: 0x000126F0
private FileVersionInfo()
{
this.comments = null;
this.companyname = null;
this.filedescription = null;
this.filename = null;
this.fileversion = null;
this.internalname = null;
this.language = null;
this.legalcopyright = null;
this.legaltrademarks = null;
this.originalfilename = null;
this.privatebuild = null;
this.productname = null;
this.productversion = null;
this.specialbuild = null;
this.isdebug = false;
this.ispatched = false;
this.isprerelease = false;
this.isprivatebuild = false;
this.isspecialbuild = false;
this.filemajorpart = 0;
this.fileminorpart = 0;
this.filebuildpart = 0;
this.fileprivatepart = 0;
this.productmajorpart = 0;
this.productminorpart = 0;
this.productbuildpart = 0;
this.productprivatepart = 0;
}
/// <summary>Gets the comments associated with the file.</summary>
/// <returns>The comments associated with the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001C8 RID: 456
// (get) Token: 0x06000791 RID: 1937 RVA: 0x000145C0 File Offset: 0x000127C0
public string Comments
{
get
{
return this.comments;
}
}
/// <summary>Gets the name of the company that produced the file.</summary>
/// <returns>The name of the company that produced the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001C9 RID: 457
// (get) Token: 0x06000792 RID: 1938 RVA: 0x000145C8 File Offset: 0x000127C8
public string CompanyName
{
get
{
return this.companyname;
}
}
/// <summary>Gets the build number of the file.</summary>
/// <returns>A value representing the build number of the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CA RID: 458
// (get) Token: 0x06000793 RID: 1939 RVA: 0x000145D0 File Offset: 0x000127D0
public int FileBuildPart
{
get
{
return this.filebuildpart;
}
}
/// <summary>Gets the description of the file.</summary>
/// <returns>The description of the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CB RID: 459
// (get) Token: 0x06000794 RID: 1940 RVA: 0x000145D8 File Offset: 0x000127D8
public string FileDescription
{
get
{
return this.filedescription;
}
}
/// <summary>Gets the major part of the version number.</summary>
/// <returns>A value representing the major part of the version number or 0 (zero) if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CC RID: 460
// (get) Token: 0x06000795 RID: 1941 RVA: 0x000145E0 File Offset: 0x000127E0
public int FileMajorPart
{
get
{
return this.filemajorpart;
}
}
/// <summary>Gets the minor part of the version number of the file.</summary>
/// <returns>A value representing the minor part of the version number of the file or 0 (zero) if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CD RID: 461
// (get) Token: 0x06000796 RID: 1942 RVA: 0x000145E8 File Offset: 0x000127E8
public int FileMinorPart
{
get
{
return this.fileminorpart;
}
}
/// <summary>Gets the name of the file that this instance of <see cref="T:System.Diagnostics.FileVersionInfo" /> describes.</summary>
/// <returns>The name of the file described by this instance of <see cref="T:System.Diagnostics.FileVersionInfo" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CE RID: 462
// (get) Token: 0x06000797 RID: 1943 RVA: 0x000145F0 File Offset: 0x000127F0
public string FileName
{
get
{
return this.filename;
}
}
/// <summary>Gets the file private part number.</summary>
/// <returns>A value representing the file private part number or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001CF RID: 463
// (get) Token: 0x06000798 RID: 1944 RVA: 0x000145F8 File Offset: 0x000127F8
public int FilePrivatePart
{
get
{
return this.fileprivatepart;
}
}
/// <summary>Gets the file version number.</summary>
/// <returns>The version number of the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D0 RID: 464
// (get) Token: 0x06000799 RID: 1945 RVA: 0x00014600 File Offset: 0x00012800
public string FileVersion
{
get
{
return this.fileversion;
}
}
/// <summary>Gets the internal name of the file, if one exists.</summary>
/// <returns>The internal name of the file. If none exists, this property will contain the original name of the file without the extension.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D1 RID: 465
// (get) Token: 0x0600079A RID: 1946 RVA: 0x00014608 File Offset: 0x00012808
public string InternalName
{
get
{
return this.internalname;
}
}
/// <summary>Gets a value that specifies whether the file contains debugging information or is compiled with debugging features enabled.</summary>
/// <returns>true if the file contains debugging information or is compiled with debugging features enabled; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D2 RID: 466
// (get) Token: 0x0600079B RID: 1947 RVA: 0x00014610 File Offset: 0x00012810
public bool IsDebug
{
get
{
return this.isdebug;
}
}
/// <summary>Gets a value that specifies whether the file has been modified and is not identical to the original shipping file of the same version number.</summary>
/// <returns>true if the file is patched; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D3 RID: 467
// (get) Token: 0x0600079C RID: 1948 RVA: 0x00014618 File Offset: 0x00012818
public bool IsPatched
{
get
{
return this.ispatched;
}
}
/// <summary>Gets a value that specifies whether the file is a development version, rather than a commercially released product.</summary>
/// <returns>true if the file is prerelease; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D4 RID: 468
// (get) Token: 0x0600079D RID: 1949 RVA: 0x00014620 File Offset: 0x00012820
public bool IsPreRelease
{
get
{
return this.isprerelease;
}
}
/// <summary>Gets a value that specifies whether the file was built using standard release procedures.</summary>
/// <returns>true if the file is a private build; false if the file was built using standard release procedures or if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D5 RID: 469
// (get) Token: 0x0600079E RID: 1950 RVA: 0x00014628 File Offset: 0x00012828
public bool IsPrivateBuild
{
get
{
return this.isprivatebuild;
}
}
/// <summary>Gets a value that specifies whether the file is a special build.</summary>
/// <returns>true if the file is a special build; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D6 RID: 470
// (get) Token: 0x0600079F RID: 1951 RVA: 0x00014630 File Offset: 0x00012830
public bool IsSpecialBuild
{
get
{
return this.isspecialbuild;
}
}
/// <summary>Gets the default language string for the version info block.</summary>
/// <returns>The description string for the Microsoft Language Identifier in the version resource or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D7 RID: 471
// (get) Token: 0x060007A0 RID: 1952 RVA: 0x00014638 File Offset: 0x00012838
public string Language
{
get
{
return this.language;
}
}
/// <summary>Gets all copyright notices that apply to the specified file.</summary>
/// <returns>The copyright notices that apply to the specified file.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D8 RID: 472
// (get) Token: 0x060007A1 RID: 1953 RVA: 0x00014640 File Offset: 0x00012840
public string LegalCopyright
{
get
{
return this.legalcopyright;
}
}
/// <summary>Gets the trademarks and registered trademarks that apply to the file.</summary>
/// <returns>The trademarks and registered trademarks that apply to the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001D9 RID: 473
// (get) Token: 0x060007A2 RID: 1954 RVA: 0x00014648 File Offset: 0x00012848
public string LegalTrademarks
{
get
{
return this.legaltrademarks;
}
}
/// <summary>Gets the name the file was created with.</summary>
/// <returns>The name the file was created with or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DA RID: 474
// (get) Token: 0x060007A3 RID: 1955 RVA: 0x00014650 File Offset: 0x00012850
public string OriginalFilename
{
get
{
return this.originalfilename;
}
}
/// <summary>Gets information about a private version of the file.</summary>
/// <returns>Information about a private version of the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DB RID: 475
// (get) Token: 0x060007A4 RID: 1956 RVA: 0x00014658 File Offset: 0x00012858
public string PrivateBuild
{
get
{
return this.privatebuild;
}
}
/// <summary>Gets the build number of the product this file is associated with.</summary>
/// <returns>A value representing the build number of the product this file is associated with or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DC RID: 476
// (get) Token: 0x060007A5 RID: 1957 RVA: 0x00014660 File Offset: 0x00012860
public int ProductBuildPart
{
get
{
return this.productbuildpart;
}
}
/// <summary>Gets the major part of the version number for the product this file is associated with.</summary>
/// <returns>A value representing the major part of the product version number or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DD RID: 477
// (get) Token: 0x060007A6 RID: 1958 RVA: 0x00014668 File Offset: 0x00012868
public int ProductMajorPart
{
get
{
return this.productmajorpart;
}
}
/// <summary>Gets the minor part of the version number for the product the file is associated with.</summary>
/// <returns>A value representing the minor part of the product version number or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DE RID: 478
// (get) Token: 0x060007A7 RID: 1959 RVA: 0x00014670 File Offset: 0x00012870
public int ProductMinorPart
{
get
{
return this.productminorpart;
}
}
/// <summary>Gets the name of the product this file is distributed with.</summary>
/// <returns>The name of the product this file is distributed with or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001DF RID: 479
// (get) Token: 0x060007A8 RID: 1960 RVA: 0x00014678 File Offset: 0x00012878
public string ProductName
{
get
{
return this.productname;
}
}
/// <summary>Gets the private part number of the product this file is associated with.</summary>
/// <returns>A value representing the private part number of the product this file is associated with or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E0 RID: 480
// (get) Token: 0x060007A9 RID: 1961 RVA: 0x00014680 File Offset: 0x00012880
public int ProductPrivatePart
{
get
{
return this.productprivatepart;
}
}
/// <summary>Gets the version of the product this file is distributed with.</summary>
/// <returns>The version of the product this file is distributed with or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E1 RID: 481
// (get) Token: 0x060007AA RID: 1962 RVA: 0x00014688 File Offset: 0x00012888
public string ProductVersion
{
get
{
return this.productversion;
}
}
/// <summary>Gets the special build information for the file.</summary>
/// <returns>The special build information for the file or null if the file did not contain version information.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E2 RID: 482
// (get) Token: 0x060007AB RID: 1963 RVA: 0x00014690 File Offset: 0x00012890
public string SpecialBuild
{
get
{
return this.specialbuild;
}
}
// Token: 0x060007AC RID: 1964
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void GetVersionInfo_internal(string fileName);
/// <summary>Returns a <see cref="T:System.Diagnostics.FileVersionInfo" /> representing the version information associated with the specified file.</summary>
/// <returns>A <see cref="T:System.Diagnostics.FileVersionInfo" /> containing information about the file. If the file did not contain version information, the <see cref="T:System.Diagnostics.FileVersionInfo" /> contains only the name of the file requested.</returns>
/// <param name="fileName">The fully qualified path and name of the file to retrieve the version information for. </param>
/// <exception cref="T:System.IO.FileNotFoundException">The file specified cannot be found. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x060007AD RID: 1965 RVA: 0x00014698 File Offset: 0x00012898
public static FileVersionInfo GetVersionInfo(string fileName)
{
string fullPath = Path.GetFullPath(fileName);
if (!File.Exists(fullPath))
{
throw new FileNotFoundException(fileName);
}
FileVersionInfo fileVersionInfo = new FileVersionInfo();
fileVersionInfo.GetVersionInfo_internal(fileName);
return fileVersionInfo;
}
// Token: 0x060007AE RID: 1966 RVA: 0x000146CC File Offset: 0x000128CC
private static void AppendFormat(StringBuilder sb, string format, params object[] args)
{
sb.AppendFormat(format, args);
}
/// <summary>Returns a partial list of properties in the <see cref="T:System.Diagnostics.FileVersionInfo" /> and their values.</summary>
/// <returns>A list of the following properties in this class and their values: <see cref="P:System.Diagnostics.FileVersionInfo.FileName" />, <see cref="P:System.Diagnostics.FileVersionInfo.InternalName" />, <see cref="P:System.Diagnostics.FileVersionInfo.OriginalFilename" />, <see cref="P:System.Diagnostics.FileVersionInfo.FileVersion" />, <see cref="P:System.Diagnostics.FileVersionInfo.FileDescription" />, <see cref="P:System.Diagnostics.FileVersionInfo.ProductName" />, <see cref="P:System.Diagnostics.FileVersionInfo.ProductVersion" />, <see cref="P:System.Diagnostics.FileVersionInfo.IsDebug" />, <see cref="P:System.Diagnostics.FileVersionInfo.IsPatched" />, <see cref="P:System.Diagnostics.FileVersionInfo.IsPreRelease" />, <see cref="P:System.Diagnostics.FileVersionInfo.IsPrivateBuild" />, <see cref="P:System.Diagnostics.FileVersionInfo.IsSpecialBuild" />,<see cref="P:System.Diagnostics.FileVersionInfo.Language" />.If the file did not contain version information, this list will contain only the name of the requested file. Boolean values will be false, and all other entries will be null.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x060007AF RID: 1967 RVA: 0x000146D8 File Offset: 0x000128D8
public override string ToString()
{
StringBuilder stringBuilder = new StringBuilder();
FileVersionInfo.AppendFormat(stringBuilder, "File: {0}{1}", new object[]
{
this.FileName,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "InternalName: {0}{1}", new object[]
{
this.internalname,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "OriginalFilename: {0}{1}", new object[]
{
this.originalfilename,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "FileVersion: {0}{1}", new object[]
{
this.fileversion,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "FileDescription: {0}{1}", new object[]
{
this.filedescription,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "Product: {0}{1}", new object[]
{
this.productname,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "ProductVersion: {0}{1}", new object[]
{
this.productversion,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "Debug: {0}{1}", new object[]
{
this.isdebug,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "Patched: {0}{1}", new object[]
{
this.ispatched,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "PreRelease: {0}{1}", new object[]
{
this.isprerelease,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "PrivateBuild: {0}{1}", new object[]
{
this.isprivatebuild,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "SpecialBuild: {0}{1}", new object[]
{
this.isspecialbuild,
Environment.NewLine
});
FileVersionInfo.AppendFormat(stringBuilder, "Language {0}{1}", new object[]
{
this.language,
Environment.NewLine
});
return stringBuilder.ToString();
}
// Token: 0x04000227 RID: 551
private string comments;
// Token: 0x04000228 RID: 552
private string companyname;
// Token: 0x04000229 RID: 553
private string filedescription;
// Token: 0x0400022A RID: 554
private string filename;
// Token: 0x0400022B RID: 555
private string fileversion;
// Token: 0x0400022C RID: 556
private string internalname;
// Token: 0x0400022D RID: 557
private string language;
// Token: 0x0400022E RID: 558
private string legalcopyright;
// Token: 0x0400022F RID: 559
private string legaltrademarks;
// Token: 0x04000230 RID: 560
private string originalfilename;
// Token: 0x04000231 RID: 561
private string privatebuild;
// Token: 0x04000232 RID: 562
private string productname;
// Token: 0x04000233 RID: 563
private string productversion;
// Token: 0x04000234 RID: 564
private string specialbuild;
// Token: 0x04000235 RID: 565
private bool isdebug;
// Token: 0x04000236 RID: 566
private bool ispatched;
// Token: 0x04000237 RID: 567
private bool isprerelease;
// Token: 0x04000238 RID: 568
private bool isprivatebuild;
// Token: 0x04000239 RID: 569
private bool isspecialbuild;
// Token: 0x0400023A RID: 570
private int filemajorpart;
// Token: 0x0400023B RID: 571
private int fileminorpart;
// Token: 0x0400023C RID: 572
private int filebuildpart;
// Token: 0x0400023D RID: 573
private int fileprivatepart;
// Token: 0x0400023E RID: 574
private int productmajorpart;
// Token: 0x0400023F RID: 575
private int productminorpart;
// Token: 0x04000240 RID: 576
private int productbuildpart;
// Token: 0x04000241 RID: 577
private int productprivatepart;
}
}
@@ -0,0 +1,33 @@
using System;
using System.ComponentModel;
namespace System.Diagnostics
{
/// <summary>Specifies a description for a property or event.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000E4 RID: 228
[AttributeUsage(AttributeTargets.All)]
public class MonitoringDescriptionAttribute : global::System.ComponentModel.DescriptionAttribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.MonitoringDescriptionAttribute" /> class, using the specified description.</summary>
/// <param name="description">The application-defined description text. </param>
// Token: 0x060007B0 RID: 1968 RVA: 0x000148C4 File Offset: 0x00012AC4
public MonitoringDescriptionAttribute(string description)
: base(description)
{
}
/// <summary>Gets description text associated with the item monitored.</summary>
/// <returns>An application-defined description.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E3 RID: 483
// (get) Token: 0x060007B1 RID: 1969 RVA: 0x000148D0 File Offset: 0x00012AD0
public override string Description
{
get
{
return base.Description;
}
}
}
}
+2496
View File
@@ -0,0 +1,2496 @@
using System;
using System.Collections;
using System.ComponentModel;
using System.IO;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using System.Text;
using System.Threading;
namespace System.Diagnostics
{
/// <summary>Provides access to local and remote processes and enables you to start and stop local system processes.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000E5 RID: 229
[global::System.ComponentModel.Designer("System.Diagnostics.Design.ProcessDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.DefaultEvent("Exited")]
[global::System.ComponentModel.DefaultProperty("StartInfo")]
[MonitoringDescription("Represents a system process")]
public class Process : global::System.ComponentModel.Component
{
// Token: 0x060007B2 RID: 1970 RVA: 0x000148D8 File Offset: 0x00012AD8
private Process(IntPtr handle, int id)
{
this.process_handle = handle;
this.pid = id;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Process" /> class.</summary>
// Token: 0x060007B3 RID: 1971 RVA: 0x000148F0 File Offset: 0x00012AF0
public Process()
{
}
/// <summary>Occurs when an application writes to its redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x1400001A RID: 26
// (add) Token: 0x060007B4 RID: 1972 RVA: 0x000148F8 File Offset: 0x00012AF8
// (remove) Token: 0x060007B5 RID: 1973 RVA: 0x00014914 File Offset: 0x00012B14
[global::System.ComponentModel.Browsable(true)]
[MonitoringDescription("Raised when it receives output data")]
public event DataReceivedEventHandler OutputDataReceived;
/// <summary>Occurs when an application writes to its redirected <see cref="P:System.Diagnostics.Process.StandardError" /> stream.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x1400001B RID: 27
// (add) Token: 0x060007B6 RID: 1974 RVA: 0x00014930 File Offset: 0x00012B30
// (remove) Token: 0x060007B7 RID: 1975 RVA: 0x0001494C File Offset: 0x00012B4C
[global::System.ComponentModel.Browsable(true)]
[MonitoringDescription("Raised when it receives error data")]
public event DataReceivedEventHandler ErrorDataReceived;
/// <summary>Occurs when a process exits.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x1400001C RID: 28
// (add) Token: 0x060007B8 RID: 1976 RVA: 0x00014968 File Offset: 0x00012B68
// (remove) Token: 0x060007B9 RID: 1977 RVA: 0x000149D0 File Offset: 0x00012BD0
[global::System.ComponentModel.Category("Behavior")]
[MonitoringDescription("Raised when this process exits.")]
public event EventHandler Exited
{
add
{
if (this.process_handle != IntPtr.Zero && this.HasExited)
{
value.BeginInvoke(null, null, null, null);
}
else
{
this.exited_event = (EventHandler)Delegate.Combine(this.exited_event, value);
if (this.exited_event != null)
{
this.StartExitCallbackIfNeeded();
}
}
}
remove
{
this.exited_event = (EventHandler)Delegate.Remove(this.exited_event, value);
}
}
/// <summary>Gets the base priority of the associated process.</summary>
/// <returns>The base priority, which is computed from the <see cref="P:System.Diagnostics.Process.PriorityClass" /> of the associated process.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set the <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property to false to access this property on Windows 98 and Windows Me.</exception>
/// <exception cref="T:System.InvalidOperationException">The process has exited.-or- The process has not started, so there is no process ID. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E4 RID: 484
// (get) Token: 0x060007BA RID: 1978 RVA: 0x000149EC File Offset: 0x00012BEC
[MonitoringDescription("Base process priority.")]
[global::System.MonoTODO]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int BasePriority
{
get
{
return 0;
}
}
// Token: 0x060007BB RID: 1979 RVA: 0x000149F0 File Offset: 0x00012BF0
private void StartExitCallbackIfNeeded()
{
}
/// <summary>Gets or sets whether the <see cref="E:System.Diagnostics.Process.Exited" /> event should be raised when the process terminates.</summary>
/// <returns>true if the <see cref="E:System.Diagnostics.Process.Exited" /> event should be raised when the associated process is terminated (through either an exit or a call to <see cref="M:System.Diagnostics.Process.Kill" />); otherwise, false. The default is false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E5 RID: 485
// (get) Token: 0x060007BC RID: 1980 RVA: 0x000149F4 File Offset: 0x00012BF4
// (set) Token: 0x060007BD RID: 1981 RVA: 0x000149FC File Offset: 0x00012BFC
[MonitoringDescription("Check for exiting of the process to raise the apropriate event.")]
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DefaultValue(false)]
public bool EnableRaisingEvents
{
get
{
return this.enableRaisingEvents;
}
set
{
bool flag = this.enableRaisingEvents;
this.enableRaisingEvents = value;
if (this.enableRaisingEvents && !flag)
{
this.StartExitCallbackIfNeeded();
}
}
}
// Token: 0x060007BE RID: 1982
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int ExitCode_internal(IntPtr handle);
/// <summary>Gets the value that the associated process specified when it terminated.</summary>
/// <returns>The code that the associated process specified when it terminated.</returns>
/// <exception cref="T:System.InvalidOperationException">The process has not exited.-or- The process <see cref="P:System.Diagnostics.Process.Handle" /> is not valid. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.ExitCode" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001E6 RID: 486
// (get) Token: 0x060007BF RID: 1983 RVA: 0x00014A30 File Offset: 0x00012C30
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The exit code of the process.")]
public int ExitCode
{
get
{
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("Process has not been started.");
}
int num = Process.ExitCode_internal(this.process_handle);
if (num == 259)
{
throw new InvalidOperationException("The process must exit before getting the requested information.");
}
return num;
}
}
// Token: 0x060007C0 RID: 1984
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern long ExitTime_internal(IntPtr handle);
/// <summary>Gets the time that the associated process exited.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that indicates when the associated process was terminated.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.ExitTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001E7 RID: 487
// (get) Token: 0x060007C1 RID: 1985 RVA: 0x00014A80 File Offset: 0x00012C80
[MonitoringDescription("The exit time of the process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public DateTime ExitTime
{
get
{
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("Process has not been started.");
}
if (!this.HasExited)
{
throw new InvalidOperationException("The process must exit before getting the requested information.");
}
return DateTime.FromFileTime(Process.ExitTime_internal(this.process_handle));
}
}
/// <summary>Gets the native handle of the associated process.</summary>
/// <returns>The handle that the operating system assigned to the associated process when the process was started. The system uses this handle to keep track of process attributes.</returns>
/// <exception cref="T:System.InvalidOperationException">The process has not been started. The <see cref="P:System.Diagnostics.Process.Handle" /> property cannot be read because there is no process associated with this <see cref="T:System.Diagnostics.Process" /> instance.-or- The <see cref="T:System.Diagnostics.Process" /> instance has been attached to a running process but you do not have the necessary permissions to get a handle with full access rights. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.Handle" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001E8 RID: 488
// (get) Token: 0x060007C2 RID: 1986 RVA: 0x00014AD4 File Offset: 0x00012CD4
[MonitoringDescription("Handle for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public IntPtr Handle
{
get
{
return this.process_handle;
}
}
/// <summary>Gets the number of handles opened by the process.</summary>
/// <returns>The number of operating system handles the process has opened.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set the <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001E9 RID: 489
// (get) Token: 0x060007C3 RID: 1987 RVA: 0x00014ADC File Offset: 0x00012CDC
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[MonitoringDescription("Handles for this process.")]
public int HandleCount
{
get
{
return 0;
}
}
/// <summary>Gets a value indicating whether the associated process has been terminated.</summary>
/// <returns>true if the operating system process referenced by the <see cref="T:System.Diagnostics.Process" /> component has terminated; otherwise, false.</returns>
/// <exception cref="T:System.InvalidOperationException">There is no process associated with the object. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">The exit code for the process could not be retrieved. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.HasExited" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001EA RID: 490
// (get) Token: 0x060007C4 RID: 1988 RVA: 0x00014AE0 File Offset: 0x00012CE0
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("Determines if the process is still running.")]
public bool HasExited
{
get
{
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("Process has not been started.");
}
int num = Process.ExitCode_internal(this.process_handle);
return num != 259;
}
}
/// <summary>Gets the unique identifier for the associated process.</summary>
/// <returns>The system-generated unique identifier of the process that is referenced by this <see cref="T:System.Diagnostics.Process" /> instance.</returns>
/// <exception cref="T:System.InvalidOperationException">The process's <see cref="P:System.Diagnostics.Process.Id" /> property has not been set.-or- There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set the <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001EB RID: 491
// (get) Token: 0x060007C5 RID: 1989 RVA: 0x00014B28 File Offset: 0x00012D28
[MonitoringDescription("Process identifier.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int Id
{
get
{
if (this.pid == 0)
{
throw new InvalidOperationException("Process ID has not been set.");
}
return this.pid;
}
}
/// <summary>Gets the name of the computer the associated process is running on.</summary>
/// <returns>The name of the computer that the associated process is running on.</returns>
/// <exception cref="T:System.InvalidOperationException">There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001EC RID: 492
// (get) Token: 0x060007C6 RID: 1990 RVA: 0x00014B48 File Offset: 0x00012D48
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[MonitoringDescription("The name of the computer running the process.")]
[global::System.ComponentModel.Browsable(false)]
public string MachineName
{
get
{
return "localhost";
}
}
/// <summary>Gets the main module for the associated process.</summary>
/// <returns>The <see cref="T:System.Diagnostics.ProcessModule" /> that was used to start the process.</returns>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MainModule" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.-or- The process has exited. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001ED RID: 493
// (get) Token: 0x060007C7 RID: 1991 RVA: 0x00014B50 File Offset: 0x00012D50
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
[MonitoringDescription("The main module of the process.")]
public ProcessModule MainModule
{
get
{
return this.Modules[0];
}
}
/// <summary>Gets the window handle of the main window of the associated process.</summary>
/// <returns>The system-generated window handle of the main window of the associated process.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.MainWindowHandle" /> is not defined because the process has exited. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MainWindowHandle" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001EE RID: 494
// (get) Token: 0x060007C8 RID: 1992 RVA: 0x00014B60 File Offset: 0x00012D60
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[MonitoringDescription("The handle of the main window of the process.")]
public IntPtr MainWindowHandle
{
get
{
return (IntPtr)0;
}
}
/// <summary>Gets the caption of the main window of the process.</summary>
/// <returns>The process's main window title.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.MainWindowTitle" /> property is not defined because the process has exited. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MainWindowTitle" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001EF RID: 495
// (get) Token: 0x060007C9 RID: 1993 RVA: 0x00014B68 File Offset: 0x00012D68
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The title of the main window of the process.")]
[global::System.MonoTODO]
public string MainWindowTitle
{
get
{
return "null";
}
}
// Token: 0x060007CA RID: 1994
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool GetWorkingSet_internal(IntPtr handle, out int min, out int max);
// Token: 0x060007CB RID: 1995
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool SetWorkingSet_internal(IntPtr handle, int min, int max, bool use_min);
/// <summary>Gets or sets the maximum allowable working set size for the associated process.</summary>
/// <returns>The maximum working set size that is allowed in memory for the process, in bytes.</returns>
/// <exception cref="T:System.ArgumentException">The maximum working set size is invalid. It must be greater than or equal to the minimum working set size.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">Working set information cannot be retrieved from the associated process resource.-or- The process identifier or process handle is zero because the process has not been started. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MaxWorkingSet" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer.</exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.-or- The process has exited. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F0 RID: 496
// (get) Token: 0x060007CC RID: 1996 RVA: 0x00014B70 File Offset: 0x00012D70
// (set) Token: 0x060007CD RID: 1997 RVA: 0x00014BEC File Offset: 0x00012DEC
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The maximum working set for this process.")]
public IntPtr MaxWorkingSet
{
get
{
if (this.HasExited)
{
throw new InvalidOperationException(string.Concat(new object[] { "The process ", this.ProcessName, " (ID ", this.Id, ") has exited" }));
}
int num;
int num2;
if (!Process.GetWorkingSet_internal(this.process_handle, out num, out num2))
{
throw new global::System.ComponentModel.Win32Exception();
}
return (IntPtr)num2;
}
set
{
if (this.HasExited)
{
throw new InvalidOperationException(string.Concat(new object[] { "The process ", this.ProcessName, " (ID ", this.Id, ") has exited" }));
}
if (!Process.SetWorkingSet_internal(this.process_handle, 0, value.ToInt32(), false))
{
throw new global::System.ComponentModel.Win32Exception();
}
}
}
/// <summary>Gets or sets the minimum allowable working set size for the associated process.</summary>
/// <returns>The minimum working set size that is required in memory for the process, in bytes.</returns>
/// <exception cref="T:System.ArgumentException">The minimum working set size is invalid. It must be less than or equal to the maximum working set size.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">Working set information cannot be retrieved from the associated process resource.-or- The process identifier or process handle is zero because the process has not been started. </exception>
/// <exception cref="T:System.NotSupportedException">You are trying to access the <see cref="P:System.Diagnostics.Process.MinWorkingSet" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.-or- The process has exited.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F1 RID: 497
// (get) Token: 0x060007CE RID: 1998 RVA: 0x00014C68 File Offset: 0x00012E68
// (set) Token: 0x060007CF RID: 1999 RVA: 0x00014CE4 File Offset: 0x00012EE4
[MonitoringDescription("The minimum working set for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public IntPtr MinWorkingSet
{
get
{
if (this.HasExited)
{
throw new InvalidOperationException(string.Concat(new object[] { "The process ", this.ProcessName, " (ID ", this.Id, ") has exited" }));
}
int num;
int num2;
if (!Process.GetWorkingSet_internal(this.process_handle, out num, out num2))
{
throw new global::System.ComponentModel.Win32Exception();
}
return (IntPtr)num;
}
set
{
if (this.HasExited)
{
throw new InvalidOperationException(string.Concat(new object[] { "The process ", this.ProcessName, " (ID ", this.Id, ") has exited" }));
}
if (!Process.SetWorkingSet_internal(this.process_handle, value.ToInt32(), 0, true))
{
throw new global::System.ComponentModel.Win32Exception();
}
}
}
// Token: 0x060007D0 RID: 2000
[MethodImpl(MethodImplOptions.InternalCall)]
private extern ProcessModule[] GetModules_internal(IntPtr handle);
/// <summary>Gets the modules that have been loaded by the associated process.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.ProcessModule" /> that represents the modules that have been loaded by the associated process.</returns>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.Modules" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">You are attempting to access the <see cref="P:System.Diagnostics.Process.Modules" /> property for either the system process or the idle process. These processes do not have modules.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F2 RID: 498
// (get) Token: 0x060007D1 RID: 2001 RVA: 0x00014D60 File Offset: 0x00012F60
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
[MonitoringDescription("The modules that are loaded as part of this process.")]
public ProcessModuleCollection Modules
{
get
{
if (this.module_collection == null)
{
this.module_collection = new ProcessModuleCollection(this.GetModules_internal(this.process_handle));
}
return this.module_collection;
}
}
// Token: 0x060007D2 RID: 2002
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern long GetProcessData(int pid, int data_type, out int error);
/// <summary>Gets the nonpaged system memory size allocated to this process.</summary>
/// <returns>The amount of memory, in bytes, the system has allocated for the associated process that cannot be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F3 RID: 499
// (get) Token: 0x060007D3 RID: 2003 RVA: 0x00014D98 File Offset: 0x00012F98
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The number of bytes that are not pageable.")]
[global::System.MonoTODO]
[Obsolete("Use NonpagedSystemMemorySize64")]
public int NonpagedSystemMemorySize
{
get
{
return 0;
}
}
/// <summary>Gets the paged memory size.</summary>
/// <returns>The amount of memory, in bytes, allocated by the associated process that can be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F4 RID: 500
// (get) Token: 0x060007D4 RID: 2004 RVA: 0x00014D9C File Offset: 0x00012F9C
[MonitoringDescription("The number of bytes that are paged.")]
[global::System.MonoTODO]
[Obsolete("Use PagedMemorySize64")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int PagedMemorySize
{
get
{
return 0;
}
}
/// <summary>Gets the paged system memory size.</summary>
/// <returns>The amount of memory, in bytes, the system has allocated for the associated process that can be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F5 RID: 501
// (get) Token: 0x060007D5 RID: 2005 RVA: 0x00014DA0 File Offset: 0x00012FA0
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[Obsolete("Use PagedSystemMemorySize64")]
[MonitoringDescription("The amount of paged system memory in bytes.")]
public int PagedSystemMemorySize
{
get
{
return 0;
}
}
/// <summary>Gets the peak paged memory size.</summary>
/// <returns>The maximum amount of memory, in bytes, allocated by the associated process that could be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F6 RID: 502
// (get) Token: 0x060007D6 RID: 2006 RVA: 0x00014DA4 File Offset: 0x00012FA4
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[Obsolete("Use PeakPagedMemorySize64")]
[global::System.MonoTODO]
[MonitoringDescription("The maximum amount of paged memory used by this process.")]
public int PeakPagedMemorySize
{
get
{
return 0;
}
}
/// <summary>Gets the peak virtual memory size.</summary>
/// <returns>The maximum amount of virtual memory, in bytes, that the associated process has requested.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F7 RID: 503
// (get) Token: 0x060007D7 RID: 2007 RVA: 0x00014DA8 File Offset: 0x00012FA8
[MonitoringDescription("The maximum amount of virtual memory used by this process.")]
[Obsolete("Use PeakVirtualMemorySize64")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int PeakVirtualMemorySize
{
get
{
int num;
return (int)Process.GetProcessData(this.pid, 8, out num);
}
}
/// <summary>Gets the peak working set size for the associated process.</summary>
/// <returns>The maximum amount of physical memory that the associated process has required all at once, in bytes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F8 RID: 504
// (get) Token: 0x060007D8 RID: 2008 RVA: 0x00014DC4 File Offset: 0x00012FC4
[MonitoringDescription("The maximum amount of system memory used by this process.")]
[Obsolete("Use PeakWorkingSet64")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int PeakWorkingSet
{
get
{
int num;
return (int)Process.GetProcessData(this.pid, 5, out num);
}
}
/// <summary>Gets the amount of nonpaged system memory allocated for the associated process.</summary>
/// <returns>The amount of system memory, in bytes, allocated for the associated process that cannot be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001F9 RID: 505
// (get) Token: 0x060007D9 RID: 2009 RVA: 0x00014DE0 File Offset: 0x00012FE0
[global::System.MonoTODO]
[ComVisible(false)]
[MonitoringDescription("The number of bytes that are not pageable.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public long NonpagedSystemMemorySize64
{
get
{
return 0L;
}
}
/// <summary>Gets the amount of paged memory allocated for the associated process.</summary>
/// <returns>The amount of memory, in bytes, allocated in the virtual memory paging file for the associated process.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001FA RID: 506
// (get) Token: 0x060007DA RID: 2010 RVA: 0x00014DE4 File Offset: 0x00012FE4
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The number of bytes that are paged.")]
[global::System.MonoTODO]
[ComVisible(false)]
public long PagedMemorySize64
{
get
{
return 0L;
}
}
/// <summary>Gets the amount of pageable system memory allocated for the associated process.</summary>
/// <returns>The amount of system memory, in bytes, allocated for the associated process that can be written to the virtual memory paging file.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001FB RID: 507
// (get) Token: 0x060007DB RID: 2011 RVA: 0x00014DE8 File Offset: 0x00012FE8
[ComVisible(false)]
[global::System.MonoTODO]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The amount of paged system memory in bytes.")]
public long PagedSystemMemorySize64
{
get
{
return 0L;
}
}
/// <summary>Gets the maximum amount of memory in the virtual memory paging file used by the associated process.</summary>
/// <returns>The maximum amount of memory, in bytes, allocated in the virtual memory paging file for the associated process since it was started.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001FC RID: 508
// (get) Token: 0x060007DC RID: 2012 RVA: 0x00014DEC File Offset: 0x00012FEC
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The maximum amount of paged memory used by this process.")]
[ComVisible(false)]
[global::System.MonoTODO]
public long PeakPagedMemorySize64
{
get
{
return 0L;
}
}
/// <summary>Gets the maximum amount of virtual memory used by the associated process.</summary>
/// <returns>The maximum amount of virtual memory, in bytes, allocated for the associated process since it was started.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001FD RID: 509
// (get) Token: 0x060007DD RID: 2013 RVA: 0x00014DF0 File Offset: 0x00012FF0
[MonitoringDescription("The maximum amount of virtual memory used by this process.")]
[ComVisible(false)]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public long PeakVirtualMemorySize64
{
get
{
int num;
return Process.GetProcessData(this.pid, 8, out num);
}
}
/// <summary>Gets the maximum amount of physical memory used by the associated process.</summary>
/// <returns>The maximum amount of physical memory, in bytes, allocated for the associated process since it was started.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x170001FE RID: 510
// (get) Token: 0x060007DE RID: 2014 RVA: 0x00014E0C File Offset: 0x0001300C
[MonitoringDescription("The maximum amount of system memory used by this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[ComVisible(false)]
public long PeakWorkingSet64
{
get
{
int num;
return Process.GetProcessData(this.pid, 5, out num);
}
}
/// <summary>Gets or sets a value indicating whether the associated process priority should temporarily be boosted by the operating system when the main window has the focus.</summary>
/// <returns>true if dynamic boosting of the process priority should take place for a process when it is taken out of the wait state; otherwise, false. The default is false.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">Priority boost information could not be retrieved from the associated process resource. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.-or- The process identifier or process handle is zero. (The process has not been started.) </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.PriorityBoostEnabled" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x170001FF RID: 511
// (get) Token: 0x060007DF RID: 2015 RVA: 0x00014E28 File Offset: 0x00013028
// (set) Token: 0x060007E0 RID: 2016 RVA: 0x00014E2C File Offset: 0x0001302C
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[MonitoringDescription("Process will be of higher priority while it is actively used.")]
public bool PriorityBoostEnabled
{
get
{
return false;
}
set
{
}
}
/// <summary>Gets or sets the overall priority category for the associated process.</summary>
/// <returns>The priority category for the associated process, from which the <see cref="P:System.Diagnostics.Process.BasePriority" /> of the process is calculated.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">Process priority information could not be set or retrieved from the associated process resource.-or- The process identifier or process handle is zero. (The process has not been started.) </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.PriorityClass" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> is not available.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">You have set the <see cref="P:System.Diagnostics.Process.PriorityClass" /> to AboveNormal or BelowNormal when using Windows 98 or Windows Millennium Edition (Windows Me). These platforms do not support those values for the priority class. </exception>
/// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException">Priority class cannot be set because it does not use a valid value, as defined in the <see cref="T:System.Diagnostics.ProcessPriorityClass" /> enumeration.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000200 RID: 512
// (get) Token: 0x060007E1 RID: 2017 RVA: 0x00014E30 File Offset: 0x00013030
// (set) Token: 0x060007E2 RID: 2018 RVA: 0x00014E7C File Offset: 0x0001307C
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoLimitation("Under Unix, only root is allowed to raise the priority.")]
[MonitoringDescription("The relative process priority.")]
public ProcessPriorityClass PriorityClass
{
get
{
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("Process has not been started.");
}
int num;
int priorityClass = Process.GetPriorityClass(this.process_handle, out num);
if (priorityClass == 0)
{
throw new global::System.ComponentModel.Win32Exception(num);
}
return (ProcessPriorityClass)priorityClass;
}
set
{
if (!Enum.IsDefined(typeof(ProcessPriorityClass), value))
{
throw new global::System.ComponentModel.InvalidEnumArgumentException("value", (int)value, typeof(ProcessPriorityClass));
}
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("Process has not been started.");
}
int num;
if (!Process.SetPriorityClass(this.process_handle, (int)value, out num))
{
throw new global::System.ComponentModel.Win32Exception(num);
}
}
}
// Token: 0x060007E3 RID: 2019
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int GetPriorityClass(IntPtr handle, out int error);
// Token: 0x060007E4 RID: 2020
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool SetPriorityClass(IntPtr handle, int priority, out int error);
/// <summary>Gets the private memory size.</summary>
/// <returns>The number of bytes allocated by the associated process that cannot be shared with other processes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000201 RID: 513
// (get) Token: 0x060007E5 RID: 2021 RVA: 0x00014EF4 File Offset: 0x000130F4
[MonitoringDescription("The amount of memory exclusively used by this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[Obsolete("Use PrivateMemorySize64")]
public int PrivateMemorySize
{
get
{
int num;
return (int)Process.GetProcessData(this.pid, 6, out num);
}
}
/// <summary>Gets the Terminal Services session identifier for the associated process.</summary>
/// <returns>The Terminal Services session identifier for the associated process.</returns>
/// <exception cref="T:System.NullReferenceException">There is no session associated with this process.</exception>
/// <exception cref="T:System.InvalidOperationException">There is no process associated with this session identifier.-or-The associated process is not on this machine. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The <see cref="P:System.Diagnostics.Process.SessionId" /> property is not supported on Windows 98.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000202 RID: 514
// (get) Token: 0x060007E6 RID: 2022 RVA: 0x00014F10 File Offset: 0x00013110
[MonitoringDescription("The session ID for this process.")]
[global::System.MonoNotSupported("")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int SessionId
{
get
{
throw new NotImplementedException();
}
}
// Token: 0x060007E7 RID: 2023
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern long Times(IntPtr handle, int type);
/// <summary>Gets the privileged processor time for this process.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the process has spent running code inside the operating system core.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000203 RID: 515
// (get) Token: 0x060007E8 RID: 2024 RVA: 0x00014F18 File Offset: 0x00013118
[MonitoringDescription("The amount of processing time spent in the OS core for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public TimeSpan PrivilegedProcessorTime
{
get
{
return new TimeSpan(Process.Times(this.process_handle, 1));
}
}
// Token: 0x060007E9 RID: 2025
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern string ProcessName_internal(IntPtr handle);
/// <summary>Gets the name of the process.</summary>
/// <returns>The name that the system uses to identify the process to the user.</returns>
/// <exception cref="T:System.InvalidOperationException">The process does not have an identifier, or no process is associated with the <see cref="T:System.Diagnostics.Process" />.-or- The associated process has exited. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000204 RID: 516
// (get) Token: 0x060007EA RID: 2026 RVA: 0x00014F2C File Offset: 0x0001312C
[MonitoringDescription("The name of this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public string ProcessName
{
get
{
if (this.process_name == null)
{
if (this.process_handle == IntPtr.Zero)
{
throw new InvalidOperationException("No process is associated with this object.");
}
this.process_name = Process.ProcessName_internal(this.process_handle);
if (this.process_name == null)
{
throw new InvalidOperationException("Process has exited, so the requested information is not available.");
}
if (this.process_name.EndsWith(".exe") || this.process_name.EndsWith(".bat") || this.process_name.EndsWith(".com"))
{
this.process_name = this.process_name.Substring(0, this.process_name.Length - 4);
}
}
return this.process_name;
}
}
/// <summary>Gets or sets the processors on which the threads in this process can be scheduled to run.</summary>
/// <returns>A bitmask representing the processors that the threads in the associated process can run on. The default depends on the number of processors on the computer. The default value is 2 n -1, where n is the number of processors.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">
/// <see cref="P:System.Diagnostics.Process.ProcessorAffinity" /> information could not be set or retrieved from the associated process resource.-or- The process identifier or process handle is zero. (The process has not been started.) </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.ProcessorAffinity" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process <see cref="P:System.Diagnostics.Process.Id" /> was not available.-or- The process has exited. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000205 RID: 517
// (get) Token: 0x060007EB RID: 2027 RVA: 0x00014FF0 File Offset: 0x000131F0
// (set) Token: 0x060007EC RID: 2028 RVA: 0x00014FF8 File Offset: 0x000131F8
[global::System.MonoTODO]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("Allowed processor that can be used by this process.")]
public IntPtr ProcessorAffinity
{
get
{
return (IntPtr)0;
}
set
{
}
}
/// <summary>Gets a value indicating whether the user interface of the process is responding.</summary>
/// <returns>true if the user interface of the associated process is responding to the system; otherwise, false.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <exception cref="T:System.InvalidOperationException">There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object. </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.Responding" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000206 RID: 518
// (get) Token: 0x060007ED RID: 2029 RVA: 0x00014FFC File Offset: 0x000131FC
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.MonoTODO]
[MonitoringDescription("Is this process responsive.")]
public bool Responding
{
get
{
return false;
}
}
/// <summary>Gets a stream used to read the error output of the application.</summary>
/// <returns>A <see cref="T:System.IO.StreamReader" /> that can be used to read the standard error stream of the application.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.StandardError" /> stream has not been defined for redirection; ensure <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> is set to true and <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> is set to false.- or - The <see cref="P:System.Diagnostics.Process.StandardError" /> stream has been opened for asynchronous read operations with <see cref="M:System.Diagnostics.Process.BeginErrorReadLine" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000207 RID: 519
// (get) Token: 0x060007EE RID: 2030 RVA: 0x00015000 File Offset: 0x00013200
[MonitoringDescription("The standard error stream of this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public StreamReader StandardError
{
get
{
if (this.error_stream == null)
{
throw new InvalidOperationException("Standard error has not been redirected");
}
if ((this.async_mode & Process.AsyncModes.AsyncError) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("Cannot mix asynchronous and synchonous reads.");
}
this.async_mode |= Process.AsyncModes.SyncError;
return this.error_stream;
}
}
/// <summary>Gets a stream used to write the input of the application.</summary>
/// <returns>A <see cref="T:System.IO.StreamWriter" /> that can be used to write the standard input stream of the application.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.StandardInput" /> stream has not been defined because <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" /> is set to false. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000208 RID: 520
// (get) Token: 0x060007EF RID: 2031 RVA: 0x00015050 File Offset: 0x00013250
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
[MonitoringDescription("The standard input stream of this process.")]
public StreamWriter StandardInput
{
get
{
if (this.input_stream == null)
{
throw new InvalidOperationException("Standard input has not been redirected");
}
return this.input_stream;
}
}
/// <summary>Gets a stream used to read the output of the application.</summary>
/// <returns>A <see cref="T:System.IO.StreamReader" /> that can be used to read the standard output stream of the application.</returns>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream has not been defined for redirection; ensure <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" /> is set to true and <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> is set to false.- or - The <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream has been opened for asynchronous read operations with <see cref="M:System.Diagnostics.Process.BeginOutputReadLine" />. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x17000209 RID: 521
// (get) Token: 0x060007F0 RID: 2032 RVA: 0x00015070 File Offset: 0x00013270
[MonitoringDescription("The standard output stream of this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public StreamReader StandardOutput
{
get
{
if (this.output_stream == null)
{
throw new InvalidOperationException("Standard output has not been redirected");
}
if ((this.async_mode & Process.AsyncModes.AsyncOutput) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("Cannot mix asynchronous and synchonous reads.");
}
this.async_mode |= Process.AsyncModes.SyncOutput;
return this.output_stream;
}
}
/// <summary>Gets or sets the properties to pass to the <see cref="M:System.Diagnostics.Process.Start" /> method of the <see cref="T:System.Diagnostics.Process" />.</summary>
/// <returns>The <see cref="T:System.Diagnostics.ProcessStartInfo" /> that represents the data with which to start the process. These arguments include the name of the executable file or document used to start the process.</returns>
/// <exception cref="T:System.ArgumentNullException">The value that specifies the <see cref="P:System.Diagnostics.Process.StartInfo" /> is null. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x1700020A RID: 522
// (get) Token: 0x060007F1 RID: 2033 RVA: 0x000150C0 File Offset: 0x000132C0
// (set) Token: 0x060007F2 RID: 2034 RVA: 0x000150E0 File Offset: 0x000132E0
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
[global::System.ComponentModel.Browsable(false)]
[MonitoringDescription("Information for the start of this process.")]
public ProcessStartInfo StartInfo
{
get
{
if (this.start_info == null)
{
this.start_info = new ProcessStartInfo();
}
return this.start_info;
}
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
this.start_info = value;
}
}
// Token: 0x060007F3 RID: 2035
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern long StartTime_internal(IntPtr handle);
/// <summary>Gets the time that the associated process was started.</summary>
/// <returns>A <see cref="T:System.DateTime" /> that indicates when the process started. This only has meaning for started processes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.StartTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <exception cref="T:System.InvalidOperationException">The process has exited.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">An error occurred in the call to the Windows function.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x1700020B RID: 523
// (get) Token: 0x060007F4 RID: 2036 RVA: 0x000150FC File Offset: 0x000132FC
[MonitoringDescription("The time this process started.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public DateTime StartTime
{
get
{
return DateTime.FromFileTime(Process.StartTime_internal(this.process_handle));
}
}
/// <summary>Gets or sets the object used to marshal the event handler calls that are issued as a result of a process exit event.</summary>
/// <returns>The <see cref="T:System.ComponentModel.ISynchronizeInvoke" /> used to marshal event handler calls that are issued as a result of an <see cref="E:System.Diagnostics.Process.Exited" /> event on the process.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700020C RID: 524
// (get) Token: 0x060007F5 RID: 2037 RVA: 0x00015110 File Offset: 0x00013310
// (set) Token: 0x060007F6 RID: 2038 RVA: 0x00015118 File Offset: 0x00013318
[global::System.ComponentModel.Browsable(false)]
[global::System.ComponentModel.DefaultValue(null)]
[MonitoringDescription("The object that is used to synchronize event handler calls for this process.")]
public global::System.ComponentModel.ISynchronizeInvoke SynchronizingObject
{
get
{
return this.synchronizingObject;
}
set
{
this.synchronizingObject = value;
}
}
/// <summary>Gets the set of threads that are running in the associated process.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.ProcessThread" /> representing the operating system threads currently running in the associated process.</returns>
/// <exception cref="T:System.SystemException">The process does not have an <see cref="P:System.Diagnostics.Process.Id" />, or no process is associated with the <see cref="T:System.Diagnostics.Process" /> instance.-or- The associated process has exited. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> to false to access this property on Windows 98 and Windows Me.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x1700020D RID: 525
// (get) Token: 0x060007F7 RID: 2039 RVA: 0x00015124 File Offset: 0x00013324
[global::System.ComponentModel.Browsable(false)]
[MonitoringDescription("The number of threads of this process.")]
[global::System.MonoTODO]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public ProcessThreadCollection Threads
{
get
{
return ProcessThreadCollection.GetEmpty();
}
}
/// <summary>Gets the total processor time for this process.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the associated process has spent utilizing the CPU. This value is the sum of the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> and the <see cref="P:System.Diagnostics.Process.PrivilegedProcessorTime" />.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.TotalProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x1700020E RID: 526
// (get) Token: 0x060007F8 RID: 2040 RVA: 0x0001512C File Offset: 0x0001332C
[MonitoringDescription("The total CPU time spent for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public TimeSpan TotalProcessorTime
{
get
{
return new TimeSpan(Process.Times(this.process_handle, 2));
}
}
/// <summary>Gets the user processor time for this process.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the associated process has spent running code inside the application portion of the process (not inside the operating system core).</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to access the <see cref="P:System.Diagnostics.Process.UserProcessorTime" /> property for a process that is running on a remote computer. This property is available only for processes that are running on the local computer. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x1700020F RID: 527
// (get) Token: 0x060007F9 RID: 2041 RVA: 0x00015140 File Offset: 0x00013340
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The CPU time spent for this process in user mode.")]
public TimeSpan UserProcessorTime
{
get
{
return new TimeSpan(Process.Times(this.process_handle, 0));
}
}
/// <summary>Gets the size of the process's virtual memory.</summary>
/// <returns>The amount of virtual memory, in bytes, that the associated process has requested.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000210 RID: 528
// (get) Token: 0x060007FA RID: 2042 RVA: 0x00015154 File Offset: 0x00013354
[MonitoringDescription("The amount of virtual memory currently used for this process.")]
[Obsolete("Use VirtualMemorySize64")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int VirtualMemorySize
{
get
{
int num;
return (int)Process.GetProcessData(this.pid, 7, out num);
}
}
/// <summary>Gets the associated process's physical memory usage.</summary>
/// <returns>The total amount of physical memory the associated process is using, in bytes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000211 RID: 529
// (get) Token: 0x060007FB RID: 2043 RVA: 0x00015170 File Offset: 0x00013370
[Obsolete("Use WorkingSet64")]
[MonitoringDescription("The amount of physical memory currently used for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public int WorkingSet
{
get
{
int num;
return (int)Process.GetProcessData(this.pid, 4, out num);
}
}
/// <summary>Gets the amount of private memory allocated for the associated process.</summary>
/// <returns>The amount of memory, in bytes, allocated for the associated process that cannot be shared with other processes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000212 RID: 530
// (get) Token: 0x060007FC RID: 2044 RVA: 0x0001518C File Offset: 0x0001338C
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The amount of memory exclusively used by this process.")]
[ComVisible(false)]
public long PrivateMemorySize64
{
get
{
int num;
return Process.GetProcessData(this.pid, 6, out num);
}
}
/// <summary>Gets the amount of the virtual memory allocated for the associated process.</summary>
/// <returns>The amount of virtual memory, in bytes, allocated for the associated process.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000213 RID: 531
// (get) Token: 0x060007FD RID: 2045 RVA: 0x000151A8 File Offset: 0x000133A8
[ComVisible(false)]
[MonitoringDescription("The amount of virtual memory currently used for this process.")]
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
public long VirtualMemorySize64
{
get
{
int num;
return Process.GetProcessData(this.pid, 7, out num);
}
}
/// <summary>Gets the amount of physical memory allocated for the associated process.</summary>
/// <returns>The amount of physical memory, in bytes, allocated for the associated process.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me), which does not support this property.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000214 RID: 532
// (get) Token: 0x060007FE RID: 2046 RVA: 0x000151C4 File Offset: 0x000133C4
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[MonitoringDescription("The amount of physical memory currently used for this process.")]
[ComVisible(false)]
public long WorkingSet64
{
get
{
int num;
return Process.GetProcessData(this.pid, 4, out num);
}
}
/// <summary>Frees all the resources that are associated with this component.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x060007FF RID: 2047 RVA: 0x000151E0 File Offset: 0x000133E0
public void Close()
{
this.Dispose(true);
}
// Token: 0x06000800 RID: 2048
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool Kill_internal(IntPtr handle, int signo);
// Token: 0x06000801 RID: 2049 RVA: 0x000151EC File Offset: 0x000133EC
private bool Close(int signo)
{
if (this.process_handle == IntPtr.Zero)
{
throw new SystemException("No process to kill.");
}
int num = Process.ExitCode_internal(this.process_handle);
if (num != 259)
{
throw new InvalidOperationException("The process already finished.");
}
return Process.Kill_internal(this.process_handle, signo);
}
/// <summary>Closes a process that has a user interface by sending a close message to its main window.</summary>
/// <returns>true if the close message was successfully sent; false if the associated process does not have a main window or if the main window is disabled (for example if a modal dialog is being shown).</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition (Windows Me); set the <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property to false to access this property on Windows 98 and Windows Me.</exception>
/// <exception cref="T:System.InvalidOperationException">The process has already exited. -or-No process is associated with this <see cref="T:System.Diagnostics.Process" /> object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000802 RID: 2050 RVA: 0x00015248 File Offset: 0x00013448
public bool CloseMainWindow()
{
return this.Close(2);
}
/// <summary>Puts a <see cref="T:System.Diagnostics.Process" /> component in state to interact with operating system processes that run in a special mode by enabling the native property SeDebugPrivilege on the current thread.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x06000803 RID: 2051 RVA: 0x00015254 File Offset: 0x00013454
[global::System.MonoTODO]
public static void EnterDebugMode()
{
}
// Token: 0x06000804 RID: 2052
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern IntPtr GetProcess_internal(int pid);
// Token: 0x06000805 RID: 2053
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int GetPid_internal();
/// <summary>Gets a new <see cref="T:System.Diagnostics.Process" /> component and associates it with the currently active process.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component associated with the process resource that is running the calling application.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x06000806 RID: 2054 RVA: 0x00015258 File Offset: 0x00013458
public static Process GetCurrentProcess()
{
int pid_internal = Process.GetPid_internal();
IntPtr process_internal = Process.GetProcess_internal(pid_internal);
if (process_internal == IntPtr.Zero)
{
throw new SystemException("Can't find current process");
}
return new Process(process_internal, pid_internal);
}
/// <summary>Returns a new <see cref="T:System.Diagnostics.Process" /> component, given the identifier of a process on the local computer.</summary>
/// <returns>A <see cref="T:System.Diagnostics.Process" /> component that is associated with the local process resource identified by the <paramref name="processId" /> parameter.</returns>
/// <param name="processId">The system-unique identifier of a process resource. </param>
/// <exception cref="T:System.ArgumentException">The process specified by the <paramref name="processId" /> parameter is not running. The identifier might be expired. </exception>
/// <exception cref="T:System.InvalidOperationException">The process was not started by this object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000807 RID: 2055 RVA: 0x00015294 File Offset: 0x00013494
public static Process GetProcessById(int processId)
{
IntPtr process_internal = Process.GetProcess_internal(processId);
if (process_internal == IntPtr.Zero)
{
throw new ArgumentException("Can't find process with ID " + processId.ToString());
}
return new Process(process_internal, processId);
}
/// <summary>Returns a new <see cref="T:System.Diagnostics.Process" /> component, given a process identifier and the name of a computer on the network.</summary>
/// <returns>A <see cref="T:System.Diagnostics.Process" /> component that is associated with a remote process resource identified by the <paramref name="processId" /> parameter.</returns>
/// <param name="processId">The system-unique identifier of a process resource. </param>
/// <param name="machineName">The name of a computer on the network. </param>
/// <exception cref="T:System.ArgumentException">The process specified by the <paramref name="processId" /> parameter is not running. The identifier might be expired.-or- The <paramref name="machineName" /> parameter syntax is invalid. The name might have length zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="machineName" /> parameter is null. </exception>
/// <exception cref="T:System.InvalidOperationException">The process was not started by this object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000808 RID: 2056 RVA: 0x000152D8 File Offset: 0x000134D8
[global::System.MonoTODO("There is no support for retrieving process information from a remote machine")]
public static Process GetProcessById(int processId, string machineName)
{
if (machineName == null)
{
throw new ArgumentNullException("machineName");
}
if (!Process.IsLocalMachine(machineName))
{
throw new NotImplementedException();
}
return Process.GetProcessById(processId);
}
// Token: 0x06000809 RID: 2057
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern int[] GetProcesses_internal();
/// <summary>Creates a new <see cref="T:System.Diagnostics.Process" /> component for each process resource on the local computer.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.Process" /> that represents all the process resources running on the local computer.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x0600080A RID: 2058 RVA: 0x00015310 File Offset: 0x00013510
public static Process[] GetProcesses()
{
int[] processes_internal = Process.GetProcesses_internal();
ArrayList arrayList = new ArrayList();
if (processes_internal == null)
{
return new Process[0];
}
for (int i = 0; i < processes_internal.Length; i++)
{
try
{
arrayList.Add(Process.GetProcessById(processes_internal[i]));
}
catch (SystemException)
{
}
}
return (Process[])arrayList.ToArray(typeof(Process));
}
/// <summary>Creates a new <see cref="T:System.Diagnostics.Process" /> component for each process resource on the specified computer.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.Process" /> that represents all the process resources running on the specified computer.</returns>
/// <param name="machineName">The computer from which to read the list of processes. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="machineName" /> parameter syntax is invalid. It might have length zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="machineName" /> parameter is null. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The operating system platform does not support this operation on remote computers. </exception>
/// <exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600080B RID: 2059 RVA: 0x00015398 File Offset: 0x00013598
[global::System.MonoTODO("There is no support for retrieving process information from a remote machine")]
public static Process[] GetProcesses(string machineName)
{
if (machineName == null)
{
throw new ArgumentNullException("machineName");
}
if (!Process.IsLocalMachine(machineName))
{
throw new NotImplementedException();
}
return Process.GetProcesses();
}
/// <summary>Creates an array of new <see cref="T:System.Diagnostics.Process" /> components and associates them with all the process resources on the local computer that share the specified process name.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.Process" /> that represents the process resources running the specified application or file.</returns>
/// <param name="processName">The friendly name of the process. </param>
/// <exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600080C RID: 2060 RVA: 0x000153C4 File Offset: 0x000135C4
public static Process[] GetProcessesByName(string processName)
{
Process[] processes = Process.GetProcesses();
ArrayList arrayList = new ArrayList();
for (int i = 0; i < processes.Length; i++)
{
try
{
if (string.Compare(processName, processes[i].ProcessName, true) == 0)
{
arrayList.Add(processes[i]);
}
}
catch (Exception)
{
}
}
return (Process[])arrayList.ToArray(typeof(Process));
}
/// <summary>Creates an array of new <see cref="T:System.Diagnostics.Process" /> components and associates them with all the process resources on a remote computer that share the specified process name.</summary>
/// <returns>An array of type <see cref="T:System.Diagnostics.Process" /> that represents the process resources running the specified application or file.</returns>
/// <param name="processName">The friendly name of the process. </param>
/// <param name="machineName">The name of a computer on the network. </param>
/// <exception cref="T:System.ArgumentException">The <paramref name="machineName" /> parameter syntax is invalid. It might have length zero (0). </exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="machineName" /> parameter is null. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The operating system platform does not support this operation on remote computers. </exception>
/// <exception cref="T:System.InvalidOperationException">There are problems accessing the performance counter API's used to get process information. This exception is specific to Windows NT, Windows 2000, and Windows XP. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">A problem occurred accessing an underlying system API. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600080D RID: 2061 RVA: 0x0001544C File Offset: 0x0001364C
[global::System.MonoTODO]
public static Process[] GetProcessesByName(string processName, string machineName)
{
throw new NotImplementedException();
}
/// <summary>Immediately stops the associated process.</summary>
/// <exception cref="T:System.ComponentModel.Win32Exception">The associated process could not be terminated. -or-The process is terminating.-or- The associated process is a Win16 executable.</exception>
/// <exception cref="T:System.NotSupportedException">You are attempting to call <see cref="M:System.Diagnostics.Process.Kill" /> for a process that is running on a remote computer. The method is available only for processes running on the local computer.</exception>
/// <exception cref="T:System.InvalidOperationException">The process has already exited. -or-There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600080E RID: 2062 RVA: 0x00015454 File Offset: 0x00013654
public void Kill()
{
this.Close(1);
}
/// <summary>Takes a <see cref="T:System.Diagnostics.Process" /> component out of the state that lets it interact with operating system processes that run in a special mode.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x0600080F RID: 2063 RVA: 0x00015460 File Offset: 0x00013660
[global::System.MonoTODO]
public static void LeaveDebugMode()
{
}
/// <summary>Discards any information about the associated process that has been cached inside the process component.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x06000810 RID: 2064 RVA: 0x00015464 File Offset: 0x00013664
public void Refresh()
{
}
// Token: 0x06000811 RID: 2065
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool ShellExecuteEx_internal(ProcessStartInfo startInfo, ref Process.ProcInfo proc_info);
// Token: 0x06000812 RID: 2066
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern bool CreateProcess_internal(ProcessStartInfo startInfo, IntPtr stdin, IntPtr stdout, IntPtr stderr, ref Process.ProcInfo proc_info);
// Token: 0x06000813 RID: 2067 RVA: 0x00015468 File Offset: 0x00013668
private static bool Start_shell(ProcessStartInfo startInfo, Process process)
{
Process.ProcInfo procInfo = default(Process.ProcInfo);
if (startInfo.RedirectStandardInput || startInfo.RedirectStandardOutput || startInfo.RedirectStandardError)
{
throw new InvalidOperationException("UseShellExecute must be false when redirecting I/O.");
}
if (startInfo.HaveEnvVars)
{
throw new InvalidOperationException("UseShellExecute must be false in order to use environment variables.");
}
Process.FillUserInfo(startInfo, ref procInfo);
bool flag;
try
{
flag = Process.ShellExecuteEx_internal(startInfo, ref procInfo);
}
finally
{
if (procInfo.Password != IntPtr.Zero)
{
Marshal.FreeBSTR(procInfo.Password);
}
procInfo.Password = IntPtr.Zero;
}
if (!flag)
{
throw new global::System.ComponentModel.Win32Exception(-procInfo.pid);
}
process.process_handle = procInfo.process_handle;
process.pid = procInfo.pid;
process.StartExitCallbackIfNeeded();
return flag;
}
// Token: 0x06000814 RID: 2068 RVA: 0x00015558 File Offset: 0x00013758
private static bool Start_noshell(ProcessStartInfo startInfo, Process process)
{
Process.ProcInfo procInfo = default(Process.ProcInfo);
IntPtr intPtr = IntPtr.Zero;
IntPtr intPtr2 = IntPtr.Zero;
if (startInfo.HaveEnvVars)
{
string[] array = new string[startInfo.EnvironmentVariables.Count];
startInfo.EnvironmentVariables.Keys.CopyTo(array, 0);
procInfo.envKeys = array;
array = new string[startInfo.EnvironmentVariables.Count];
startInfo.EnvironmentVariables.Values.CopyTo(array, 0);
procInfo.envValues = array;
}
bool flag;
if (startInfo.RedirectStandardInput)
{
if (Process.IsWindows)
{
int num = 2;
IntPtr intPtr3;
flag = global::System.IO.MonoIO.CreatePipe(out intPtr, out intPtr3);
if (flag)
{
flag = global::System.IO.MonoIO.DuplicateHandle(Process.GetCurrentProcess().Handle, intPtr3, Process.GetCurrentProcess().Handle, out intPtr2, 0, 0, num);
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr3, out monoIOError);
}
}
else
{
flag = global::System.IO.MonoIO.CreatePipe(out intPtr, out intPtr2);
}
if (!flag)
{
throw new IOException("Error creating standard input pipe");
}
}
else
{
intPtr = global::System.IO.MonoIO.ConsoleInput;
intPtr2 = (IntPtr)0;
}
IntPtr consoleOutput;
if (startInfo.RedirectStandardOutput)
{
IntPtr zero = IntPtr.Zero;
if (Process.IsWindows)
{
int num2 = 2;
IntPtr intPtr4;
flag = global::System.IO.MonoIO.CreatePipe(out intPtr4, out consoleOutput);
if (flag)
{
global::System.IO.MonoIO.DuplicateHandle(Process.GetCurrentProcess().Handle, intPtr4, Process.GetCurrentProcess().Handle, out zero, 0, 0, num2);
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr4, out monoIOError);
}
}
else
{
flag = global::System.IO.MonoIO.CreatePipe(out zero, out consoleOutput);
}
process.stdout_rd = zero;
if (!flag)
{
if (startInfo.RedirectStandardInput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr, out monoIOError);
global::System.IO.MonoIO.Close(intPtr2, out monoIOError);
}
throw new IOException("Error creating standard output pipe");
}
}
else
{
process.stdout_rd = (IntPtr)0;
consoleOutput = global::System.IO.MonoIO.ConsoleOutput;
}
IntPtr consoleError;
if (startInfo.RedirectStandardError)
{
IntPtr zero2 = IntPtr.Zero;
if (Process.IsWindows)
{
int num3 = 2;
IntPtr intPtr5;
flag = global::System.IO.MonoIO.CreatePipe(out intPtr5, out consoleError);
if (flag)
{
global::System.IO.MonoIO.DuplicateHandle(Process.GetCurrentProcess().Handle, intPtr5, Process.GetCurrentProcess().Handle, out zero2, 0, 0, num3);
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr5, out monoIOError);
}
}
else
{
flag = global::System.IO.MonoIO.CreatePipe(out zero2, out consoleError);
}
process.stderr_rd = zero2;
if (!flag)
{
if (startInfo.RedirectStandardInput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr, out monoIOError);
global::System.IO.MonoIO.Close(intPtr2, out monoIOError);
}
if (startInfo.RedirectStandardOutput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(process.stdout_rd, out monoIOError);
global::System.IO.MonoIO.Close(consoleOutput, out monoIOError);
}
throw new IOException("Error creating standard error pipe");
}
}
else
{
process.stderr_rd = (IntPtr)0;
consoleError = global::System.IO.MonoIO.ConsoleError;
}
Process.FillUserInfo(startInfo, ref procInfo);
try
{
flag = Process.CreateProcess_internal(startInfo, intPtr, consoleOutput, consoleError, ref procInfo);
}
finally
{
if (procInfo.Password != IntPtr.Zero)
{
Marshal.FreeBSTR(procInfo.Password);
}
procInfo.Password = IntPtr.Zero;
}
if (!flag)
{
if (startInfo.RedirectStandardInput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr, out monoIOError);
global::System.IO.MonoIO.Close(intPtr2, out monoIOError);
}
if (startInfo.RedirectStandardOutput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(process.stdout_rd, out monoIOError);
global::System.IO.MonoIO.Close(consoleOutput, out monoIOError);
}
if (startInfo.RedirectStandardError)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(process.stderr_rd, out monoIOError);
global::System.IO.MonoIO.Close(consoleError, out monoIOError);
}
throw new global::System.ComponentModel.Win32Exception(-procInfo.pid, string.Concat(new string[] { "ApplicationName='", startInfo.FileName, "', CommandLine='", startInfo.Arguments, "', CurrentDirectory='", startInfo.WorkingDirectory, "'" }));
}
process.process_handle = procInfo.process_handle;
process.pid = procInfo.pid;
if (startInfo.RedirectStandardInput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(intPtr, out monoIOError);
process.input_stream = new StreamWriter(new global::System.IO.MonoSyncFileStream(intPtr2, FileAccess.Write, true, 8192), Console.Out.Encoding);
process.input_stream.AutoFlush = true;
}
Encoding encoding = startInfo.StandardOutputEncoding ?? Console.Out.Encoding;
Encoding encoding2 = startInfo.StandardErrorEncoding ?? Console.Out.Encoding;
if (startInfo.RedirectStandardOutput)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(consoleOutput, out monoIOError);
process.output_stream = new StreamReader(new global::System.IO.MonoSyncFileStream(process.stdout_rd, FileAccess.Read, true, 8192), encoding, true, 8192);
}
if (startInfo.RedirectStandardError)
{
global::System.IO.MonoIOError monoIOError;
global::System.IO.MonoIO.Close(consoleError, out monoIOError);
process.error_stream = new StreamReader(new global::System.IO.MonoSyncFileStream(process.stderr_rd, FileAccess.Read, true, 8192), encoding2, true, 8192);
}
process.StartExitCallbackIfNeeded();
return flag;
}
// Token: 0x06000815 RID: 2069 RVA: 0x00015A30 File Offset: 0x00013C30
private static void FillUserInfo(ProcessStartInfo startInfo, ref Process.ProcInfo proc_info)
{
if (startInfo.UserName != null)
{
proc_info.UserName = startInfo.UserName;
proc_info.Domain = startInfo.Domain;
if (startInfo.Password != null)
{
proc_info.Password = Marshal.SecureStringToBSTR(startInfo.Password);
}
else
{
proc_info.Password = IntPtr.Zero;
}
proc_info.LoadUserProfile = startInfo.LoadUserProfile;
}
}
// Token: 0x06000816 RID: 2070 RVA: 0x00015A98 File Offset: 0x00013C98
private static bool Start_common(ProcessStartInfo startInfo, Process process)
{
if (startInfo.FileName == null || startInfo.FileName.Length == 0)
{
throw new InvalidOperationException("File name has not been set");
}
if (startInfo.StandardErrorEncoding != null && !startInfo.RedirectStandardError)
{
throw new InvalidOperationException("StandardErrorEncoding is only supported when standard error is redirected");
}
if (startInfo.StandardOutputEncoding != null && !startInfo.RedirectStandardOutput)
{
throw new InvalidOperationException("StandardOutputEncoding is only supported when standard output is redirected");
}
if (!startInfo.UseShellExecute)
{
return Process.Start_noshell(startInfo, process);
}
if (!string.IsNullOrEmpty(startInfo.UserName))
{
throw new InvalidOperationException("UserShellExecute must be false if an explicit UserName is specified when starting a process");
}
return Process.Start_shell(startInfo, process);
}
/// <summary>Starts (or reuses) the process resource that is specified by the <see cref="P:System.Diagnostics.Process.StartInfo" /> property of this <see cref="T:System.Diagnostics.Process" /> component and associates it with the component.</summary>
/// <returns>true if a process resource is started; false if no new process resource is started (for example, if an existing process is reused).</returns>
/// <exception cref="T:System.InvalidOperationException">No file name was specified in the <see cref="T:System.Diagnostics.Process" /> component's <see cref="P:System.Diagnostics.Process.StartInfo" />.-or- The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> member of the <see cref="P:System.Diagnostics.Process.StartInfo" /> property is true while <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" />, <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" />, or <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> is true. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">There was an error in opening the associated file. </exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000817 RID: 2071 RVA: 0x00015B44 File Offset: 0x00013D44
public bool Start()
{
if (this.process_handle != IntPtr.Zero)
{
this.Process_free_internal(this.process_handle);
this.process_handle = IntPtr.Zero;
}
return Process.Start_common(this.start_info, this);
}
/// <summary>Starts the process resource that is specified by the parameter containing process start information (for example, the file name of the process to start) and associates the resource with a new <see cref="T:System.Diagnostics.Process" /> component.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component that is associated with the process resource, or null if no process resource is started (for example, if an existing process is reused).</returns>
/// <param name="startInfo">The <see cref="T:System.Diagnostics.ProcessStartInfo" /> that contains the information that is used to start the process, including the file name and any command-line arguments. </param>
/// <exception cref="T:System.InvalidOperationException">No file name was specified in the <paramref name="startInfo" /> parameter's <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property.-or- The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property of the <paramref name="startInfo" /> parameter is true and the <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardInput" />, <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" />, or <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> property is also true.-or-The <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property of the <paramref name="startInfo" /> parameter is true and the <see cref="P:System.Diagnostics.ProcessStartInfo.UserName" /> property is not null or empty or the <see cref="P:System.Diagnostics.ProcessStartInfo.Password" /> property is not null.</exception>
/// <exception cref="T:System.ArgumentNullException">The <paramref name="startInfo" /> parameter is null. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">There was an error in opening the associated file. </exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The file specified in the <paramref name="startInfo" /> parameter's <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property could not be found.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">An error occurred when opening the associated file. -or-The sum of the length of the arguments and the length of the full path to the process exceeds 2080. The error message associated with this exception can be one of the following: "The data area passed to a system call is too small." or "Access is denied."</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000818 RID: 2072 RVA: 0x00015B8C File Offset: 0x00013D8C
public static Process Start(ProcessStartInfo startInfo)
{
if (startInfo == null)
{
throw new ArgumentNullException("startInfo");
}
Process process = new Process();
process.StartInfo = startInfo;
if (Process.Start_common(startInfo, process))
{
return process;
}
return null;
}
/// <summary>Starts a process resource by specifying the name of a document or application file and associates the resource with a new <see cref="T:System.Diagnostics.Process" /> component.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component that is associated with the process resource, or null, if no process resource is started (for example, if an existing process is reused).</returns>
/// <param name="fileName">The name of a document or application file to run in the process. </param>
/// <exception cref="T:System.ComponentModel.Win32Exception">An error occurred when opening the associated file. </exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The PATH environment variable has a string containing quotes.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000819 RID: 2073 RVA: 0x00015BC8 File Offset: 0x00013DC8
public static Process Start(string fileName)
{
return Process.Start(new ProcessStartInfo(fileName));
}
/// <summary>Starts a process resource by specifying the name of an application and a set of command-line arguments, and associates the resource with a new <see cref="T:System.Diagnostics.Process" /> component.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component that is associated with the process, or null, if no process resource is started (for example, if an existing process is reused).</returns>
/// <param name="fileName">The name of an application file to run in the process. </param>
/// <param name="arguments">Command-line arguments to pass when starting the process. </param>
/// <exception cref="T:System.InvalidOperationException">The <paramref name="fileName" /> or <paramref name="arguments" /> parameter is null. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">An error occurred when opening the associated file. -or-The sum of the length of the arguments and the length of the full path to the process exceeds 2080. The error message associated with this exception can be one of the following: "The data area passed to a system call is too small." or "Access is denied."</exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <exception cref="T:System.IO.FileNotFoundException">The PATH environment variable has a string containing quotes.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600081A RID: 2074 RVA: 0x00015BD8 File Offset: 0x00013DD8
public static Process Start(string fileName, string arguments)
{
return Process.Start(new ProcessStartInfo(fileName, arguments));
}
/// <summary>Starts a process resource by specifying the name of an application, a user name, a password, and a domain and associates the resource with a new <see cref="T:System.Diagnostics.Process" /> component.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component that is associated with the process resource, or null if no process resource is started (for example, if an existing process is reused).</returns>
/// <param name="fileName">The name of an application file to run in the process.</param>
/// <param name="userName">The user name to use when starting the process.</param>
/// <param name="password">A <see cref="T:System.Security.SecureString" /> that contains the password to use when starting the process.</param>
/// <param name="domain">The domain to use when starting the process.</param>
/// <exception cref="T:System.InvalidOperationException">No file name was specified. </exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">
/// <paramref name="fileName" /> is not an executable (.exe) file.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">There was an error in opening the associated file. </exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600081B RID: 2075 RVA: 0x00015BE8 File Offset: 0x00013DE8
public static Process Start(string fileName, string username, SecureString password, string domain)
{
return Process.Start(fileName, null, username, password, domain);
}
/// <summary>Starts a process resource by specifying the name of an application, a set of command-line arguments, a user name, a password, and a domain and associates the resource with a new <see cref="T:System.Diagnostics.Process" /> component.</summary>
/// <returns>A new <see cref="T:System.Diagnostics.Process" /> component that is associated with the process resource, or null if no process resource is started (for example, if an existing process is reused).</returns>
/// <param name="fileName">The name of an application file to run in the process. </param>
/// <param name="arguments">Command-line arguments to pass when starting the process. </param>
/// <param name="userName">The user name to use when starting the process.</param>
/// <param name="password">A <see cref="T:System.Security.SecureString" /> that contains the password to use when starting the process.</param>
/// <param name="domain">The domain to use when starting the process.</param>
/// <exception cref="T:System.InvalidOperationException">No file name was specified.</exception>
/// <exception cref="T:System.ComponentModel.Win32Exception">An error occurred when opening the associated file. -or-The sum of the length of the arguments and the length of the full path to the associated file exceeds 2080. The error message associated with this exception can be one of the following: "The data area passed to a system call is too small." or "Access is denied."</exception>
/// <exception cref="T:System.ObjectDisposedException">The process object has already been disposed. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600081C RID: 2076 RVA: 0x00015BF4 File Offset: 0x00013DF4
public static Process Start(string fileName, string arguments, string username, SecureString password, string domain)
{
return Process.Start(new ProcessStartInfo(fileName, arguments)
{
UserName = username,
Password = password,
Domain = domain,
UseShellExecute = false
});
}
/// <summary>Formats the process's name as a string, combined with the parent component type, if applicable.</summary>
/// <returns>The <see cref="P:System.Diagnostics.Process.ProcessName" />, combined with the base component's <see cref="M:System.Object.ToString" /> return value.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">
/// <see cref="M:System.Diagnostics.Process.ToString" /> is not supported on Windows 98.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x0600081D RID: 2077 RVA: 0x00015C2C File Offset: 0x00013E2C
public override string ToString()
{
return base.ToString() + " (" + this.ProcessName + ")";
}
// Token: 0x0600081E RID: 2078
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool WaitForExit_internal(IntPtr handle, int ms);
/// <summary>Instructs the <see cref="T:System.Diagnostics.Process" /> component to wait indefinitely for the associated process to exit.</summary>
/// <exception cref="T:System.ComponentModel.Win32Exception">The wait setting could not be accessed. </exception>
/// <exception cref="T:System.SystemException">No process <see cref="P:System.Diagnostics.Process.Id" /> has been set, and a <see cref="P:System.Diagnostics.Process.Handle" /> from which the <see cref="P:System.Diagnostics.Process.Id" /> property can be determined does not exist.-or- There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.-or- You are attempting to call <see cref="M:System.Diagnostics.Process.WaitForExit" /> for a process that is running on a remote computer. This method is available only for processes that are running on the local computer. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600081F RID: 2079 RVA: 0x00015C54 File Offset: 0x00013E54
public void WaitForExit()
{
this.WaitForExit(-1);
}
/// <summary>Instructs the <see cref="T:System.Diagnostics.Process" /> component to wait the specified number of milliseconds for the associated process to exit.</summary>
/// <returns>true if the associated process has exited; otherwise, false.</returns>
/// <param name="milliseconds">The amount of time, in milliseconds, to wait for the associated process to exit. The maximum is the largest possible value of a 32-bit integer, which represents infinity to the operating system. </param>
/// <exception cref="T:System.ComponentModel.Win32Exception">The wait setting could not be accessed. </exception>
/// <exception cref="T:System.SystemException">No process <see cref="P:System.Diagnostics.Process.Id" /> has been set, and a <see cref="P:System.Diagnostics.Process.Handle" /> from which the <see cref="P:System.Diagnostics.Process.Id" /> property can be determined does not exist.-or- There is no process associated with this <see cref="T:System.Diagnostics.Process" /> object.-or- You are attempting to call <see cref="M:System.Diagnostics.Process.WaitForExit(System.Int32)" /> for a process that is running on a remote computer. This method is available only for processes that are running on the local computer. </exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000820 RID: 2080 RVA: 0x00015C60 File Offset: 0x00013E60
public bool WaitForExit(int milliseconds)
{
int num = milliseconds;
if (num == 2147483647)
{
num = -1;
}
DateTime dateTime = DateTime.UtcNow;
if (this.async_output != null && !this.async_output.IsCompleted)
{
if (!this.async_output.WaitHandle.WaitOne(num, false))
{
return false;
}
if (num >= 0)
{
DateTime utcNow = DateTime.UtcNow;
num -= (int)(utcNow - dateTime).TotalMilliseconds;
if (num <= 0)
{
return false;
}
dateTime = utcNow;
}
}
if (this.async_error != null && !this.async_error.IsCompleted)
{
if (!this.async_error.WaitHandle.WaitOne(num, false))
{
return false;
}
if (num >= 0)
{
num -= (int)(DateTime.UtcNow - dateTime).TotalMilliseconds;
if (num <= 0)
{
return false;
}
}
}
return this.WaitForExit_internal(this.process_handle, num);
}
// Token: 0x06000821 RID: 2081
[MethodImpl(MethodImplOptions.InternalCall)]
private extern bool WaitForInputIdle_internal(IntPtr handle, int ms);
/// <summary>Causes the <see cref="T:System.Diagnostics.Process" /> component to wait indefinitely for the associated process to enter an idle state. This overload applies only to processes with a user interface and, therefore, a message loop.</summary>
/// <returns>true if the associated process has reached an idle state.</returns>
/// <exception cref="T:System.InvalidOperationException">The process does not have a graphical interface.-or-An unknown error occurred. The process failed to enter an idle state.-or-The process has already exited. -or-No process is associated with this <see cref="T:System.Diagnostics.Process" /> object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000822 RID: 2082 RVA: 0x00015D4C File Offset: 0x00013F4C
[global::System.MonoTODO]
public bool WaitForInputIdle()
{
return this.WaitForInputIdle(-1);
}
/// <summary>Causes the <see cref="T:System.Diagnostics.Process" /> component to wait the specified number of milliseconds for the associated process to enter an idle state. This overload applies only to processes with a user interface and, therefore, a message loop.</summary>
/// <returns>true if the associated process has reached an idle state; otherwise, false.</returns>
/// <param name="milliseconds">A value of 1 to <see cref="F:System.Int32.MaxValue" /> that specifies the amount of time, in milliseconds, to wait for the associated process to become idle. A value of 0 specifies an immediate return, and a value of -1 specifies an infinite wait. </param>
/// <exception cref="T:System.InvalidOperationException">The process does not have a graphical interface.-or-An unknown error occurred. The process failed to enter an idle state.-or-The process has already exited. -or-No process is associated with this <see cref="T:System.Diagnostics.Process" /> object.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x06000823 RID: 2083 RVA: 0x00015D58 File Offset: 0x00013F58
[global::System.MonoTODO]
public bool WaitForInputIdle(int milliseconds)
{
return this.WaitForInputIdle_internal(this.process_handle, milliseconds);
}
// Token: 0x06000824 RID: 2084 RVA: 0x00015D68 File Offset: 0x00013F68
private static bool IsLocalMachine(string machineName)
{
return machineName == "." || machineName.Length == 0 || string.Compare(machineName, Environment.MachineName, true) == 0;
}
// Token: 0x06000825 RID: 2085 RVA: 0x00015DA4 File Offset: 0x00013FA4
private void OnOutputDataReceived(string str)
{
if (this.OutputDataReceived != null)
{
this.OutputDataReceived(this, new DataReceivedEventArgs(str));
}
}
// Token: 0x06000826 RID: 2086 RVA: 0x00015DC4 File Offset: 0x00013FC4
private void OnErrorDataReceived(string str)
{
if (this.ErrorDataReceived != null)
{
this.ErrorDataReceived(this, new DataReceivedEventArgs(str));
}
}
/// <summary>Begins asynchronous read operations on the redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream of the application.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardOutput" /> property is false.- or - An asynchronous read operation is already in progress on the <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream.- or - The <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream has been used by a synchronous read operation. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06000827 RID: 2087 RVA: 0x00015DE4 File Offset: 0x00013FE4
[ComVisible(false)]
public void BeginOutputReadLine()
{
if (this.process_handle == IntPtr.Zero || this.output_stream == null || !this.StartInfo.RedirectStandardOutput)
{
throw new InvalidOperationException("Standard output has not been redirected or process has not been started.");
}
if ((this.async_mode & Process.AsyncModes.SyncOutput) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("Cannot mix asynchronous and synchonous reads.");
}
this.async_mode |= Process.AsyncModes.AsyncOutput;
this.output_canceled = false;
if (this.async_output == null)
{
this.async_output = new Process.ProcessAsyncReader(this, this.stdout_rd, true);
this.async_output.ReadHandler.BeginInvoke(null, this.async_output);
}
}
/// <summary>Cancels the asynchronous read operation on the redirected <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream of an application.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream is not enabled for asynchronous read operations. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06000828 RID: 2088 RVA: 0x00015E90 File Offset: 0x00014090
[ComVisible(false)]
public void CancelOutputRead()
{
if (this.process_handle == IntPtr.Zero || this.output_stream == null || !this.StartInfo.RedirectStandardOutput)
{
throw new InvalidOperationException("Standard output has not been redirected or process has not been started.");
}
if ((this.async_mode & Process.AsyncModes.SyncOutput) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("OutputStream is not enabled for asynchronous read operations.");
}
if (this.async_output == null)
{
throw new InvalidOperationException("No async operation in progress.");
}
this.output_canceled = true;
}
/// <summary>Begins asynchronous read operations on the redirected <see cref="P:System.Diagnostics.Process.StandardError" /> stream of the application.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.ProcessStartInfo.RedirectStandardError" /> property is false.- or - An asynchronous read operation is already in progress on the <see cref="P:System.Diagnostics.Process.StandardError" /> stream.- or - The <see cref="P:System.Diagnostics.Process.StandardError" /> stream has been used by a synchronous read operation. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06000829 RID: 2089 RVA: 0x00015F10 File Offset: 0x00014110
[ComVisible(false)]
public void BeginErrorReadLine()
{
if (this.process_handle == IntPtr.Zero || this.error_stream == null || !this.StartInfo.RedirectStandardError)
{
throw new InvalidOperationException("Standard error has not been redirected or process has not been started.");
}
if ((this.async_mode & Process.AsyncModes.SyncError) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("Cannot mix asynchronous and synchonous reads.");
}
this.async_mode |= Process.AsyncModes.AsyncError;
this.error_canceled = false;
if (this.async_error == null)
{
this.async_error = new Process.ProcessAsyncReader(this, this.stderr_rd, false);
this.async_error.ReadHandler.BeginInvoke(null, this.async_error);
}
}
/// <summary>Cancels the asynchronous read operation on the redirected <see cref="P:System.Diagnostics.Process.StandardError" /> stream of an application.</summary>
/// <exception cref="T:System.InvalidOperationException">The <see cref="P:System.Diagnostics.Process.StandardError" /> stream is not enabled for asynchronous read operations. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x0600082A RID: 2090 RVA: 0x00015FBC File Offset: 0x000141BC
[ComVisible(false)]
public void CancelErrorRead()
{
if (this.process_handle == IntPtr.Zero || this.output_stream == null || !this.StartInfo.RedirectStandardOutput)
{
throw new InvalidOperationException("Standard output has not been redirected or process has not been started.");
}
if ((this.async_mode & Process.AsyncModes.SyncOutput) != Process.AsyncModes.NoneYet)
{
throw new InvalidOperationException("OutputStream is not enabled for asynchronous read operations.");
}
if (this.async_error == null)
{
throw new InvalidOperationException("No async operation in progress.");
}
this.error_canceled = true;
}
// Token: 0x0600082B RID: 2091
[MethodImpl(MethodImplOptions.InternalCall)]
private extern void Process_free_internal(IntPtr handle);
/// <summary>Release all resources used by this process.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x0600082C RID: 2092 RVA: 0x0001603C File Offset: 0x0001423C
protected override void Dispose(bool disposing)
{
if (!this.disposed)
{
this.disposed = true;
if (disposing)
{
lock (this)
{
if (this.async_output != null)
{
this.async_output.Close();
}
if (this.async_error != null)
{
this.async_error.Close();
}
}
}
lock (this)
{
if (this.process_handle != IntPtr.Zero)
{
this.Process_free_internal(this.process_handle);
this.process_handle = IntPtr.Zero;
}
if (this.input_stream != null)
{
this.input_stream.Close();
this.input_stream = null;
}
if (this.output_stream != null)
{
this.output_stream.Close();
this.output_stream = null;
}
if (this.error_stream != null)
{
this.error_stream.Close();
this.error_stream = null;
}
}
}
base.Dispose(disposing);
}
// Token: 0x0600082D RID: 2093 RVA: 0x00016174 File Offset: 0x00014374
~Process()
{
this.Dispose(false);
}
// Token: 0x0600082E RID: 2094 RVA: 0x000161B0 File Offset: 0x000143B0
private static void CBOnExit(object state, bool unused)
{
Process process = (Process)state;
process.OnExited();
}
/// <summary>Raises the <see cref="E:System.Diagnostics.Process.Exited" /> event.</summary>
// Token: 0x0600082F RID: 2095 RVA: 0x000161CC File Offset: 0x000143CC
protected void OnExited()
{
if (this.exited_event == null)
{
return;
}
if (this.synchronizingObject == null)
{
foreach (EventHandler eventHandler in this.exited_event.GetInvocationList())
{
try
{
eventHandler(this, EventArgs.Empty);
}
catch
{
}
}
return;
}
object[] array = new object[]
{
this,
EventArgs.Empty
};
this.synchronizingObject.BeginInvoke(this.exited_event, array);
}
// Token: 0x17000215 RID: 533
// (get) Token: 0x06000830 RID: 2096 RVA: 0x00016274 File Offset: 0x00014474
private static bool IsWindows
{
get
{
PlatformID platform = Environment.OSVersion.Platform;
return platform == PlatformID.Win32S || platform == PlatformID.Win32Windows || platform == PlatformID.Win32NT || platform == PlatformID.WinCE;
}
}
// Token: 0x04000242 RID: 578
private IntPtr process_handle;
// Token: 0x04000243 RID: 579
private int pid;
// Token: 0x04000244 RID: 580
private bool enableRaisingEvents;
// Token: 0x04000245 RID: 581
private bool already_waiting;
// Token: 0x04000246 RID: 582
private global::System.ComponentModel.ISynchronizeInvoke synchronizingObject;
// Token: 0x04000247 RID: 583
private EventHandler exited_event;
// Token: 0x04000248 RID: 584
private IntPtr stdout_rd;
// Token: 0x04000249 RID: 585
private IntPtr stderr_rd;
// Token: 0x0400024A RID: 586
private ProcessModuleCollection module_collection;
// Token: 0x0400024B RID: 587
private string process_name;
// Token: 0x0400024C RID: 588
private StreamReader error_stream;
// Token: 0x0400024D RID: 589
private StreamWriter input_stream;
// Token: 0x0400024E RID: 590
private StreamReader output_stream;
// Token: 0x0400024F RID: 591
private ProcessStartInfo start_info;
// Token: 0x04000250 RID: 592
private Process.AsyncModes async_mode;
// Token: 0x04000251 RID: 593
private bool output_canceled;
// Token: 0x04000252 RID: 594
private bool error_canceled;
// Token: 0x04000253 RID: 595
private Process.ProcessAsyncReader async_output;
// Token: 0x04000254 RID: 596
private Process.ProcessAsyncReader async_error;
// Token: 0x04000255 RID: 597
private bool disposed;
// Token: 0x020000E6 RID: 230
private struct ProcInfo
{
// Token: 0x04000258 RID: 600
public IntPtr process_handle;
// Token: 0x04000259 RID: 601
public IntPtr thread_handle;
// Token: 0x0400025A RID: 602
public int pid;
// Token: 0x0400025B RID: 603
public int tid;
// Token: 0x0400025C RID: 604
public string[] envKeys;
// Token: 0x0400025D RID: 605
public string[] envValues;
// Token: 0x0400025E RID: 606
public string UserName;
// Token: 0x0400025F RID: 607
public string Domain;
// Token: 0x04000260 RID: 608
public IntPtr Password;
// Token: 0x04000261 RID: 609
public bool LoadUserProfile;
}
// Token: 0x020000E7 RID: 231
[Flags]
private enum AsyncModes
{
// Token: 0x04000263 RID: 611
NoneYet = 0,
// Token: 0x04000264 RID: 612
SyncOutput = 1,
// Token: 0x04000265 RID: 613
SyncError = 2,
// Token: 0x04000266 RID: 614
AsyncOutput = 4,
// Token: 0x04000267 RID: 615
AsyncError = 8
}
// Token: 0x020000E8 RID: 232
[StructLayout(LayoutKind.Sequential)]
private sealed class ProcessAsyncReader
{
// Token: 0x06000831 RID: 2097 RVA: 0x000162AC File Offset: 0x000144AC
public ProcessAsyncReader(Process process, IntPtr handle, bool err_out)
{
this.process = process;
this.handle = handle;
this.stream = new FileStream(handle, FileAccess.Read, false);
this.ReadHandler = new Process.AsyncReadHandler(this.AddInput);
this.err_out = err_out;
}
// Token: 0x06000832 RID: 2098 RVA: 0x00016318 File Offset: 0x00014518
public void AddInput()
{
lock (this)
{
int num = this.stream.Read(this.buffer, 0, this.buffer.Length);
if (num == 0)
{
this.completed = true;
if (this.wait_handle != null)
{
this.wait_handle.Set();
}
this.FlushLast();
}
else
{
try
{
this.sb.Append(Encoding.Default.GetString(this.buffer, 0, num));
}
catch
{
for (int i = 0; i < num; i++)
{
this.sb.Append((char)this.buffer[i]);
}
}
this.Flush(false);
this.ReadHandler.BeginInvoke(null, this);
}
}
}
// Token: 0x06000833 RID: 2099 RVA: 0x0001641C File Offset: 0x0001461C
private void FlushLast()
{
this.Flush(true);
if (this.err_out)
{
this.process.OnOutputDataReceived(null);
}
else
{
this.process.OnErrorDataReceived(null);
}
}
// Token: 0x06000834 RID: 2100 RVA: 0x00016450 File Offset: 0x00014650
private void Flush(bool last)
{
if (this.sb.Length == 0 || (this.err_out && this.process.output_canceled) || (!this.err_out && this.process.error_canceled))
{
return;
}
string text = this.sb.ToString();
this.sb.Length = 0;
string[] array = text.Split(new char[] { '\n' });
int num = array.Length;
if (num == 0)
{
return;
}
for (int i = 0; i < num - 1; i++)
{
if (this.err_out)
{
this.process.OnOutputDataReceived(array[i]);
}
else
{
this.process.OnErrorDataReceived(array[i]);
}
}
string text2 = array[num - 1];
if (last || (num == 1 && text2 == string.Empty))
{
if (this.err_out)
{
this.process.OnOutputDataReceived(text2);
}
else
{
this.process.OnErrorDataReceived(text2);
}
}
else
{
this.sb.Append(text2);
}
}
// Token: 0x17000216 RID: 534
// (get) Token: 0x06000835 RID: 2101 RVA: 0x0001657C File Offset: 0x0001477C
public bool IsCompleted
{
get
{
return this.completed;
}
}
// Token: 0x17000217 RID: 535
// (get) Token: 0x06000836 RID: 2102 RVA: 0x00016584 File Offset: 0x00014784
public WaitHandle WaitHandle
{
get
{
WaitHandle waitHandle;
lock (this)
{
if (this.wait_handle == null)
{
this.wait_handle = new ManualResetEvent(this.completed);
}
waitHandle = this.wait_handle;
}
return waitHandle;
}
}
// Token: 0x06000837 RID: 2103 RVA: 0x000165EC File Offset: 0x000147EC
public void Close()
{
this.stream.Close();
}
// Token: 0x04000268 RID: 616
public object Sock;
// Token: 0x04000269 RID: 617
public IntPtr handle;
// Token: 0x0400026A RID: 618
public object state;
// Token: 0x0400026B RID: 619
public AsyncCallback callback;
// Token: 0x0400026C RID: 620
public ManualResetEvent wait_handle;
// Token: 0x0400026D RID: 621
public Exception delayedException;
// Token: 0x0400026E RID: 622
public object EndPoint;
// Token: 0x0400026F RID: 623
private byte[] buffer = new byte[4196];
// Token: 0x04000270 RID: 624
public int Offset;
// Token: 0x04000271 RID: 625
public int Size;
// Token: 0x04000272 RID: 626
public int SockFlags;
// Token: 0x04000273 RID: 627
public object AcceptSocket;
// Token: 0x04000274 RID: 628
public object[] Addresses;
// Token: 0x04000275 RID: 629
public int port;
// Token: 0x04000276 RID: 630
public object Buffers;
// Token: 0x04000277 RID: 631
public bool ReuseSocket;
// Token: 0x04000278 RID: 632
public object acc_socket;
// Token: 0x04000279 RID: 633
public int total;
// Token: 0x0400027A RID: 634
public bool completed_sync;
// Token: 0x0400027B RID: 635
private bool completed;
// Token: 0x0400027C RID: 636
private bool err_out;
// Token: 0x0400027D RID: 637
internal int error;
// Token: 0x0400027E RID: 638
public int operation = 8;
// Token: 0x0400027F RID: 639
public object ares;
// Token: 0x04000280 RID: 640
public int EndCalled;
// Token: 0x04000281 RID: 641
private Process process;
// Token: 0x04000282 RID: 642
private Stream stream;
// Token: 0x04000283 RID: 643
private StringBuilder sb = new StringBuilder();
// Token: 0x04000284 RID: 644
public Process.AsyncReadHandler ReadHandler;
}
// Token: 0x020000E9 RID: 233
private class ProcessWaitHandle : WaitHandle
{
// Token: 0x06000838 RID: 2104 RVA: 0x000165FC File Offset: 0x000147FC
public ProcessWaitHandle(IntPtr handle)
{
this.Handle = Process.ProcessWaitHandle.ProcessHandle_duplicate(handle);
}
// Token: 0x06000839 RID: 2105
[MethodImpl(MethodImplOptions.InternalCall)]
private static extern IntPtr ProcessHandle_duplicate(IntPtr handle);
}
// Token: 0x02000308 RID: 776
// (Invoke) Token: 0x06001BF9 RID: 7161
private delegate void AsyncReadHandler();
}
}
+140
View File
@@ -0,0 +1,140 @@
using System;
using System.ComponentModel;
namespace System.Diagnostics
{
/// <summary>Represents a.dll or .exe file that is loaded into a particular process.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000EA RID: 234
[global::System.ComponentModel.Designer("System.Diagnostics.Design.ProcessModuleDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class ProcessModule : global::System.ComponentModel.Component
{
// Token: 0x0600083A RID: 2106 RVA: 0x00016610 File Offset: 0x00014810
internal ProcessModule(IntPtr baseaddr, IntPtr entryaddr, string filename, FileVersionInfo version_info, int memory_size, string modulename)
{
this.baseaddr = baseaddr;
this.entryaddr = entryaddr;
this.filename = filename;
this.version_info = version_info;
this.memory_size = memory_size;
this.modulename = modulename;
}
/// <summary>Gets the memory address where the module was loaded.</summary>
/// <returns>The load address of the module.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000218 RID: 536
// (get) Token: 0x0600083B RID: 2107 RVA: 0x00016648 File Offset: 0x00014848
[MonitoringDescription("The base memory address of this module")]
public IntPtr BaseAddress
{
get
{
return this.baseaddr;
}
}
/// <summary>Gets the memory address for the function that runs when the system loads and runs the module.</summary>
/// <returns>The entry point of the module.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000219 RID: 537
// (get) Token: 0x0600083C RID: 2108 RVA: 0x00016650 File Offset: 0x00014850
[MonitoringDescription("The base memory address of the entry point of this module")]
public IntPtr EntryPointAddress
{
get
{
return this.entryaddr;
}
}
/// <summary>Gets the full path to the module.</summary>
/// <returns>The fully qualified path that defines the location of the module.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700021A RID: 538
// (get) Token: 0x0600083D RID: 2109 RVA: 0x00016658 File Offset: 0x00014858
[MonitoringDescription("The file name of this module")]
public string FileName
{
get
{
return this.filename;
}
}
/// <summary>Gets version information about the module.</summary>
/// <returns>A <see cref="T:System.Diagnostics.FileVersionInfo" /> that contains the module's version information.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x1700021B RID: 539
// (get) Token: 0x0600083E RID: 2110 RVA: 0x00016660 File Offset: 0x00014860
[global::System.ComponentModel.Browsable(false)]
public FileVersionInfo FileVersionInfo
{
get
{
return this.version_info;
}
}
/// <summary>Gets the amount of memory that is required to load the module.</summary>
/// <returns>The size, in bytes, of the memory that the module occupies.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700021C RID: 540
// (get) Token: 0x0600083F RID: 2111 RVA: 0x00016668 File Offset: 0x00014868
[MonitoringDescription("The memory needed by this module")]
public int ModuleMemorySize
{
get
{
return this.memory_size;
}
}
/// <summary>Gets the name of the process module.</summary>
/// <returns>The name of the module.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700021D RID: 541
// (get) Token: 0x06000840 RID: 2112 RVA: 0x00016670 File Offset: 0x00014870
[MonitoringDescription("The name of this module")]
public string ModuleName
{
get
{
return this.modulename;
}
}
/// <summary>Converts the name of the module to a string.</summary>
/// <returns>The value of the <see cref="P:System.Diagnostics.ProcessModule.ModuleName" /> property.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06000841 RID: 2113 RVA: 0x00016678 File Offset: 0x00014878
public override string ToString()
{
return this.ModuleName;
}
// Token: 0x04000285 RID: 645
private IntPtr baseaddr;
// Token: 0x04000286 RID: 646
private IntPtr entryaddr;
// Token: 0x04000287 RID: 647
private string filename;
// Token: 0x04000288 RID: 648
private FileVersionInfo version_info;
// Token: 0x04000289 RID: 649
private int memory_size;
// Token: 0x0400028A RID: 650
private string modulename;
}
}
@@ -0,0 +1,68 @@
using System;
using System.Collections;
namespace System.Diagnostics
{
/// <summary>Provides a strongly typed collection of <see cref="T:System.Diagnostics.ProcessModule" /> objects.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000EB RID: 235
public class ProcessModuleCollection : ReadOnlyCollectionBase
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessModuleCollection" /> class, with no associated <see cref="T:System.Diagnostics.ProcessModule" /> instances.</summary>
// Token: 0x06000842 RID: 2114 RVA: 0x00016680 File Offset: 0x00014880
protected ProcessModuleCollection()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessModuleCollection" /> class, using the specified array of <see cref="T:System.Diagnostics.ProcessModule" /> instances.</summary>
/// <param name="processModules">An array of <see cref="T:System.Diagnostics.ProcessModule" /> instances with which to initialize this <see cref="T:System.Diagnostics.ProcessModuleCollection" /> instance. </param>
// Token: 0x06000843 RID: 2115 RVA: 0x00016688 File Offset: 0x00014888
public ProcessModuleCollection(ProcessModule[] processModules)
{
base.InnerList.AddRange(processModules);
}
/// <summary>Gets an index for iterating over the set of process modules.</summary>
/// <returns>A <see cref="T:System.Diagnostics.ProcessModule" /> that indexes the modules in the collection </returns>
/// <param name="index">The zero-based index value of the module in the collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x1700021E RID: 542
public ProcessModule this[int index]
{
get
{
return (ProcessModule)base.InnerList[index];
}
}
/// <summary>Determines whether the specified process module exists in the collection.</summary>
/// <returns>true if the module exists in the collection; otherwise, false.</returns>
/// <param name="module">A <see cref="T:System.Diagnostics.ProcessModule" /> instance that indicates the module to find in this collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000845 RID: 2117 RVA: 0x000166B0 File Offset: 0x000148B0
public bool Contains(ProcessModule module)
{
return base.InnerList.Contains(module);
}
/// <summary>Copies an array of <see cref="T:System.Diagnostics.ProcessModule" /> instances to the collection, at the specified index.</summary>
/// <param name="array">An array of <see cref="T:System.Diagnostics.ProcessModule" /> instances to add to the collection. </param>
/// <param name="index">The location at which to add the new instances. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000846 RID: 2118 RVA: 0x000166C0 File Offset: 0x000148C0
public void CopyTo(ProcessModule[] array, int index)
{
base.InnerList.CopyTo(array, index);
}
/// <summary>Provides the location of a specified module within the collection.</summary>
/// <returns>The zero-based index that defines the location of the module within the <see cref="T:System.Diagnostics.ProcessModuleCollection" />.</returns>
/// <param name="module">The <see cref="T:System.Diagnostics.ProcessModule" /> whose index is retrieved. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000847 RID: 2119 RVA: 0x000166D0 File Offset: 0x000148D0
public int IndexOf(ProcessModule module)
{
return base.InnerList.IndexOf(module);
}
}
}
@@ -0,0 +1,29 @@
using System;
namespace System.Diagnostics
{
/// <summary>Indicates the priority that the system associates with a process. This value, together with the priority value of each thread of the process, determines each thread's base priority level.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000EC RID: 236
public enum ProcessPriorityClass
{
/// <summary>Specifies that the process has priority above <see cref="F:System.Diagnostics.ProcessPriorityClass.Normal" /> but below <see cref="F:System.Diagnostics.ProcessPriorityClass.High" />.</summary>
// Token: 0x0400028C RID: 652
AboveNormal = 32768,
/// <summary>Specifies that the process has priority above <see cref="F:System.Diagnostics.ProcessPriorityClass.Idle" /> but below <see cref="F:System.Diagnostics.ProcessPriorityClass.Normal" />.</summary>
// Token: 0x0400028D RID: 653
BelowNormal = 16384,
/// <summary>Specifies that the process performs time-critical tasks that must be executed immediately, such as the Task List dialog, which must respond quickly when called by the user, regardless of the load on the operating system. The threads of the process preempt the threads of normal or idle priority class processes.</summary>
// Token: 0x0400028E RID: 654
High = 128,
/// <summary>Specifies that the threads of this process run only when the system is idle, such as a screen saver. The threads of the process are preempted by the threads of any process running in a higher priority class.</summary>
// Token: 0x0400028F RID: 655
Idle = 64,
/// <summary>Specifies that the process has no special scheduling needs.</summary>
// Token: 0x04000290 RID: 656
Normal = 32,
/// <summary>Specifies that the process has the highest possible priority.</summary>
// Token: 0x04000291 RID: 657
RealTime = 256
}
}
+527
View File
@@ -0,0 +1,527 @@
using System;
using System.Collections;
using System.Collections.Specialized;
using System.ComponentModel;
using System.IO;
using System.Security;
using System.Text;
namespace System.Diagnostics
{
/// <summary>Specifies a set of values that are used when you start a process.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000ED RID: 237
[global::System.ComponentModel.TypeConverter(typeof(global::System.ComponentModel.ExpandableObjectConverter))]
public sealed class ProcessStartInfo
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessStartInfo" /> class without specifying a file name with which to start the process.</summary>
// Token: 0x06000848 RID: 2120 RVA: 0x000166E0 File Offset: 0x000148E0
public ProcessStartInfo()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessStartInfo" /> class and specifies a file name such as an application or document with which to start the process.</summary>
/// <param name="fileName">An application or document with which to start a process. </param>
// Token: 0x06000849 RID: 2121 RVA: 0x00016734 File Offset: 0x00014934
public ProcessStartInfo(string filename)
{
this.filename = filename;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessStartInfo" /> class, specifies an application file name with which to start the process, and specifies a set of command-line arguments to pass to the application.</summary>
/// <param name="fileName">An application with which to start a process. </param>
/// <param name="arguments">Command-line arguments to pass to the application when the process starts. </param>
// Token: 0x0600084A RID: 2122 RVA: 0x00016790 File Offset: 0x00014990
public ProcessStartInfo(string filename, string arguments)
{
this.filename = filename;
this.arguments = arguments;
}
/// <summary>Gets or sets the set of command-line arguments to use when starting the application.</summary>
/// <returns>File typespecific arguments that the system can associate with the application specified in the <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property. The length of the arguments added to the length of the full path to the process must be less than 2080.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x1700021F RID: 543
// (get) Token: 0x0600084C RID: 2124 RVA: 0x00016800 File Offset: 0x00014A00
// (set) Token: 0x0600084D RID: 2125 RVA: 0x00016808 File Offset: 0x00014A08
[global::System.ComponentModel.DefaultValue("")]
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("Command line agruments for this process.")]
[global::System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.RecommendedAsConfigurable(true)]
public string Arguments
{
get
{
return this.arguments;
}
set
{
this.arguments = value;
}
}
/// <summary>Gets or sets a value indicating whether to start the process in a new window.</summary>
/// <returns>true to start the process without creating a new window to contain it; otherwise, false. The default is false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000220 RID: 544
// (get) Token: 0x0600084E RID: 2126 RVA: 0x00016814 File Offset: 0x00014A14
// (set) Token: 0x0600084F RID: 2127 RVA: 0x0001681C File Offset: 0x00014A1C
[global::System.ComponentModel.DefaultValue(false)]
[MonitoringDescription("Start this process with a new window.")]
[global::System.ComponentModel.NotifyParentProperty(true)]
public bool CreateNoWindow
{
get
{
return this.create_no_window;
}
set
{
this.create_no_window = value;
}
}
/// <summary>Gets search paths for files, directories for temporary files, application-specific options, and other similar information.</summary>
/// <returns>A <see cref="T:System.Collections.Specialized.StringDictionary" /> that provides environment variables that apply to this process and child processes. The default is null.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000221 RID: 545
// (get) Token: 0x06000850 RID: 2128 RVA: 0x00016828 File Offset: 0x00014A28
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
[global::System.ComponentModel.DefaultValue(null)]
[global::System.ComponentModel.Editor("System.Diagnostics.Design.StringDictionaryEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[MonitoringDescription("Environment variables used for this process.")]
[global::System.ComponentModel.NotifyParentProperty(true)]
public global::System.Collections.Specialized.StringDictionary EnvironmentVariables
{
get
{
if (this.envVars == null)
{
this.envVars = new global::System.Collections.Specialized.ProcessStringDictionary();
foreach (object obj in Environment.GetEnvironmentVariables())
{
DictionaryEntry dictionaryEntry = (DictionaryEntry)obj;
this.envVars.Add((string)dictionaryEntry.Key, (string)dictionaryEntry.Value);
}
}
return this.envVars;
}
}
// Token: 0x17000222 RID: 546
// (get) Token: 0x06000851 RID: 2129 RVA: 0x000168D0 File Offset: 0x00014AD0
internal bool HaveEnvVars
{
get
{
return this.envVars != null;
}
}
/// <summary>Gets or sets a value indicating whether an error dialog box is displayed to the user if the process cannot be started.</summary>
/// <returns>true to display an error dialog box on the screen if the process cannot be started; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000223 RID: 547
// (get) Token: 0x06000852 RID: 2130 RVA: 0x000168E0 File Offset: 0x00014AE0
// (set) Token: 0x06000853 RID: 2131 RVA: 0x000168E8 File Offset: 0x00014AE8
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("Thread shows dialogboxes for errors.")]
[global::System.ComponentModel.DefaultValue(false)]
public bool ErrorDialog
{
get
{
return this.error_dialog;
}
set
{
this.error_dialog = value;
}
}
/// <summary>Gets or sets the window handle to use when an error dialog box is shown for a process that cannot be started.</summary>
/// <returns>An <see cref="T:System.IntPtr" /> that identifies the handle of the error dialog box that results from a process start failure.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000224 RID: 548
// (get) Token: 0x06000854 RID: 2132 RVA: 0x000168F4 File Offset: 0x00014AF4
// (set) Token: 0x06000855 RID: 2133 RVA: 0x000168FC File Offset: 0x00014AFC
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public IntPtr ErrorDialogParentHandle
{
get
{
return this.error_dialog_parent_handle;
}
set
{
this.error_dialog_parent_handle = value;
}
}
/// <summary>Gets or sets the application or document to start.</summary>
/// <returns>The name of the application to start, or the name of a document of a file type that is associated with an application and that has a default open action available to it. The default is an empty string ("").</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000225 RID: 549
// (get) Token: 0x06000856 RID: 2134 RVA: 0x00016908 File Offset: 0x00014B08
// (set) Token: 0x06000857 RID: 2135 RVA: 0x00016910 File Offset: 0x00014B10
[global::System.ComponentModel.RecommendedAsConfigurable(true)]
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("The name of the resource to start this process.")]
[global::System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.Editor("System.Diagnostics.Design.StartFileNameEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.DefaultValue("")]
public string FileName
{
get
{
return this.filename;
}
set
{
this.filename = value;
}
}
/// <summary>Gets or sets a value that indicates whether the error output of an application is written to the <see cref="P:System.Diagnostics.Process.StandardError" /> stream.</summary>
/// <returns>true to write error output to <see cref="P:System.Diagnostics.Process.StandardError" />; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000226 RID: 550
// (get) Token: 0x06000858 RID: 2136 RVA: 0x0001691C File Offset: 0x00014B1C
// (set) Token: 0x06000859 RID: 2137 RVA: 0x00016924 File Offset: 0x00014B24
[global::System.ComponentModel.NotifyParentProperty(true)]
[global::System.ComponentModel.DefaultValue(false)]
[MonitoringDescription("Errors of this process are redirected.")]
public bool RedirectStandardError
{
get
{
return this.redirect_standard_error;
}
set
{
this.redirect_standard_error = value;
}
}
/// <summary>Gets or sets a value indicating whether the input for an application is read from the <see cref="P:System.Diagnostics.Process.StandardInput" /> stream.</summary>
/// <returns>true to read input from <see cref="P:System.Diagnostics.Process.StandardInput" />; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000227 RID: 551
// (get) Token: 0x0600085A RID: 2138 RVA: 0x00016930 File Offset: 0x00014B30
// (set) Token: 0x0600085B RID: 2139 RVA: 0x00016938 File Offset: 0x00014B38
[MonitoringDescription("Standard input of this process is redirected.")]
[global::System.ComponentModel.DefaultValue(false)]
[global::System.ComponentModel.NotifyParentProperty(true)]
public bool RedirectStandardInput
{
get
{
return this.redirect_standard_input;
}
set
{
this.redirect_standard_input = value;
}
}
/// <summary>Gets or sets a value that indicates whether the output of an application is written to the <see cref="P:System.Diagnostics.Process.StandardOutput" /> stream.</summary>
/// <returns>true to write output to <see cref="P:System.Diagnostics.Process.StandardOutput" />; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000228 RID: 552
// (get) Token: 0x0600085C RID: 2140 RVA: 0x00016944 File Offset: 0x00014B44
// (set) Token: 0x0600085D RID: 2141 RVA: 0x0001694C File Offset: 0x00014B4C
[global::System.ComponentModel.DefaultValue(false)]
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("Standart output of this process is redirected.")]
public bool RedirectStandardOutput
{
get
{
return this.redirect_standard_output;
}
set
{
this.redirect_standard_output = value;
}
}
/// <summary>Gets or sets the preferred encoding for error output.</summary>
/// <returns>An <see cref="T:System.Text.Encoding" /> object that represents the preferred encoding for error output. The default is null.</returns>
// Token: 0x17000229 RID: 553
// (get) Token: 0x0600085E RID: 2142 RVA: 0x00016958 File Offset: 0x00014B58
// (set) Token: 0x0600085F RID: 2143 RVA: 0x00016960 File Offset: 0x00014B60
public Encoding StandardErrorEncoding
{
get
{
return this.encoding_stderr;
}
set
{
this.encoding_stderr = value;
}
}
/// <summary>Gets or sets the preferred encoding for standard output.</summary>
/// <returns>An <see cref="T:System.Text.Encoding" /> object that represents the preferred encoding for standard output. The default is null.</returns>
// Token: 0x1700022A RID: 554
// (get) Token: 0x06000860 RID: 2144 RVA: 0x0001696C File Offset: 0x00014B6C
// (set) Token: 0x06000861 RID: 2145 RVA: 0x00016974 File Offset: 0x00014B74
public Encoding StandardOutputEncoding
{
get
{
return this.encoding_stdout;
}
set
{
this.encoding_stdout = value;
}
}
/// <summary>Gets or sets a value indicating whether to use the operating system shell to start the process.</summary>
/// <returns>true to use the shell when starting the process; otherwise, the process is created directly from the executable file. The default is true.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700022B RID: 555
// (get) Token: 0x06000862 RID: 2146 RVA: 0x00016980 File Offset: 0x00014B80
// (set) Token: 0x06000863 RID: 2147 RVA: 0x00016988 File Offset: 0x00014B88
[MonitoringDescription("Use the shell to start this process.")]
[global::System.ComponentModel.NotifyParentProperty(true)]
[global::System.ComponentModel.DefaultValue(true)]
public bool UseShellExecute
{
get
{
return this.use_shell_execute;
}
set
{
this.use_shell_execute = value;
}
}
/// <summary>Gets or sets the verb to use when opening the application or document specified by the <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property.</summary>
/// <returns>The action to take with the file that the process opens. The default is an empty string ("").</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700022C RID: 556
// (get) Token: 0x06000864 RID: 2148 RVA: 0x00016994 File Offset: 0x00014B94
// (set) Token: 0x06000865 RID: 2149 RVA: 0x0001699C File Offset: 0x00014B9C
[global::System.ComponentModel.TypeConverter("System.Diagnostics.Design.VerbConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.DefaultValue("")]
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("The verb to apply to a used document.")]
public string Verb
{
get
{
return this.verb;
}
set
{
this.verb = value;
}
}
/// <summary>Gets the set of verbs associated with the type of file specified by the <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property.</summary>
/// <returns>The actions that the system can apply to the file indicated by the <see cref="P:System.Diagnostics.ProcessStartInfo.FileName" /> property.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700022D RID: 557
// (get) Token: 0x06000866 RID: 2150 RVA: 0x000169A8 File Offset: 0x00014BA8
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
[global::System.ComponentModel.Browsable(false)]
public string[] Verbs
{
get
{
if (((!((this.filename == null) | (this.filename.Length == 0))) ? Path.GetExtension(this.filename) : null) == null)
{
return ProcessStartInfo.empty;
}
return ProcessStartInfo.empty;
}
}
/// <summary>Gets or sets the window state to use when the process is started.</summary>
/// <returns>A <see cref="T:System.Diagnostics.ProcessWindowStyle" /> that indicates whether the process is started in a window that is maximized, minimized, normal (neither maximized nor minimized), or not visible. The default is normal.</returns>
/// <exception cref="T:System.ComponentModel.InvalidEnumArgumentException">The window style is not one of the <see cref="T:System.Diagnostics.ProcessWindowStyle" /> enumeration members. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x1700022E RID: 558
// (get) Token: 0x06000867 RID: 2151 RVA: 0x000169F8 File Offset: 0x00014BF8
// (set) Token: 0x06000868 RID: 2152 RVA: 0x00016A00 File Offset: 0x00014C00
[global::System.ComponentModel.DefaultValue(typeof(ProcessWindowStyle), "Normal")]
[global::System.ComponentModel.NotifyParentProperty(true)]
[MonitoringDescription("The window style used to start this process.")]
public ProcessWindowStyle WindowStyle
{
get
{
return this.window_style;
}
set
{
this.window_style = value;
}
}
/// <summary>Gets or sets the initial directory for the process to be started.</summary>
/// <returns>The fully qualified name of the directory that contains the process to be started. The default is an empty string ("").</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x1700022F RID: 559
// (get) Token: 0x06000869 RID: 2153 RVA: 0x00016A0C File Offset: 0x00014C0C
// (set) Token: 0x0600086A RID: 2154 RVA: 0x00016A14 File Offset: 0x00014C14
[global::System.ComponentModel.TypeConverter("System.Diagnostics.Design.StringValueConverter, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.DefaultValue("")]
[MonitoringDescription("The initial directory for this process.")]
[global::System.ComponentModel.RecommendedAsConfigurable(true)]
[global::System.ComponentModel.Editor("System.Diagnostics.Design.WorkingDirectoryEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[global::System.ComponentModel.NotifyParentProperty(true)]
public string WorkingDirectory
{
get
{
return this.working_directory;
}
set
{
this.working_directory = ((value != null) ? value : string.Empty);
}
}
/// <summary>Gets or sets a value that indicates whether the Windows user profile is to be loaded from the registry. </summary>
/// <returns>true to load the Windows user profile; otherwise, false. </returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000230 RID: 560
// (get) Token: 0x0600086B RID: 2155 RVA: 0x00016A30 File Offset: 0x00014C30
// (set) Token: 0x0600086C RID: 2156 RVA: 0x00016A38 File Offset: 0x00014C38
[global::System.ComponentModel.NotifyParentProperty(true)]
public bool LoadUserProfile
{
get
{
return this.load_user_profile;
}
set
{
this.load_user_profile = value;
}
}
/// <summary>Gets or sets the user name to be used when starting the process.</summary>
/// <returns>The user name to use when starting the process.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000231 RID: 561
// (get) Token: 0x0600086D RID: 2157 RVA: 0x00016A44 File Offset: 0x00014C44
// (set) Token: 0x0600086E RID: 2158 RVA: 0x00016A4C File Offset: 0x00014C4C
[global::System.ComponentModel.NotifyParentProperty(true)]
public string UserName
{
get
{
return this.username;
}
set
{
this.username = value;
}
}
/// <summary>Gets or sets a value that identifies the domain to use when starting the process. </summary>
/// <returns>The Active Directory domain to use when starting the process. The domain property is primarily of interest to users within enterprise environments that use Active Directory.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000232 RID: 562
// (get) Token: 0x0600086F RID: 2159 RVA: 0x00016A58 File Offset: 0x00014C58
// (set) Token: 0x06000870 RID: 2160 RVA: 0x00016A60 File Offset: 0x00014C60
[global::System.ComponentModel.NotifyParentProperty(true)]
public string Domain
{
get
{
return this.domain;
}
set
{
this.domain = value;
}
}
/// <summary>Gets or sets a secure string that contains the user password to use when starting the process.</summary>
/// <returns>A <see cref="T:System.Security.SecureString" /> that contains the user password to use when starting the process.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000233 RID: 563
// (get) Token: 0x06000871 RID: 2161 RVA: 0x00016A6C File Offset: 0x00014C6C
// (set) Token: 0x06000872 RID: 2162 RVA: 0x00016A74 File Offset: 0x00014C74
public SecureString Password
{
get
{
return this.password;
}
set
{
this.password = value;
}
}
// Token: 0x04000292 RID: 658
private string arguments = string.Empty;
// Token: 0x04000293 RID: 659
private IntPtr error_dialog_parent_handle = (IntPtr)0;
// Token: 0x04000294 RID: 660
private string filename = string.Empty;
// Token: 0x04000295 RID: 661
private string verb = string.Empty;
// Token: 0x04000296 RID: 662
private string working_directory = string.Empty;
// Token: 0x04000297 RID: 663
private global::System.Collections.Specialized.ProcessStringDictionary envVars;
// Token: 0x04000298 RID: 664
private bool create_no_window;
// Token: 0x04000299 RID: 665
private bool error_dialog;
// Token: 0x0400029A RID: 666
private bool redirect_standard_error;
// Token: 0x0400029B RID: 667
private bool redirect_standard_input;
// Token: 0x0400029C RID: 668
private bool redirect_standard_output;
// Token: 0x0400029D RID: 669
private bool use_shell_execute = true;
// Token: 0x0400029E RID: 670
private ProcessWindowStyle window_style;
// Token: 0x0400029F RID: 671
private Encoding encoding_stderr;
// Token: 0x040002A0 RID: 672
private Encoding encoding_stdout;
// Token: 0x040002A1 RID: 673
private string username;
// Token: 0x040002A2 RID: 674
private string domain;
// Token: 0x040002A3 RID: 675
private SecureString password;
// Token: 0x040002A4 RID: 676
private bool load_user_profile;
// Token: 0x040002A5 RID: 677
private static readonly string[] empty = new string[0];
}
}
+315
View File
@@ -0,0 +1,315 @@
using System;
using System.ComponentModel;
namespace System.Diagnostics
{
/// <summary>Represents an operating system process thread.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000EE RID: 238
[global::System.ComponentModel.Designer("System.Diagnostics.Design.ProcessThreadDesigner, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class ProcessThread : global::System.ComponentModel.Component
{
// Token: 0x06000873 RID: 2163 RVA: 0x00016A80 File Offset: 0x00014C80
[global::System.MonoTODO("Parse parameters")]
internal ProcessThread()
{
}
/// <summary>Gets the base priority of the thread.</summary>
/// <returns>The base priority of the thread, which the operating system computes by combining the process priority class with the priority level of the associated thread.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000234 RID: 564
// (get) Token: 0x06000874 RID: 2164 RVA: 0x00016A88 File Offset: 0x00014C88
[global::System.MonoTODO]
[MonitoringDescription("The base priority of this thread.")]
public int BasePriority
{
get
{
return 0;
}
}
/// <summary>Gets the current priority of the thread.</summary>
/// <returns>The current priority of the thread, which may deviate from the base priority based on how the operating system is scheduling the thread. The priority may be temporarily boosted for an active thread.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000235 RID: 565
// (get) Token: 0x06000875 RID: 2165 RVA: 0x00016A8C File Offset: 0x00014C8C
[MonitoringDescription("The current priority of this thread.")]
[global::System.MonoTODO]
public int CurrentPriority
{
get
{
return 0;
}
}
/// <summary>Gets the unique identifier of the thread.</summary>
/// <returns>The unique identifier associated with a specific thread.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000236 RID: 566
// (get) Token: 0x06000876 RID: 2166 RVA: 0x00016A90 File Offset: 0x00014C90
[MonitoringDescription("The ID of this thread.")]
[global::System.MonoTODO]
public int Id
{
get
{
return 0;
}
}
/// <summary>Sets the preferred processor for this thread to run on.</summary>
/// <returns>The preferred processor for the thread, used when the system schedules threads, to determine which processor to run the thread on.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The system could not set the thread to start on the specified processor. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000237 RID: 567
// (set) Token: 0x06000877 RID: 2167 RVA: 0x00016A94 File Offset: 0x00014C94
[global::System.ComponentModel.Browsable(false)]
[global::System.MonoTODO]
public int IdealProcessor
{
set
{
}
}
/// <summary>Gets or sets a value indicating whether the operating system should temporarily boost the priority of the associated thread whenever the main window of the thread's process receives the focus.</summary>
/// <returns>true to boost the thread's priority when the user interacts with the process's interface; otherwise, false. The default is false.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The priority boost information could not be retrieved.-or-The priority boost information could not be set. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000238 RID: 568
// (get) Token: 0x06000878 RID: 2168 RVA: 0x00016A98 File Offset: 0x00014C98
// (set) Token: 0x06000879 RID: 2169 RVA: 0x00016A9C File Offset: 0x00014C9C
[MonitoringDescription("Thread gets a priority boot when interactively used by a user.")]
[global::System.MonoTODO]
public bool PriorityBoostEnabled
{
get
{
return false;
}
set
{
}
}
/// <summary>Gets or sets the priority level of the thread.</summary>
/// <returns>One of the <see cref="T:System.Diagnostics.ThreadPriorityLevel" /> values, specifying a range that bounds the thread's priority.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The thread priority level information could not be retrieved. -or-The thread priority level could not be set.</exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000239 RID: 569
// (get) Token: 0x0600087A RID: 2170 RVA: 0x00016AA0 File Offset: 0x00014CA0
// (set) Token: 0x0600087B RID: 2171 RVA: 0x00016AA4 File Offset: 0x00014CA4
[global::System.MonoTODO]
[MonitoringDescription("The priority level of this thread.")]
public ThreadPriorityLevel PriorityLevel
{
get
{
return ThreadPriorityLevel.Idle;
}
set
{
}
}
/// <summary>Gets the amount of time that the thread has spent running code inside the operating system core.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> indicating the amount of time that the thread has spent running code inside the operating system core.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The thread time could not be retrieved. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x1700023A RID: 570
// (get) Token: 0x0600087C RID: 2172 RVA: 0x00016AA8 File Offset: 0x00014CA8
[MonitoringDescription("The amount of CPU time used in privileged mode.")]
[global::System.MonoTODO]
public TimeSpan PrivilegedProcessorTime
{
get
{
return new TimeSpan(0L);
}
}
/// <summary>Sets the processors on which the associated thread can run.</summary>
/// <returns>An <see cref="T:System.IntPtr" /> that points to a set of bits, each of which represents a processor that the thread can run on.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The processor affinity could not be set. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x1700023B RID: 571
// (set) Token: 0x0600087D RID: 2173 RVA: 0x00016AB4 File Offset: 0x00014CB4
[global::System.ComponentModel.Browsable(false)]
[global::System.MonoTODO]
public IntPtr ProcessorAffinity
{
set
{
}
}
/// <summary>Gets the memory address of the function that the operating system called that started this thread.</summary>
/// <returns>The thread's starting address, which points to the application-defined function that the thread executes.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700023C RID: 572
// (get) Token: 0x0600087E RID: 2174 RVA: 0x00016AB8 File Offset: 0x00014CB8
[MonitoringDescription("The start address in memory of this thread.")]
[global::System.MonoTODO]
public IntPtr StartAddress
{
get
{
return (IntPtr)0;
}
}
/// <summary>Gets the time that the operating system started the thread.</summary>
/// <returns>A <see cref="T:System.DateTime" /> representing the time that was on the system when the operating system started the thread.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The thread time could not be retrieved. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x1700023D RID: 573
// (get) Token: 0x0600087F RID: 2175 RVA: 0x00016AC0 File Offset: 0x00014CC0
[global::System.MonoTODO]
[MonitoringDescription("The time this thread was started.")]
public DateTime StartTime
{
get
{
return new DateTime(0L);
}
}
/// <summary>Gets the current state of this thread.</summary>
/// <returns>A <see cref="T:System.Diagnostics.ThreadState" /> that indicates the thread's execution, for example, running, waiting, or terminated.</returns>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700023E RID: 574
// (get) Token: 0x06000880 RID: 2176 RVA: 0x00016ACC File Offset: 0x00014CCC
[global::System.MonoTODO]
[MonitoringDescription("The current state of this thread.")]
public ThreadState ThreadState
{
get
{
return ThreadState.Initialized;
}
}
/// <summary>Gets the total amount of time that this thread has spent using the processor.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> that indicates the amount of time that the thread has had control of the processor.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The thread time could not be retrieved. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x1700023F RID: 575
// (get) Token: 0x06000881 RID: 2177 RVA: 0x00016AD0 File Offset: 0x00014CD0
[global::System.MonoTODO]
[MonitoringDescription("The total amount of CPU time used.")]
public TimeSpan TotalProcessorTime
{
get
{
return new TimeSpan(0L);
}
}
/// <summary>Gets the amount of time that the associated thread has spent running code inside the application.</summary>
/// <returns>A <see cref="T:System.TimeSpan" /> indicating the amount of time that the thread has spent running code inside the application, as opposed to inside the operating system core.</returns>
/// <exception cref="T:System.ComponentModel.Win32Exception">The thread time could not be retrieved. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000240 RID: 576
// (get) Token: 0x06000882 RID: 2178 RVA: 0x00016ADC File Offset: 0x00014CDC
[MonitoringDescription("The amount of CPU time used in user mode.")]
[global::System.MonoTODO]
public TimeSpan UserProcessorTime
{
get
{
return new TimeSpan(0L);
}
}
/// <summary>Gets the reason that the thread is waiting.</summary>
/// <returns>A <see cref="T:System.Diagnostics.ThreadWaitReason" /> representing the reason that the thread is in the wait state.</returns>
/// <exception cref="T:System.InvalidOperationException">The thread is not in the wait state. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000241 RID: 577
// (get) Token: 0x06000883 RID: 2179 RVA: 0x00016AE8 File Offset: 0x00014CE8
[MonitoringDescription("The reason why this thread is waiting.")]
[global::System.MonoTODO]
public ThreadWaitReason WaitReason
{
get
{
return ThreadWaitReason.Executive;
}
}
/// <summary>Resets the ideal processor for this thread to indicate that there is no single ideal processor. In other words, so that any processor is ideal.</summary>
/// <exception cref="T:System.ComponentModel.Win32Exception">The ideal processor could not be reset. </exception>
/// <exception cref="T:System.PlatformNotSupportedException">The platform is Windows 98 or Windows Millennium Edition. </exception>
/// <exception cref="T:System.NotSupportedException">The process is on a remote computer.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x06000884 RID: 2180 RVA: 0x00016AEC File Offset: 0x00014CEC
[global::System.MonoTODO]
public void ResetIdealProcessor()
{
}
}
}
@@ -0,0 +1,103 @@
using System;
using System.Collections;
namespace System.Diagnostics
{
/// <summary>Provides a strongly typed collection of <see cref="T:System.Diagnostics.ProcessThread" /> objects.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000EF RID: 239
public class ProcessThreadCollection : ReadOnlyCollectionBase
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessThreadCollection" /> class, with no associated <see cref="T:System.Diagnostics.ProcessThread" /> instances.</summary>
// Token: 0x06000885 RID: 2181 RVA: 0x00016AF0 File Offset: 0x00014CF0
protected ProcessThreadCollection()
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.ProcessThreadCollection" /> class, using the specified array of <see cref="T:System.Diagnostics.ProcessThread" /> instances.</summary>
/// <param name="processThreads">An array of <see cref="T:System.Diagnostics.ProcessThread" /> instances with which to initialize this <see cref="T:System.Diagnostics.ProcessThreadCollection" /> instance. </param>
// Token: 0x06000886 RID: 2182 RVA: 0x00016AF8 File Offset: 0x00014CF8
public ProcessThreadCollection(ProcessThread[] processThreads)
{
base.InnerList.AddRange(processThreads);
}
// Token: 0x06000887 RID: 2183 RVA: 0x00016B0C File Offset: 0x00014D0C
internal static ProcessThreadCollection GetEmpty()
{
return new ProcessThreadCollection();
}
/// <summary>Gets an index for iterating over the set of process threads.</summary>
/// <returns>A <see cref="T:System.Diagnostics.ProcessThread" /> that indexes the threads in the collection.</returns>
/// <param name="index">The zero-based index value of the thread in the collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x17000242 RID: 578
public ProcessThread this[int index]
{
get
{
return (ProcessThread)base.InnerList[index];
}
}
/// <summary>Appends a process thread to the collection.</summary>
/// <returns>The zero-based index of the thread in the collection.</returns>
/// <param name="thread">The thread to add to the collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000889 RID: 2185 RVA: 0x00016B28 File Offset: 0x00014D28
public int Add(ProcessThread thread)
{
return base.InnerList.Add(thread);
}
/// <summary>Determines whether the specified process thread exists in the collection.</summary>
/// <returns>true if the thread exists in the collection; otherwise, false.</returns>
/// <param name="thread">A <see cref="T:System.Diagnostics.ProcessThread" /> instance that indicates the thread to find in this collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600088A RID: 2186 RVA: 0x00016B38 File Offset: 0x00014D38
public bool Contains(ProcessThread thread)
{
return base.InnerList.Contains(thread);
}
/// <summary>Copies an array of <see cref="T:System.Diagnostics.ProcessThread" /> instances to the collection, at the specified index.</summary>
/// <param name="array">An array of <see cref="T:System.Diagnostics.ProcessThread" /> instances to add to the collection. </param>
/// <param name="index">The location at which to add the new instances. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600088B RID: 2187 RVA: 0x00016B48 File Offset: 0x00014D48
public void CopyTo(ProcessThread[] array, int index)
{
base.InnerList.CopyTo(array, index);
}
/// <summary>Provides the location of a specified thread within the collection.</summary>
/// <returns>The zero-based index that defines the location of the thread within the <see cref="T:System.Diagnostics.ProcessThreadCollection" />.</returns>
/// <param name="thread">The <see cref="T:System.Diagnostics.ProcessThread" /> whose index is retrieved. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600088C RID: 2188 RVA: 0x00016B58 File Offset: 0x00014D58
public int IndexOf(ProcessThread thread)
{
return base.InnerList.IndexOf(thread);
}
/// <summary>Inserts a process thread at the specified location in the collection.</summary>
/// <param name="index">The zero-based index indicating the location at which to insert the thread. </param>
/// <param name="thread">The thread to insert into the collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600088D RID: 2189 RVA: 0x00016B68 File Offset: 0x00014D68
public void Insert(int index, ProcessThread thread)
{
base.InnerList.Insert(index, thread);
}
/// <summary>Deletes a process thread from the collection.</summary>
/// <param name="thread">The thread to remove from the collection. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600088E RID: 2190 RVA: 0x00016B78 File Offset: 0x00014D78
public void Remove(ProcessThread thread)
{
base.InnerList.Remove(thread);
}
}
}
+23
View File
@@ -0,0 +1,23 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specified how a new window should appear when the system starts a process.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F0 RID: 240
public enum ProcessWindowStyle
{
/// <summary>The hidden window style. A window can be either visible or hidden. The system displays a hidden window by not drawing it. If a window is hidden, it is effectively disabled. A hidden window can process messages from the system or from other windows, but it cannot process input from the user or display output. Frequently, an application may keep a new window hidden while it customizes the window's appearance, and then make the window style Normal. To use <see cref="F:System.Diagnostics.ProcessWindowStyle.Hidden" />, the <see cref="P:System.Diagnostics.ProcessStartInfo.UseShellExecute" /> property must be false.</summary>
// Token: 0x040002A7 RID: 679
Hidden = 1,
/// <summary>The maximized window style. By default, the system enlarges a maximized window so that it fills the screen or, in the case of a child window, the parent window's client area. If the window has a title bar, the system automatically moves it to the top of the screen or to the top of the parent window's client area. Also, the system disables the window's sizing border and the window-positioning capability of the title bar so that the user cannot move the window by dragging the title bar.</summary>
// Token: 0x040002A8 RID: 680
Maximized = 3,
/// <summary>The minimized window style. By default, the system reduces a minimized window to the size of its taskbar button and moves the minimized window to the taskbar.</summary>
// Token: 0x040002A9 RID: 681
Minimized = 2,
/// <summary>The normal, visible window style. The system displays a window with Normal style on the screen, in a default location. If a window is visible, the user can supply input to the window and view the window's output. Frequently, an application may initialize a new window to the Hidden style while it customizes the window's appearance, and then make the window style Normal.</summary>
// Token: 0x040002AA RID: 682
Normal = 0
}
}
+67
View File
@@ -0,0 +1,67 @@
using System;
namespace System.Diagnostics
{
/// <summary>Indicates whether a listener should trace a message based on the source of a trace.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F1 RID: 241
public class SourceFilter : TraceFilter
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.SourceFilter" /> class, specifying the name of the trace source. </summary>
/// <param name="source">The name of the trace source.</param>
// Token: 0x0600088F RID: 2191 RVA: 0x00016B88 File Offset: 0x00014D88
public SourceFilter(string source)
{
if (source == null)
{
throw new ArgumentNullException("source");
}
this.source = source;
}
/// <summary>Gets or sets the name of the trace source.</summary>
/// <returns>The name of the trace source.</returns>
/// <exception cref="T:System.ArgumentNullException">The value is null. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000243 RID: 579
// (get) Token: 0x06000890 RID: 2192 RVA: 0x00016BA8 File Offset: 0x00014DA8
// (set) Token: 0x06000891 RID: 2193 RVA: 0x00016BB0 File Offset: 0x00014DB0
public string Source
{
get
{
return this.source;
}
set
{
if (this.source == null)
{
throw new ArgumentNullException("value");
}
this.source = value;
}
}
/// <summary>Determines whether the trace listener should trace the event.</summary>
/// <returns>true if the trace should be produced; otherwise, false. </returns>
/// <param name="cache">An object that represents the information cache for the trace event.</param>
/// <param name="source">The name of the source.</param>
/// <param name="eventType">One of the enumeration values that identifies the event type. </param>
/// <param name="id">A trace identifier number.</param>
/// <param name="formatOrMessage">The format to use for writing an array of arguments or a message to write.</param>
/// <param name="args">An array of argument objects.</param>
/// <param name="data1">A trace data object.</param>
/// <param name="data">An array of trace data objects.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="source" /> is null. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06000892 RID: 2194 RVA: 0x00016BD0 File Offset: 0x00014DD0
public override bool ShouldTrace(TraceEventCache cache, string source, TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data)
{
return source == this.source;
}
// Token: 0x040002AB RID: 683
private string source;
}
}
+38
View File
@@ -0,0 +1,38 @@
using System;
using System.ComponentModel;
namespace System.Diagnostics
{
/// <summary>Specifies the levels of trace messages filtered by the source switch and event type filter.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F2 RID: 242
[Flags]
public enum SourceLevels
{
/// <summary>Does not allow any events through.</summary>
// Token: 0x040002AD RID: 685
Off = 0,
/// <summary>Allows only <see cref="F:System.Diagnostics.TraceEventType.Critical" /> events through.</summary>
// Token: 0x040002AE RID: 686
Critical = 1,
/// <summary>Allows <see cref="F:System.Diagnostics.TraceEventType.Critical" /> and <see cref="F:System.Diagnostics.TraceEventType.Error" /> events through.</summary>
// Token: 0x040002AF RID: 687
Error = 3,
/// <summary>Allows <see cref="F:System.Diagnostics.TraceEventType.Critical" />, <see cref="F:System.Diagnostics.TraceEventType.Error" />, and <see cref="F:System.Diagnostics.TraceEventType.Warning" /> events through.</summary>
// Token: 0x040002B0 RID: 688
Warning = 7,
/// <summary>Allows <see cref="F:System.Diagnostics.TraceEventType.Critical" />, <see cref="F:System.Diagnostics.TraceEventType.Error" />, <see cref="F:System.Diagnostics.TraceEventType.Warning" />, and <see cref="F:System.Diagnostics.TraceEventType.Information" /> events through.</summary>
// Token: 0x040002B1 RID: 689
Information = 15,
/// <summary>Allows <see cref="F:System.Diagnostics.TraceEventType.Critical" />, <see cref="F:System.Diagnostics.TraceEventType.Error" />, <see cref="F:System.Diagnostics.TraceEventType.Warning" />, <see cref="F:System.Diagnostics.TraceEventType.Information" />, and <see cref="F:System.Diagnostics.TraceEventType.Verbose" /> events through.</summary>
// Token: 0x040002B2 RID: 690
Verbose = 31,
/// <summary>Allows the <see cref="F:System.Diagnostics.TraceEventType.Stop" />, <see cref="F:System.Diagnostics.TraceEventType.Start" />, <see cref="F:System.Diagnostics.TraceEventType.Suspend" />, <see cref="F:System.Diagnostics.TraceEventType.Transfer" />, and <see cref="F:System.Diagnostics.TraceEventType.Resume" /> events through.</summary>
// Token: 0x040002B3 RID: 691
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
ActivityTracing = 65280,
/// <summary>Allows all events through.</summary>
// Token: 0x040002B4 RID: 692
All = -1
}
}
+93
View File
@@ -0,0 +1,93 @@
using System;
namespace System.Diagnostics
{
/// <summary>Provides a multilevel switch to control tracing and debug output without recompiling your code.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F3 RID: 243
public class SourceSwitch : Switch
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.SourceSwitch" /> class, specifying the name of the source.</summary>
/// <param name="name">The name of the source.</param>
// Token: 0x06000893 RID: 2195 RVA: 0x00016BE0 File Offset: 0x00014DE0
public SourceSwitch(string displayName)
: this(displayName, null)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.SourceSwitch" /> class, specifying the display name and the default value for the source switch.</summary>
/// <param name="displayName">The name of the source switch. </param>
/// <param name="defaultSwitchValue">The default value for the switch. </param>
// Token: 0x06000894 RID: 2196 RVA: 0x00016BEC File Offset: 0x00014DEC
public SourceSwitch(string displayName, string defaultSwitchValue)
: base(displayName, "Source switch.", defaultSwitchValue)
{
}
/// <summary>Gets or sets the level of the switch.</summary>
/// <returns>One of the <see cref="T:System.Diagnostics.SourceLevels" /> values that represents the event level of the switch.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000244 RID: 580
// (get) Token: 0x06000895 RID: 2197 RVA: 0x00016BFC File Offset: 0x00014DFC
// (set) Token: 0x06000896 RID: 2198 RVA: 0x00016C04 File Offset: 0x00014E04
public SourceLevels Level
{
get
{
return (SourceLevels)base.SwitchSetting;
}
set
{
base.SwitchSetting = (int)value;
}
}
/// <summary>Determines if trace listeners should be called, based on the trace event type.</summary>
/// <returns>True if the trace listeners should be called; otherwise, false.</returns>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values.</param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000897 RID: 2199 RVA: 0x00016C10 File Offset: 0x00014E10
public bool ShouldTrace(TraceEventType eventType)
{
switch (eventType)
{
case TraceEventType.Critical:
return (this.Level & SourceLevels.Critical) != SourceLevels.Off;
case TraceEventType.Error:
return (this.Level & SourceLevels.Error) != SourceLevels.Off;
default:
if (eventType != TraceEventType.Verbose)
{
if (eventType != TraceEventType.Start && eventType != TraceEventType.Stop && eventType != TraceEventType.Suspend && eventType != TraceEventType.Resume && eventType != TraceEventType.Transfer)
{
}
return (this.Level & SourceLevels.ActivityTracing) != SourceLevels.Off;
}
return (this.Level & SourceLevels.Verbose) != SourceLevels.Off;
case TraceEventType.Warning:
return (this.Level & SourceLevels.Warning) != SourceLevels.Off;
case TraceEventType.Information:
return (this.Level & SourceLevels.Information) != SourceLevels.Off;
}
}
/// <summary>Invoked when the value of the <see cref="P:System.Diagnostics.Switch.Value" /> property changes.</summary>
/// <exception cref="T:System.ArgumentException">The new value of <see cref="P:System.Diagnostics.Switch.Value" /> is not one of the <see cref="T:System.Diagnostics.SourceLevels" /> values.</exception>
// Token: 0x06000898 RID: 2200 RVA: 0x00016CEC File Offset: 0x00014EEC
protected override void OnValueChanged()
{
base.SwitchSetting = (int)Enum.Parse(typeof(SourceLevels), base.Value, true);
}
// Token: 0x040002B5 RID: 693
private const string description = "Source switch.";
}
}
+143
View File
@@ -0,0 +1,143 @@
using System;
using System.Runtime.CompilerServices;
namespace System.Diagnostics
{
/// <summary>Provides a set of methods and properties that you can use to accurately measure elapsed time.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000F4 RID: 244
public class Stopwatch
{
/// <summary>Gets the current number of ticks in the timer mechanism.</summary>
/// <returns>A long integer representing the tick counter value of the underlying timer mechanism.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x0600089B RID: 2203
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern long GetTimestamp();
/// <summary>Initializes a new <see cref="T:System.Diagnostics.Stopwatch" /> instance, sets the elapsed time property to zero, and starts measuring elapsed time.</summary>
/// <returns>A <see cref="T:System.Diagnostics.Stopwatch" /> that has just begun measuring elapsed time.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x0600089C RID: 2204 RVA: 0x00016D2C File Offset: 0x00014F2C
public static Stopwatch StartNew()
{
Stopwatch stopwatch = new Stopwatch();
stopwatch.Start();
return stopwatch;
}
/// <summary>Gets the total elapsed time measured by the current instance.</summary>
/// <returns>A read-only <see cref="T:System.TimeSpan" /> representing the total elapsed time measured by the current instance.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000245 RID: 581
// (get) Token: 0x0600089D RID: 2205 RVA: 0x00016D48 File Offset: 0x00014F48
public TimeSpan Elapsed
{
get
{
if (Stopwatch.IsHighResolution)
{
return TimeSpan.FromTicks(this.ElapsedTicks / (Stopwatch.Frequency / 10000000L));
}
return TimeSpan.FromTicks(this.ElapsedTicks);
}
}
/// <summary>Gets the total elapsed time measured by the current instance, in milliseconds.</summary>
/// <returns>A read-only long integer representing the total number of milliseconds measured by the current instance.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000246 RID: 582
// (get) Token: 0x0600089E RID: 2206 RVA: 0x00016D84 File Offset: 0x00014F84
public long ElapsedMilliseconds
{
get
{
if (Stopwatch.IsHighResolution)
{
return this.ElapsedTicks / (Stopwatch.Frequency / 1000L);
}
return checked((long)this.Elapsed.TotalMilliseconds);
}
}
/// <summary>Gets the total elapsed time measured by the current instance, in timer ticks.</summary>
/// <returns>A read-only long integer representing the total number of timer ticks measured by the current instance.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000247 RID: 583
// (get) Token: 0x0600089F RID: 2207 RVA: 0x00016DC0 File Offset: 0x00014FC0
public long ElapsedTicks
{
get
{
return (!this.is_running) ? this.elapsed : (Stopwatch.GetTimestamp() - this.started + this.elapsed);
}
}
/// <summary>Gets a value indicating whether the <see cref="T:System.Diagnostics.Stopwatch" /> timer is running.</summary>
/// <returns>true if the <see cref="T:System.Diagnostics.Stopwatch" /> instance is currently running and measuring elapsed time for an interval; otherwise, false.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000248 RID: 584
// (get) Token: 0x060008A0 RID: 2208 RVA: 0x00016DEC File Offset: 0x00014FEC
public bool IsRunning
{
get
{
return this.is_running;
}
}
/// <summary>Stops time interval measurement and resets the elapsed time to zero.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x060008A1 RID: 2209 RVA: 0x00016DF4 File Offset: 0x00014FF4
public void Reset()
{
this.elapsed = 0L;
this.is_running = false;
}
/// <summary>Starts, or resumes, measuring elapsed time for an interval.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x060008A2 RID: 2210 RVA: 0x00016E08 File Offset: 0x00015008
public void Start()
{
if (this.is_running)
{
return;
}
this.started = Stopwatch.GetTimestamp();
this.is_running = true;
}
/// <summary>Stops measuring elapsed time for an interval.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x060008A3 RID: 2211 RVA: 0x00016E28 File Offset: 0x00015028
public void Stop()
{
if (!this.is_running)
{
return;
}
this.elapsed += Stopwatch.GetTimestamp() - this.started;
this.is_running = false;
}
/// <summary>Gets the frequency of the timer as the number of ticks per second. This field is read-only.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x040002B6 RID: 694
public static readonly long Frequency = 10000000L;
/// <summary>Indicates whether the timer is based on a high-resolution performance counter. This field is read-only.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x040002B7 RID: 695
public static readonly bool IsHighResolution = true;
// Token: 0x040002B8 RID: 696
private long elapsed;
// Token: 0x040002B9 RID: 697
private long started;
// Token: 0x040002BA RID: 698
private bool is_running;
}
}
+176
View File
@@ -0,0 +1,176 @@
using System;
using System.Collections;
using System.Collections.Specialized;
namespace System.Diagnostics
{
/// <summary>Provides an abstract base class to create new debugging and tracing switches.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F5 RID: 245
public abstract class Switch
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Switch" /> class.</summary>
/// <param name="displayName">The name of the switch. </param>
/// <param name="description">The description for the switch. </param>
// Token: 0x060008A4 RID: 2212 RVA: 0x00016E64 File Offset: 0x00015064
protected Switch(string displayName, string description)
{
this.name = displayName;
this.description = description;
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.Switch" /> class, specifying the display name, description, and default value for the switch. </summary>
/// <param name="displayName">The name of the switch. </param>
/// <param name="description">The description of the switch. </param>
/// <param name="defaultSwitchValue">The default value for the switch.</param>
// Token: 0x060008A5 RID: 2213 RVA: 0x00016E88 File Offset: 0x00015088
protected Switch(string displayName, string description, string defaultSwitchValue)
: this(displayName, description)
{
this.defaultSwitchValue = defaultSwitchValue;
}
/// <summary>Gets a description of the switch.</summary>
/// <returns>The description of the switch. The default value is an empty string ("").</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000249 RID: 585
// (get) Token: 0x060008A6 RID: 2214 RVA: 0x00016E9C File Offset: 0x0001509C
public string Description
{
get
{
return this.description;
}
}
/// <summary>Gets a name used to identify the switch.</summary>
/// <returns>The name used to identify the switch. The default value is an empty string ("").</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700024A RID: 586
// (get) Token: 0x060008A7 RID: 2215 RVA: 0x00016EA4 File Offset: 0x000150A4
public string DisplayName
{
get
{
return this.name;
}
}
/// <summary>Gets or sets the current setting for this switch.</summary>
/// <returns>The current setting for this switch. The default is zero.</returns>
// Token: 0x1700024B RID: 587
// (get) Token: 0x060008A8 RID: 2216 RVA: 0x00016EAC File Offset: 0x000150AC
// (set) Token: 0x060008A9 RID: 2217 RVA: 0x00016EE0 File Offset: 0x000150E0
protected int SwitchSetting
{
get
{
if (!this.initialized)
{
this.initialized = true;
this.GetConfigFileSetting();
this.OnSwitchSettingChanged();
}
return this.switchSetting;
}
set
{
if (this.switchSetting != value)
{
this.switchSetting = value;
this.OnSwitchSettingChanged();
}
this.initialized = true;
}
}
/// <summary>Gets the custom switch attributes defined in the application configuration file.</summary>
/// <returns>A <see cref="T:System.Collections.Specialized.StringDictionary" /> containing the case-insensitive custom attributes for the trace switch.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x1700024C RID: 588
// (get) Token: 0x060008AA RID: 2218 RVA: 0x00016F10 File Offset: 0x00015110
public global::System.Collections.Specialized.StringDictionary Attributes
{
get
{
return this.attributes;
}
}
/// <summary>Gets or sets the value of the switch.</summary>
/// <returns>A string representing the value of the switch.</returns>
/// <exception cref="T:System.Configuration.ConfigurationErrorsException">The value is null.-or-The value does not consist solely of an optional negative sign followed by a sequence of digits ranging from 0 to 9.-or-The value represents a number less than <see cref="F:System.Int32.MinValue" /> or greater than <see cref="F:System.Int32.MaxValue" />.</exception>
// Token: 0x1700024D RID: 589
// (get) Token: 0x060008AB RID: 2219 RVA: 0x00016F18 File Offset: 0x00015118
// (set) Token: 0x060008AC RID: 2220 RVA: 0x00016F20 File Offset: 0x00015120
protected string Value
{
get
{
return this.value;
}
set
{
this.value = value;
this.OnValueChanged();
}
}
/// <summary>Gets the custom attributes supported by the switch.</summary>
/// <returns>A string array that contains the names of the custom attributes supported by the switch, or null if there no custom attributes are supported.</returns>
// Token: 0x060008AD RID: 2221 RVA: 0x00016F30 File Offset: 0x00015130
protected internal virtual string[] GetSupportedAttributes()
{
return null;
}
/// <summary>Invoked when the <see cref="P:System.Diagnostics.Switch.Value" /> property is changed.</summary>
// Token: 0x060008AE RID: 2222 RVA: 0x00016F34 File Offset: 0x00015134
protected virtual void OnValueChanged()
{
}
// Token: 0x060008AF RID: 2223 RVA: 0x00016F38 File Offset: 0x00015138
private void GetConfigFileSetting()
{
IDictionary dictionary = null;
if (dictionary != null && dictionary.Contains(this.name))
{
this.switchSetting = (int)dictionary[this.name];
return;
}
if (this.defaultSwitchValue != null)
{
this.value = this.defaultSwitchValue;
this.OnValueChanged();
}
}
/// <summary>Invoked when the <see cref="P:System.Diagnostics.Switch.SwitchSetting" /> property is changed.</summary>
// Token: 0x060008B0 RID: 2224 RVA: 0x00016F94 File Offset: 0x00015194
protected virtual void OnSwitchSettingChanged()
{
}
// Token: 0x040002BB RID: 699
private string name;
// Token: 0x040002BC RID: 700
private string description;
// Token: 0x040002BD RID: 701
private int switchSetting;
// Token: 0x040002BE RID: 702
private string value;
// Token: 0x040002BF RID: 703
private string defaultSwitchValue;
// Token: 0x040002C0 RID: 704
private bool initialized;
// Token: 0x040002C1 RID: 705
private global::System.Collections.Specialized.StringDictionary attributes = new global::System.Collections.Specialized.StringDictionary();
}
}
@@ -0,0 +1,50 @@
using System;
namespace System.Diagnostics
{
/// <summary>Identifies the level type for a switch. </summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000F6 RID: 246
[global::System.MonoLimitation("This attribute is not considered in trace support.")]
[AttributeUsage(AttributeTargets.Class)]
public sealed class SwitchLevelAttribute : Attribute
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.SwitchLevelAttribute" /> class, specifying the type that determines whether a trace should be written.</summary>
/// <param name="switchLevelType">The <see cref="T:System.Type" /> that determines whether a trace should be written.</param>
// Token: 0x060008B1 RID: 2225 RVA: 0x00016F98 File Offset: 0x00015198
public SwitchLevelAttribute(Type switchLevelType)
{
if (switchLevelType == null)
{
throw new ArgumentNullException("switchLevelType");
}
this.type = switchLevelType;
}
/// <summary>Gets or sets the type that determines whether a trace should be written.</summary>
/// <returns>The <see cref="T:System.Type" /> that determines whether a trace should be written.</returns>
/// <exception cref="T:System.ArgumentNullException">The set operation failed because the value is null.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x1700024E RID: 590
// (get) Token: 0x060008B2 RID: 2226 RVA: 0x00016FB8 File Offset: 0x000151B8
// (set) Token: 0x060008B3 RID: 2227 RVA: 0x00016FC0 File Offset: 0x000151C0
public Type SwitchLevelType
{
get
{
return this.type;
}
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
this.type = value;
}
}
// Token: 0x040002C2 RID: 706
private Type type;
}
}
@@ -0,0 +1,189 @@
using System;
using System.IO;
namespace System.Diagnostics
{
/// <summary>Directs tracing or debugging output to a <see cref="T:System.IO.TextWriter" /> or to a <see cref="T:System.IO.Stream" />, such as <see cref="T:System.IO.FileStream" />.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000F7 RID: 247
public class TextWriterTraceListener : TraceListener
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with <see cref="T:System.IO.TextWriter" /> as the output recipient.</summary>
// Token: 0x060008B4 RID: 2228 RVA: 0x00016FDC File Offset: 0x000151DC
public TextWriterTraceListener()
: base("TextWriter")
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class, using the stream as the recipient of the debugging and tracing output.</summary>
/// <param name="stream">A <see cref="T:System.IO.Stream" /> that represents the stream the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param>
/// <exception cref="T:System.ArgumentNullException">The stream is null. </exception>
// Token: 0x060008B5 RID: 2229 RVA: 0x00016FEC File Offset: 0x000151EC
public TextWriterTraceListener(Stream stream)
: this(stream, string.Empty)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class, using the file as the recipient of the debugging and tracing output.</summary>
/// <param name="fileName">The name of the file the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param>
/// <exception cref="T:System.ArgumentNullException">The file is null. </exception>
// Token: 0x060008B6 RID: 2230 RVA: 0x00016FFC File Offset: 0x000151FC
public TextWriterTraceListener(string fileName)
: this(fileName, string.Empty)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class using the specified writer as recipient of the tracing or debugging output.</summary>
/// <param name="writer">A <see cref="T:System.IO.TextWriter" /> that receives the output from the <see cref="T:System.Diagnostics.TextWriterTraceListener" />. </param>
/// <exception cref="T:System.ArgumentNullException">The writer is null. </exception>
// Token: 0x060008B7 RID: 2231 RVA: 0x0001700C File Offset: 0x0001520C
public TextWriterTraceListener(TextWriter writer)
: this(writer, string.Empty)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the stream as the recipient of the debugging and tracing output.</summary>
/// <param name="stream">A <see cref="T:System.IO.Stream" /> that represents the stream the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param>
/// <param name="name">The name of the new instance. </param>
/// <exception cref="T:System.ArgumentNullException">The stream is null. </exception>
// Token: 0x060008B8 RID: 2232 RVA: 0x0001701C File Offset: 0x0001521C
public TextWriterTraceListener(Stream stream, string name)
: base((name == null) ? string.Empty : name)
{
if (stream == null)
{
throw new ArgumentNullException("stream");
}
this.writer = new StreamWriter(stream);
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the file as the recipient of the debugging and tracing output.</summary>
/// <param name="fileName">The name of the file the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> writes to. </param>
/// <param name="name">The name of the new instance. </param>
/// <exception cref="T:System.ArgumentNullException">The stream is null. </exception>
// Token: 0x060008B9 RID: 2233 RVA: 0x00017060 File Offset: 0x00015260
public TextWriterTraceListener(string fileName, string name)
: base((name == null) ? string.Empty : name)
{
if (fileName == null)
{
throw new ArgumentNullException("fileName");
}
this.writer = new StreamWriter(new FileStream(fileName, FileMode.Append, FileAccess.Write, FileShare.ReadWrite));
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TextWriterTraceListener" /> class with the specified name, using the specified writer as recipient of the tracing or debugging output.</summary>
/// <param name="writer">A <see cref="T:System.IO.TextWriter" /> that receives the output from the <see cref="T:System.Diagnostics.TextWriterTraceListener" />. </param>
/// <param name="name">The name of the new instance. </param>
/// <exception cref="T:System.ArgumentNullException">The writer is null. </exception>
// Token: 0x060008BA RID: 2234 RVA: 0x000170AC File Offset: 0x000152AC
public TextWriterTraceListener(TextWriter writer, string name)
: base((name == null) ? string.Empty : name)
{
if (writer == null)
{
throw new ArgumentNullException("writer");
}
this.writer = writer;
}
/// <summary>Gets or sets the text writer that receives the tracing or debugging output.</summary>
/// <returns>A <see cref="T:System.IO.TextWriter" /> that represents the writer that receives the tracing or debugging output.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700024F RID: 591
// (get) Token: 0x060008BB RID: 2235 RVA: 0x000170E0 File Offset: 0x000152E0
// (set) Token: 0x060008BC RID: 2236 RVA: 0x000170E8 File Offset: 0x000152E8
public TextWriter Writer
{
get
{
return this.writer;
}
set
{
this.writer = value;
}
}
/// <summary>Closes the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> so that it no longer receives tracing or debugging output.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x060008BD RID: 2237 RVA: 0x000170F4 File Offset: 0x000152F4
public override void Close()
{
if (this.writer != null)
{
this.writer.Flush();
this.writer.Close();
this.writer = null;
}
}
/// <summary>Disposes this <see cref="T:System.Diagnostics.TextWriterTraceListener" /> object.</summary>
/// <param name="disposing">true to release managed resources; if false, <see cref="M:System.Diagnostics.TextWriterTraceListener.Dispose(System.Boolean)" /> has no effect.</param>
// Token: 0x060008BE RID: 2238 RVA: 0x0001712C File Offset: 0x0001532C
protected override void Dispose(bool disposing)
{
if (disposing)
{
this.Close();
}
base.Dispose(disposing);
}
/// <summary>Flushes the output buffer for the <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />.</summary>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x060008BF RID: 2239 RVA: 0x00017144 File Offset: 0x00015344
public override void Flush()
{
if (this.writer != null)
{
this.writer.Flush();
}
}
/// <summary>Writes a message to this instance's <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" />.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x060008C0 RID: 2240 RVA: 0x0001715C File Offset: 0x0001535C
public override void Write(string message)
{
if (this.writer != null)
{
if (base.NeedIndent)
{
this.WriteIndent();
}
this.writer.Write(message);
}
}
/// <summary>Writes a message to this instance's <see cref="P:System.Diagnostics.TextWriterTraceListener.Writer" /> followed by a line terminator. The default line terminator is a carriage return followed by a line feed (\r\n).</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// </PermissionSet>
// Token: 0x060008C1 RID: 2241 RVA: 0x00017194 File Offset: 0x00015394
public override void WriteLine(string message)
{
if (this.writer != null)
{
if (base.NeedIndent)
{
this.WriteIndent();
}
this.writer.WriteLine(message);
base.NeedIndent = true;
}
}
// Token: 0x040002C3 RID: 707
private TextWriter writer;
}
}
+32
View File
@@ -0,0 +1,32 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specifies the priority level of a thread.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000F8 RID: 248
public enum ThreadPriorityLevel
{
/// <summary>Specifies one step above the normal priority for the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002C5 RID: 709
AboveNormal = 1,
/// <summary>Specifies one step below the normal priority for the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002C6 RID: 710
BelowNormal = -1,
/// <summary>Specifies highest priority. This is two steps above the normal priority for the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002C7 RID: 711
Highest = 2,
/// <summary>Specifies idle priority. This is the lowest possible priority value of all threads, independent of the value of the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002C8 RID: 712
Idle = -15,
/// <summary>Specifies lowest priority. This is two steps below the normal priority for the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002C9 RID: 713
Lowest = -2,
/// <summary>Specifies normal priority for the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002CA RID: 714
Normal = 0,
/// <summary>Specifies time-critical priority. This is the highest priority of all threads, independent of the value of the associated <see cref="T:System.Diagnostics.ProcessPriorityClass" />.</summary>
// Token: 0x040002CB RID: 715
TimeCritical = 15
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specifies the current execution state of the thread.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000F9 RID: 249
public enum ThreadState
{
/// <summary>A state that indicates the thread has been initialized, but has not yet started.</summary>
// Token: 0x040002CD RID: 717
Initialized,
/// <summary>A state that indicates the thread is waiting to use a processor because no processor is free. The thread is prepared to run on the next available processor.</summary>
// Token: 0x040002CE RID: 718
Ready,
/// <summary>A state that indicates the thread is currently using a processor.</summary>
// Token: 0x040002CF RID: 719
Running,
/// <summary>A state that indicates the thread is about to use a processor. Only one thread can be in this state at a time.</summary>
// Token: 0x040002D0 RID: 720
Standby,
/// <summary>A state that indicates the thread has finished executing and has exited.</summary>
// Token: 0x040002D1 RID: 721
Terminated,
/// <summary>A state that indicates the thread is waiting for a resource, other than the processor, before it can execute. For example, it might be waiting for its execution stack to be paged in from disk.</summary>
// Token: 0x040002D2 RID: 722
Transition = 6,
/// <summary>The state of the thread is unknown.</summary>
// Token: 0x040002D3 RID: 723
Unknown,
/// <summary>A state that indicates the thread is not ready to use the processor because it is waiting for a peripheral operation to complete or a resource to become free. When the thread is ready, it will be rescheduled.</summary>
// Token: 0x040002D4 RID: 724
Wait = 5
}
}
+53
View File
@@ -0,0 +1,53 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specifies the reason a thread is waiting.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000FA RID: 250
public enum ThreadWaitReason
{
/// <summary>The thread is waiting for event pair high.</summary>
// Token: 0x040002D6 RID: 726
EventPairHigh = 7,
/// <summary>The thread is waiting for event pair low.</summary>
// Token: 0x040002D7 RID: 727
EventPairLow,
/// <summary>Thread execution is delayed.</summary>
// Token: 0x040002D8 RID: 728
ExecutionDelay = 4,
/// <summary>The thread is waiting for the scheduler.</summary>
// Token: 0x040002D9 RID: 729
Executive = 0,
/// <summary>The thread is waiting for a free virtual memory page.</summary>
// Token: 0x040002DA RID: 730
FreePage,
/// <summary>The thread is waiting for a local procedure call to arrive.</summary>
// Token: 0x040002DB RID: 731
LpcReceive = 9,
/// <summary>The thread is waiting for reply to a local procedure call to arrive.</summary>
// Token: 0x040002DC RID: 732
LpcReply,
/// <summary>The thread is waiting for a virtual memory page to arrive in memory.</summary>
// Token: 0x040002DD RID: 733
PageIn = 2,
/// <summary>The thread is waiting for a virtual memory page to be written to disk.</summary>
// Token: 0x040002DE RID: 734
PageOut = 12,
/// <summary>Thread execution is suspended.</summary>
// Token: 0x040002DF RID: 735
Suspended = 5,
/// <summary>The thread is waiting for system allocation.</summary>
// Token: 0x040002E0 RID: 736
SystemAllocation = 3,
/// <summary>The thread is waiting for an unknown reason.</summary>
// Token: 0x040002E1 RID: 737
Unknown = 13,
/// <summary>The thread is waiting for a user request.</summary>
// Token: 0x040002E2 RID: 738
UserRequest = 6,
/// <summary>The thread is waiting for the system to allocate virtual memory.</summary>
// Token: 0x040002E3 RID: 739
VirtualMemory = 11
}
}
+614
View File
@@ -0,0 +1,614 @@
using System;
using System.Reflection;
namespace System.Diagnostics
{
/// <summary>Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x020000FB RID: 251
public sealed class Trace
{
// Token: 0x060008C2 RID: 2242 RVA: 0x000171D0 File Offset: 0x000153D0
private Trace()
{
}
/// <summary>Refreshes the trace configuration data.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x060008C3 RID: 2243 RVA: 0x000171D8 File Offset: 0x000153D8
[global::System.MonoNotSupported("")]
public static void Refresh()
{
throw new NotImplementedException();
}
/// <summary>Gets or sets whether <see cref="M:System.Diagnostics.Trace.Flush" /> should be called on the <see cref="P:System.Diagnostics.Trace.Listeners" /> after every write.</summary>
/// <returns>true if <see cref="M:System.Diagnostics.Trace.Flush" /> is called on the <see cref="P:System.Diagnostics.Trace.Listeners" /> after every write; otherwise, false.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000250 RID: 592
// (get) Token: 0x060008C4 RID: 2244 RVA: 0x000171E0 File Offset: 0x000153E0
// (set) Token: 0x060008C5 RID: 2245 RVA: 0x000171E8 File Offset: 0x000153E8
public static bool AutoFlush
{
get
{
return TraceImpl.AutoFlush;
}
set
{
TraceImpl.AutoFlush = value;
}
}
/// <summary>Gets or sets the indent level.</summary>
/// <returns>The indent level. The default is zero.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000251 RID: 593
// (get) Token: 0x060008C6 RID: 2246 RVA: 0x000171F0 File Offset: 0x000153F0
// (set) Token: 0x060008C7 RID: 2247 RVA: 0x000171F8 File Offset: 0x000153F8
public static int IndentLevel
{
get
{
return TraceImpl.IndentLevel;
}
set
{
TraceImpl.IndentLevel = value;
}
}
/// <summary>Gets or sets the number of spaces in an indent.</summary>
/// <returns>The number of spaces in an indent. The default is four.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000252 RID: 594
// (get) Token: 0x060008C8 RID: 2248 RVA: 0x00017200 File Offset: 0x00015400
// (set) Token: 0x060008C9 RID: 2249 RVA: 0x00017208 File Offset: 0x00015408
public static int IndentSize
{
get
{
return TraceImpl.IndentSize;
}
set
{
TraceImpl.IndentSize = value;
}
}
/// <summary>Gets the collection of listeners that is monitoring the trace output.</summary>
/// <returns>A <see cref="T:System.Diagnostics.TraceListenerCollection" /> that represents a collection of type <see cref="T:System.Diagnostics.TraceListener" /> monitoring the trace output.</returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x17000253 RID: 595
// (get) Token: 0x060008CA RID: 2250 RVA: 0x00017210 File Offset: 0x00015410
public static TraceListenerCollection Listeners
{
get
{
return TraceImpl.Listeners;
}
}
/// <summary>Gets the correlation manager for the thread for this trace.</summary>
/// <returns>The <see cref="T:System.Diagnostics.CorrelationManager" /> object associated with the thread for this trace.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000254 RID: 596
// (get) Token: 0x060008CB RID: 2251 RVA: 0x00017218 File Offset: 0x00015418
public static CorrelationManager CorrelationManager
{
get
{
return TraceImpl.CorrelationManager;
}
}
/// <summary>Gets or sets a value indicating whether the global lock should be used. </summary>
/// <returns>true if the global lock is to be used; otherwise, false. The default is true.</returns>
// Token: 0x17000255 RID: 597
// (get) Token: 0x060008CC RID: 2252 RVA: 0x00017220 File Offset: 0x00015420
// (set) Token: 0x060008CD RID: 2253 RVA: 0x00017228 File Offset: 0x00015428
public static bool UseGlobalLock
{
get
{
return TraceImpl.UseGlobalLock;
}
set
{
TraceImpl.UseGlobalLock = value;
}
}
/// <summary>Checks for a condition; if the condition is false, displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, a failure message is not sent and the message box is not displayed.</param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008CE RID: 2254 RVA: 0x00017230 File Offset: 0x00015430
[Conditional("TRACE")]
public static void Assert(bool condition)
{
TraceImpl.Assert(condition);
}
/// <summary>Checks for a condition; if the condition is false, outputs a specified message and displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, the specified message is not sent and the message box is not displayed. </param>
/// <param name="message">The message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008CF RID: 2255 RVA: 0x00017238 File Offset: 0x00015438
[Conditional("TRACE")]
public static void Assert(bool condition, string message)
{
TraceImpl.Assert(condition, message);
}
/// <summary>Checks for a condition; if the condition is false, outputs two specified messages and displays a message box that shows the call stack.</summary>
/// <param name="condition">The conditional expression to evaluate. If the condition is true, the specified messages are not sent and the message box is not displayed. </param>
/// <param name="message">The message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <param name="detailMessage">The detailed message to send to the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D0 RID: 2256 RVA: 0x00017244 File Offset: 0x00015444
[Conditional("TRACE")]
public static void Assert(bool condition, string message, string detailMessage)
{
TraceImpl.Assert(condition, message, detailMessage);
}
/// <summary>Flushes the output buffer, and then closes the <see cref="P:System.Diagnostics.Trace.Listeners" />.</summary>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D1 RID: 2257 RVA: 0x00017250 File Offset: 0x00015450
[Conditional("TRACE")]
public static void Close()
{
TraceImpl.Close();
}
/// <summary>Emits the specified error message.</summary>
/// <param name="message">A message to emit. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D2 RID: 2258 RVA: 0x00017258 File Offset: 0x00015458
[Conditional("TRACE")]
public static void Fail(string message)
{
TraceImpl.Fail(message);
}
/// <summary>Emits an error message, and a detailed error message.</summary>
/// <param name="message">A message to emit. </param>
/// <param name="detailMessage">A detailed message to emit. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D3 RID: 2259 RVA: 0x00017260 File Offset: 0x00015460
[Conditional("TRACE")]
public static void Fail(string message, string detailMessage)
{
TraceImpl.Fail(message, detailMessage);
}
/// <summary>Flushes the output buffer, and causes buffered data to be written to the <see cref="P:System.Diagnostics.Trace.Listeners" />.</summary>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D4 RID: 2260 RVA: 0x0001726C File Offset: 0x0001546C
[Conditional("TRACE")]
public static void Flush()
{
TraceImpl.Flush();
}
/// <summary>Increases the current <see cref="P:System.Diagnostics.Trace.IndentLevel" /> by one.</summary>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D5 RID: 2261 RVA: 0x00017274 File Offset: 0x00015474
[Conditional("TRACE")]
public static void Indent()
{
TraceImpl.Indent();
}
/// <summary>Decreases the current <see cref="P:System.Diagnostics.Trace.IndentLevel" /> by one.</summary>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D6 RID: 2262 RVA: 0x0001727C File Offset: 0x0001547C
[Conditional("TRACE")]
public static void Unindent()
{
TraceImpl.Unindent();
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D7 RID: 2263 RVA: 0x00017284 File Offset: 0x00015484
[Conditional("TRACE")]
public static void Write(object value)
{
TraceImpl.Write(value);
}
/// <summary>Writes a message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D8 RID: 2264 RVA: 0x0001728C File Offset: 0x0001548C
[Conditional("TRACE")]
public static void Write(string message)
{
TraceImpl.Write(message);
}
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="value">An <see cref="T:System.Object" /> name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008D9 RID: 2265 RVA: 0x00017294 File Offset: 0x00015494
[Conditional("TRACE")]
public static void Write(object value, string category)
{
TraceImpl.Write(value, category);
}
/// <summary>Writes a category name and a message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DA RID: 2266 RVA: 0x000172A0 File Offset: 0x000154A0
[Conditional("TRACE")]
public static void Write(string message, string category)
{
TraceImpl.Write(message, category);
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DB RID: 2267 RVA: 0x000172AC File Offset: 0x000154AC
[Conditional("TRACE")]
public static void WriteIf(bool condition, object value)
{
TraceImpl.WriteIf(condition, value);
}
/// <summary>Writes a message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DC RID: 2268 RVA: 0x000172B8 File Offset: 0x000154B8
[Conditional("TRACE")]
public static void WriteIf(bool condition, string message)
{
TraceImpl.WriteIf(condition, message);
}
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DD RID: 2269 RVA: 0x000172C4 File Offset: 0x000154C4
[Conditional("TRACE")]
public static void WriteIf(bool condition, object value, string category)
{
TraceImpl.WriteIf(condition, value, category);
}
/// <summary>Writes a category name and message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DE RID: 2270 RVA: 0x000172D0 File Offset: 0x000154D0
[Conditional("TRACE")]
public static void WriteIf(bool condition, string message, string category)
{
TraceImpl.WriteIf(condition, message, category);
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008DF RID: 2271 RVA: 0x000172DC File Offset: 0x000154DC
[Conditional("TRACE")]
public static void WriteLine(object value)
{
TraceImpl.WriteLine(value);
}
/// <summary>Writes a message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E0 RID: 2272 RVA: 0x000172E4 File Offset: 0x000154E4
[Conditional("TRACE")]
public static void WriteLine(string message)
{
TraceImpl.WriteLine(message);
}
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E1 RID: 2273 RVA: 0x000172EC File Offset: 0x000154EC
[Conditional("TRACE")]
public static void WriteLine(object value, string category)
{
TraceImpl.WriteLine(value, category);
}
/// <summary>Writes a category name and message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection.</summary>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E2 RID: 2274 RVA: 0x000172F8 File Offset: 0x000154F8
[Conditional("TRACE")]
public static void WriteLine(string message, string category)
{
TraceImpl.WriteLine(message, category);
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E3 RID: 2275 RVA: 0x00017304 File Offset: 0x00015504
[Conditional("TRACE")]
public static void WriteLineIf(bool condition, object value)
{
TraceImpl.WriteLineIf(condition, value);
}
/// <summary>Writes a message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="message">A message to write. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E4 RID: 2276 RVA: 0x00017310 File Offset: 0x00015510
[Conditional("TRACE")]
public static void WriteLineIf(bool condition, string message)
{
TraceImpl.WriteLineIf(condition, message);
}
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="value">An <see cref="T:System.Object" /> whose name is sent to the <see cref="P:System.Diagnostics.Trace.Listeners" />. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E5 RID: 2277 RVA: 0x0001731C File Offset: 0x0001551C
[Conditional("TRACE")]
public static void WriteLineIf(bool condition, object value, string category)
{
TraceImpl.WriteLineIf(condition, value, category);
}
/// <summary>Writes a category name and message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection if a condition is true.</summary>
/// <param name="condition">true to cause a message to be written; otherwise, false. </param>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E6 RID: 2278 RVA: 0x00017328 File Offset: 0x00015528
[Conditional("TRACE")]
public static void WriteLineIf(bool condition, string message, string category)
{
TraceImpl.WriteLineIf(condition, message, category);
}
// Token: 0x060008E7 RID: 2279 RVA: 0x00017334 File Offset: 0x00015534
private static void DoTrace(string kind, Assembly report, string message)
{
string text = string.Empty;
try
{
text = report.Location;
}
catch (MethodAccessException)
{
}
TraceImpl.WriteLine(string.Format("{0} {1} : 0 : {2}", text, kind, message));
}
/// <summary>Writes an error message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified message.</summary>
/// <param name="message">The informative message to write.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E8 RID: 2280 RVA: 0x00017388 File Offset: 0x00015588
[Conditional("TRACE")]
public static void TraceError(string message)
{
Trace.DoTrace("Error", Assembly.GetCallingAssembly(), message);
}
/// <summary>Writes an error message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified array of objects and formatting information.</summary>
/// <param name="format">A format string that contains zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An object array containing zero or more objects to format.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008E9 RID: 2281 RVA: 0x0001739C File Offset: 0x0001559C
[Conditional("TRACE")]
public static void TraceError(string message, params object[] args)
{
Trace.DoTrace("Error", Assembly.GetCallingAssembly(), string.Format(message, args));
}
/// <summary>Writes an informational message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified message.</summary>
/// <param name="message">The informative message to write.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008EA RID: 2282 RVA: 0x000173B4 File Offset: 0x000155B4
[Conditional("TRACE")]
public static void TraceInformation(string message)
{
Trace.DoTrace("Information", Assembly.GetCallingAssembly(), message);
}
/// <summary>Writes an informational message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified array of objects and formatting information.</summary>
/// <param name="format">A format string that contains zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An object array containing zero or more objects to format.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008EB RID: 2283 RVA: 0x000173C8 File Offset: 0x000155C8
[Conditional("TRACE")]
public static void TraceInformation(string message, params object[] args)
{
Trace.DoTrace("Information", Assembly.GetCallingAssembly(), string.Format(message, args));
}
/// <summary>Writes a warning message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified message.</summary>
/// <param name="message">The informative message to write.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008EC RID: 2284 RVA: 0x000173E0 File Offset: 0x000155E0
[Conditional("TRACE")]
public static void TraceWarning(string message)
{
Trace.DoTrace("Warning", Assembly.GetCallingAssembly(), message);
}
/// <summary>Writes a warning message to the trace listeners in the <see cref="P:System.Diagnostics.Trace.Listeners" /> collection using the specified array of objects and formatting information.</summary>
/// <param name="format">A format string that contains zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An object array containing zero or more objects to format.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x060008ED RID: 2285 RVA: 0x000173F4 File Offset: 0x000155F4
[Conditional("TRACE")]
public static void TraceWarning(string message, params object[] args)
{
Trace.DoTrace("Warning", Assembly.GetCallingAssembly(), string.Format(message, args));
}
}
}
+127
View File
@@ -0,0 +1,127 @@
using System;
using System.Collections;
using System.Threading;
namespace System.Diagnostics
{
/// <summary>Provides trace event data specific to a thread and a process.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000FC RID: 252
public class TraceEventCache
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceEventCache" /> class. </summary>
// Token: 0x060008EE RID: 2286 RVA: 0x0001740C File Offset: 0x0001560C
public TraceEventCache()
{
this.started = DateTime.Now;
this.manager = Trace.CorrelationManager;
this.callstack = Environment.StackTrace;
this.timestamp = Stopwatch.GetTimestamp();
this.thread = Thread.CurrentThread.Name;
this.process = Process.GetCurrentProcess().Id;
}
/// <summary>Gets the call stack for the current thread.</summary>
/// <returns>A string containing stack trace information. This value can be an empty string ("").</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" />
/// </PermissionSet>
// Token: 0x17000256 RID: 598
// (get) Token: 0x060008EF RID: 2287 RVA: 0x0001746C File Offset: 0x0001566C
public string Callstack
{
get
{
return this.callstack;
}
}
/// <summary>Gets the date and time at which the event trace occurred.</summary>
/// <returns>A <see cref="T:System.DateTime" /> structure whose value is a date and time expressed in Coordinated Universal Time (UTC).</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000257 RID: 599
// (get) Token: 0x060008F0 RID: 2288 RVA: 0x00017474 File Offset: 0x00015674
public DateTime DateTime
{
get
{
return this.started;
}
}
/// <summary>Gets the correlation data, contained in a stack. </summary>
/// <returns>A <see cref="T:System.Collections.Stack" /> containing correlation data.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000258 RID: 600
// (get) Token: 0x060008F1 RID: 2289 RVA: 0x0001747C File Offset: 0x0001567C
public Stack LogicalOperationStack
{
get
{
return this.manager.LogicalOperationStack;
}
}
/// <summary>Gets the unique identifier of the current process.</summary>
/// <returns>The system-generated unique identifier of the current process.</returns>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000259 RID: 601
// (get) Token: 0x060008F2 RID: 2290 RVA: 0x0001748C File Offset: 0x0001568C
public int ProcessId
{
get
{
return this.process;
}
}
/// <summary>Gets a unique identifier for the current managed thread. </summary>
/// <returns>A string that represents a unique integer identifier for this managed thread.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700025A RID: 602
// (get) Token: 0x060008F3 RID: 2291 RVA: 0x00017494 File Offset: 0x00015694
public string ThreadId
{
get
{
return this.thread;
}
}
/// <summary>Gets the current number of ticks in the timer mechanism.</summary>
/// <returns>The tick counter value of the underlying timer mechanism.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x1700025B RID: 603
// (get) Token: 0x060008F4 RID: 2292 RVA: 0x0001749C File Offset: 0x0001569C
public long Timestamp
{
get
{
return this.timestamp;
}
}
// Token: 0x040002E4 RID: 740
private DateTime started;
// Token: 0x040002E5 RID: 741
private CorrelationManager manager;
// Token: 0x040002E6 RID: 742
private string callstack;
// Token: 0x040002E7 RID: 743
private string thread;
// Token: 0x040002E8 RID: 744
private int process;
// Token: 0x040002E9 RID: 745
private long timestamp;
}
}
+47
View File
@@ -0,0 +1,47 @@
using System;
using System.ComponentModel;
namespace System.Diagnostics
{
/// <summary>Identifies the type of event that has caused the trace.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000FD RID: 253
public enum TraceEventType
{
/// <summary>Fatal error or application crash.</summary>
// Token: 0x040002EB RID: 747
Critical = 1,
/// <summary>Recoverable error.</summary>
// Token: 0x040002EC RID: 748
Error,
/// <summary>Noncritical problem.</summary>
// Token: 0x040002ED RID: 749
Warning = 4,
/// <summary>Informational message.</summary>
// Token: 0x040002EE RID: 750
Information = 8,
/// <summary>Debugging trace.</summary>
// Token: 0x040002EF RID: 751
Verbose = 16,
/// <summary>Starting of a logical operation.</summary>
// Token: 0x040002F0 RID: 752
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
Start = 256,
/// <summary>Stopping of a logical operation.</summary>
// Token: 0x040002F1 RID: 753
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
Stop = 512,
/// <summary>Suspension of a logical operation.</summary>
// Token: 0x040002F2 RID: 754
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
Suspend = 1024,
/// <summary>Resumption of a logical operation.</summary>
// Token: 0x040002F3 RID: 755
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
Resume = 2048,
/// <summary>Changing of correlation identity.</summary>
// Token: 0x040002F4 RID: 756
[global::System.ComponentModel.EditorBrowsable(global::System.ComponentModel.EditorBrowsableState.Advanced)]
Transfer = 4096
}
}
+24
View File
@@ -0,0 +1,24 @@
using System;
namespace System.Diagnostics
{
/// <summary>Provides the base class for trace filter implementations.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x020000FE RID: 254
public abstract class TraceFilter
{
/// <summary>When overridden in a derived class, determines whether the trace listener should trace the event.</summary>
/// <returns>true to trace the specified event; otherwise, false. </returns>
/// <param name="cache">The <see cref="T:System.Diagnostics.TraceEventCache" /> that contains information for the trace event.</param>
/// <param name="source">The name of the source.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A trace identifier number.</param>
/// <param name="formatOrMessage">Either the format to use for writing an array of arguments specified by the <paramref name="args" /> parameter, or a message to write.</param>
/// <param name="args">An array of argument objects.</param>
/// <param name="data1">A trace data object.</param>
/// <param name="data">An array of trace data objects.</param>
/// <filterpriority>2</filterpriority>
// Token: 0x060008F6 RID: 2294
public abstract bool ShouldTrace(TraceEventCache cache, string source, TraceEventType eventType, int id, string formatOrMessage, object[] args, object data1, object[] data);
}
}
+491
View File
@@ -0,0 +1,491 @@
using System;
using System.Collections;
namespace System.Diagnostics
{
// Token: 0x02000100 RID: 256
internal class TraceImpl
{
// Token: 0x060008F8 RID: 2296 RVA: 0x000174E4 File Offset: 0x000156E4
private TraceImpl()
{
}
// Token: 0x1700025C RID: 604
// (get) Token: 0x060008FA RID: 2298 RVA: 0x00017508 File Offset: 0x00015708
// (set) Token: 0x060008FB RID: 2299 RVA: 0x00017514 File Offset: 0x00015714
public static bool AutoFlush
{
get
{
TraceImpl.InitOnce();
return TraceImpl.autoFlush;
}
set
{
TraceImpl.InitOnce();
TraceImpl.autoFlush = value;
}
}
// Token: 0x1700025D RID: 605
// (get) Token: 0x060008FC RID: 2300 RVA: 0x00017524 File Offset: 0x00015724
// (set) Token: 0x060008FD RID: 2301 RVA: 0x00017530 File Offset: 0x00015730
public static int IndentLevel
{
get
{
TraceImpl.InitOnce();
return TraceImpl.indentLevel;
}
set
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
TraceImpl.indentLevel = value;
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.IndentLevel = TraceImpl.indentLevel;
}
}
}
}
// Token: 0x1700025E RID: 606
// (get) Token: 0x060008FE RID: 2302 RVA: 0x000175D8 File Offset: 0x000157D8
// (set) Token: 0x060008FF RID: 2303 RVA: 0x000175E4 File Offset: 0x000157E4
public static int IndentSize
{
get
{
TraceImpl.InitOnce();
return TraceImpl.indentSize;
}
set
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
TraceImpl.indentSize = value;
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.IndentSize = TraceImpl.indentSize;
}
}
}
}
// Token: 0x1700025F RID: 607
// (get) Token: 0x06000900 RID: 2304 RVA: 0x0001768C File Offset: 0x0001588C
public static TraceListenerCollection Listeners
{
get
{
TraceImpl.InitOnce();
return TraceImpl.listeners;
}
}
// Token: 0x17000260 RID: 608
// (get) Token: 0x06000901 RID: 2305 RVA: 0x00017698 File Offset: 0x00015898
private static object ListenersSyncRoot
{
get
{
return ((ICollection)TraceImpl.Listeners).SyncRoot;
}
}
// Token: 0x17000261 RID: 609
// (get) Token: 0x06000902 RID: 2306 RVA: 0x000176A4 File Offset: 0x000158A4
public static CorrelationManager CorrelationManager
{
get
{
TraceImpl.InitOnce();
return TraceImpl.correlation_manager;
}
}
// Token: 0x17000262 RID: 610
// (get) Token: 0x06000903 RID: 2307 RVA: 0x000176B0 File Offset: 0x000158B0
// (set) Token: 0x06000904 RID: 2308 RVA: 0x000176BC File Offset: 0x000158BC
[global::System.MonoLimitation("the property exists but it does nothing.")]
public static bool UseGlobalLock
{
get
{
TraceImpl.InitOnce();
return TraceImpl.use_global_lock;
}
set
{
TraceImpl.InitOnce();
TraceImpl.use_global_lock = value;
}
}
// Token: 0x06000905 RID: 2309 RVA: 0x000176CC File Offset: 0x000158CC
private static void InitOnce()
{
if (TraceImpl.initLock != null)
{
object obj = TraceImpl.initLock;
lock (obj)
{
if (TraceImpl.listeners == null)
{
TraceImplSettings traceImplSettings = new TraceImplSettings();
TraceImpl.autoFlush = traceImplSettings.AutoFlush;
TraceImpl.indentLevel = traceImplSettings.IndentLevel;
TraceImpl.indentSize = traceImplSettings.IndentSize;
TraceImpl.listeners = traceImplSettings.Listeners;
}
}
TraceImpl.initLock = null;
}
}
// Token: 0x06000906 RID: 2310 RVA: 0x0001775C File Offset: 0x0001595C
[global::System.MonoTODO]
public static void Assert(bool condition)
{
if (!condition)
{
TraceImpl.Fail(new StackTrace(true).ToString());
}
}
// Token: 0x06000907 RID: 2311 RVA: 0x00017774 File Offset: 0x00015974
[global::System.MonoTODO]
public static void Assert(bool condition, string message)
{
if (!condition)
{
TraceImpl.Fail(message);
}
}
// Token: 0x06000908 RID: 2312 RVA: 0x00017784 File Offset: 0x00015984
[global::System.MonoTODO]
public static void Assert(bool condition, string message, string detailMessage)
{
if (!condition)
{
TraceImpl.Fail(message, detailMessage);
}
}
// Token: 0x06000909 RID: 2313 RVA: 0x00017794 File Offset: 0x00015994
public static void Close()
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Close();
}
}
}
// Token: 0x0600090A RID: 2314 RVA: 0x00017834 File Offset: 0x00015A34
[global::System.MonoTODO]
public static void Fail(string message)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Fail(message);
}
}
}
// Token: 0x0600090B RID: 2315 RVA: 0x000178D4 File Offset: 0x00015AD4
[global::System.MonoTODO]
public static void Fail(string message, string detailMessage)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Fail(message, detailMessage);
}
}
}
// Token: 0x0600090C RID: 2316 RVA: 0x00017974 File Offset: 0x00015B74
public static void Flush()
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Flush();
}
}
}
// Token: 0x0600090D RID: 2317 RVA: 0x00017A14 File Offset: 0x00015C14
public static void Indent()
{
TraceImpl.IndentLevel++;
}
// Token: 0x0600090E RID: 2318 RVA: 0x00017A24 File Offset: 0x00015C24
public static void Unindent()
{
TraceImpl.IndentLevel--;
}
// Token: 0x0600090F RID: 2319 RVA: 0x00017A34 File Offset: 0x00015C34
public static void Write(object value)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Write(value);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000910 RID: 2320 RVA: 0x00017AE4 File Offset: 0x00015CE4
public static void Write(string message)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Write(message);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000911 RID: 2321 RVA: 0x00017B94 File Offset: 0x00015D94
public static void Write(object value, string category)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Write(value, category);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000912 RID: 2322 RVA: 0x00017C44 File Offset: 0x00015E44
public static void Write(string message, string category)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Write(message, category);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000913 RID: 2323 RVA: 0x00017CF4 File Offset: 0x00015EF4
public static void WriteIf(bool condition, object value)
{
if (condition)
{
TraceImpl.Write(value);
}
}
// Token: 0x06000914 RID: 2324 RVA: 0x00017D04 File Offset: 0x00015F04
public static void WriteIf(bool condition, string message)
{
if (condition)
{
TraceImpl.Write(message);
}
}
// Token: 0x06000915 RID: 2325 RVA: 0x00017D14 File Offset: 0x00015F14
public static void WriteIf(bool condition, object value, string category)
{
if (condition)
{
TraceImpl.Write(value, category);
}
}
// Token: 0x06000916 RID: 2326 RVA: 0x00017D24 File Offset: 0x00015F24
public static void WriteIf(bool condition, string message, string category)
{
if (condition)
{
TraceImpl.Write(message, category);
}
}
// Token: 0x06000917 RID: 2327 RVA: 0x00017D34 File Offset: 0x00015F34
public static void WriteLine(object value)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.WriteLine(value);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000918 RID: 2328 RVA: 0x00017DE4 File Offset: 0x00015FE4
public static void WriteLine(string message)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.WriteLine(message);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x06000919 RID: 2329 RVA: 0x00017E94 File Offset: 0x00016094
public static void WriteLine(object value, string category)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.WriteLine(value, category);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x0600091A RID: 2330 RVA: 0x00017F44 File Offset: 0x00016144
public static void WriteLine(string message, string category)
{
object listenersSyncRoot = TraceImpl.ListenersSyncRoot;
lock (listenersSyncRoot)
{
foreach (object obj in TraceImpl.Listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.WriteLine(message, category);
if (TraceImpl.AutoFlush)
{
traceListener.Flush();
}
}
}
}
// Token: 0x0600091B RID: 2331 RVA: 0x00017FF4 File Offset: 0x000161F4
public static void WriteLineIf(bool condition, object value)
{
if (condition)
{
TraceImpl.WriteLine(value);
}
}
// Token: 0x0600091C RID: 2332 RVA: 0x00018004 File Offset: 0x00016204
public static void WriteLineIf(bool condition, string message)
{
if (condition)
{
TraceImpl.WriteLine(message);
}
}
// Token: 0x0600091D RID: 2333 RVA: 0x00018014 File Offset: 0x00016214
public static void WriteLineIf(bool condition, object value, string category)
{
if (condition)
{
TraceImpl.WriteLine(value, category);
}
}
// Token: 0x0600091E RID: 2334 RVA: 0x00018024 File Offset: 0x00016224
public static void WriteLineIf(bool condition, string message, string category)
{
if (condition)
{
TraceImpl.WriteLine(message, category);
}
}
// Token: 0x040002FA RID: 762
private static object initLock = new object();
// Token: 0x040002FB RID: 763
private static bool autoFlush;
// Token: 0x040002FC RID: 764
[ThreadStatic]
private static int indentLevel = 0;
// Token: 0x040002FD RID: 765
[ThreadStatic]
private static int indentSize;
// Token: 0x040002FE RID: 766
private static TraceListenerCollection listeners;
// Token: 0x040002FF RID: 767
private static bool use_global_lock;
// Token: 0x04000300 RID: 768
private static CorrelationManager correlation_manager = new CorrelationManager();
}
}
+29
View File
@@ -0,0 +1,29 @@
using System;
namespace System.Diagnostics
{
// Token: 0x020000FF RID: 255
internal class TraceImplSettings
{
// Token: 0x060008F7 RID: 2295 RVA: 0x000174AC File Offset: 0x000156AC
public TraceImplSettings()
{
this.Listeners.Add(new DefaultTraceListener(), this);
}
// Token: 0x040002F5 RID: 757
public const string Key = ".__TraceInfoSettingsKey__.";
// Token: 0x040002F6 RID: 758
public bool AutoFlush;
// Token: 0x040002F7 RID: 759
public int IndentLevel;
// Token: 0x040002F8 RID: 760
public int IndentSize = 4;
// Token: 0x040002F9 RID: 761
public TraceListenerCollection Listeners = new TraceListenerCollection(false);
}
}
+26
View File
@@ -0,0 +1,26 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specifies what messages to output for the <see cref="T:System.Diagnostics.Debug" />, <see cref="T:System.Diagnostics.Trace" /> and <see cref="T:System.Diagnostics.TraceSwitch" /> classes.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000101 RID: 257
public enum TraceLevel
{
/// <summary>Output no tracing and debugging messages.</summary>
// Token: 0x04000302 RID: 770
Off,
/// <summary>Output error-handling messages.</summary>
// Token: 0x04000303 RID: 771
Error,
/// <summary>Output warnings and error-handling messages.</summary>
// Token: 0x04000304 RID: 772
Warning,
/// <summary>Output informational messages, warnings, and error-handling messages.</summary>
// Token: 0x04000305 RID: 773
Info,
/// <summary>Output all debugging and tracing messages.</summary>
// Token: 0x04000306 RID: 774
Verbose
}
}
+485
View File
@@ -0,0 +1,485 @@
using System;
using System.Collections;
using System.Collections.Specialized;
using System.Runtime.InteropServices;
namespace System.Diagnostics
{
/// <summary>Provides the abstract base class for the listeners who monitor trace and debug output.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000102 RID: 258
public abstract class TraceListener : MarshalByRefObject, IDisposable
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
// Token: 0x0600091F RID: 2335 RVA: 0x00018034 File Offset: 0x00016234
protected TraceListener()
: this(string.Empty)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceListener" /> class using the specified name as the listener.</summary>
/// <param name="name">The name of the <see cref="T:System.Diagnostics.TraceListener" />. </param>
// Token: 0x06000920 RID: 2336 RVA: 0x00018044 File Offset: 0x00016244
protected TraceListener(string name)
{
this.Name = name;
}
/// <summary>Gets or sets the indent level.</summary>
/// <returns>The indent level. The default is zero.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000263 RID: 611
// (get) Token: 0x06000921 RID: 2337 RVA: 0x00018078 File Offset: 0x00016278
// (set) Token: 0x06000922 RID: 2338 RVA: 0x00018080 File Offset: 0x00016280
public int IndentLevel
{
get
{
return this.indentLevel;
}
set
{
this.indentLevel = value;
}
}
/// <summary>Gets or sets the number of spaces in an indent.</summary>
/// <returns>The number of spaces in an indent. The default is four spaces.</returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">Set operation failed because the value is less than zero.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000264 RID: 612
// (get) Token: 0x06000923 RID: 2339 RVA: 0x0001808C File Offset: 0x0001628C
// (set) Token: 0x06000924 RID: 2340 RVA: 0x00018094 File Offset: 0x00016294
public int IndentSize
{
get
{
return this.indentSize;
}
set
{
this.indentSize = value;
}
}
/// <summary>Gets or sets a name for this <see cref="T:System.Diagnostics.TraceListener" />.</summary>
/// <returns>A name for this <see cref="T:System.Diagnostics.TraceListener" />. The default is an empty string ("").</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000265 RID: 613
// (get) Token: 0x06000925 RID: 2341 RVA: 0x000180A0 File Offset: 0x000162A0
// (set) Token: 0x06000926 RID: 2342 RVA: 0x000180A8 File Offset: 0x000162A8
public virtual string Name
{
get
{
return this.name;
}
set
{
this.name = value;
}
}
/// <summary>Gets or sets a value indicating whether to indent the output.</summary>
/// <returns>true if the output should be indented; otherwise, false.</returns>
// Token: 0x17000266 RID: 614
// (get) Token: 0x06000927 RID: 2343 RVA: 0x000180B4 File Offset: 0x000162B4
// (set) Token: 0x06000928 RID: 2344 RVA: 0x000180BC File Offset: 0x000162BC
protected bool NeedIndent
{
get
{
return this.needIndent;
}
set
{
this.needIndent = value;
}
}
/// <summary>Gets a value indicating whether the trace listener is thread safe. </summary>
/// <returns>true if the trace listener is thread safe; otherwise, false. The default is false.</returns>
// Token: 0x17000267 RID: 615
// (get) Token: 0x06000929 RID: 2345 RVA: 0x000180C8 File Offset: 0x000162C8
[global::System.MonoLimitation("This property exists but is never considered.")]
public virtual bool IsThreadSafe
{
get
{
return false;
}
}
/// <summary>When overridden in a derived class, closes the output stream so it no longer receives tracing or debugging output.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x0600092A RID: 2346 RVA: 0x000180CC File Offset: 0x000162CC
public virtual void Close()
{
this.Dispose();
}
/// <summary>Releases all resources used by the <see cref="T:System.Diagnostics.TraceListener" />.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x0600092B RID: 2347 RVA: 0x000180D4 File Offset: 0x000162D4
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
}
/// <summary>Releases the unmanaged resources used by the <see cref="T:System.Diagnostics.TraceListener" /> and optionally releases the managed resources.</summary>
/// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources. </param>
// Token: 0x0600092C RID: 2348 RVA: 0x000180E4 File Offset: 0x000162E4
protected virtual void Dispose(bool disposing)
{
}
/// <summary>Emits an error message to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
/// <param name="message">A message to emit. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600092D RID: 2349 RVA: 0x000180E8 File Offset: 0x000162E8
public virtual void Fail(string message)
{
this.Fail(message, string.Empty);
}
/// <summary>Emits an error message and a detailed error message to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
/// <param name="message">A message to emit. </param>
/// <param name="detailMessage">A detailed message to emit. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600092E RID: 2350 RVA: 0x000180F8 File Offset: 0x000162F8
public virtual void Fail(string message, string detailMessage)
{
this.WriteLine("---- DEBUG ASSERTION FAILED ----");
this.WriteLine("---- Assert Short Message ----");
this.WriteLine(message);
this.WriteLine("---- Assert Long Message ----");
this.WriteLine(detailMessage);
this.WriteLine(string.Empty);
}
/// <summary>When overridden in a derived class, flushes the output buffer.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x0600092F RID: 2351 RVA: 0x00018140 File Offset: 0x00016340
public virtual void Flush()
{
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
/// <param name="o">An <see cref="T:System.Object" /> whose fully qualified class name you want to write. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000930 RID: 2352 RVA: 0x00018144 File Offset: 0x00016344
public virtual void Write(object o)
{
this.Write(o.ToString());
}
/// <summary>When overridden in a derived class, writes the specified message to the listener you create in the derived class.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000931 RID: 2353
public abstract void Write(string message);
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
/// <param name="o">An <see cref="T:System.Object" /> whose fully qualified class name you want to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000932 RID: 2354 RVA: 0x00018154 File Offset: 0x00016354
public virtual void Write(object o, string category)
{
this.Write(o.ToString(), category);
}
/// <summary>Writes a category name and a message to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class.</summary>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000933 RID: 2355 RVA: 0x00018164 File Offset: 0x00016364
public virtual void Write(string message, string category)
{
this.Write(category + ": " + message);
}
/// <summary>Writes the indent to the listener you create when you implement this class, and resets the <see cref="P:System.Diagnostics.TraceListener.NeedIndent" /> property to false.</summary>
// Token: 0x06000934 RID: 2356 RVA: 0x00018178 File Offset: 0x00016378
protected virtual void WriteIndent()
{
this.NeedIndent = false;
string text = new string(' ', this.IndentLevel * this.IndentSize);
this.Write(text);
}
/// <summary>Writes the value of the object's <see cref="M:System.Object.ToString" /> method to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class, followed by a line terminator.</summary>
/// <param name="o">An <see cref="T:System.Object" /> whose fully qualified class name you want to write. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000935 RID: 2357 RVA: 0x000181A8 File Offset: 0x000163A8
public virtual void WriteLine(object o)
{
this.WriteLine(o.ToString());
}
/// <summary>When overridden in a derived class, writes a message to the listener you create in the derived class, followed by a line terminator.</summary>
/// <param name="message">A message to write. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000936 RID: 2358
public abstract void WriteLine(string message);
/// <summary>Writes a category name and the value of the object's <see cref="M:System.Object.ToString" /> method to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class, followed by a line terminator.</summary>
/// <param name="o">An <see cref="T:System.Object" /> whose fully qualified class name you want to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000937 RID: 2359 RVA: 0x000181B8 File Offset: 0x000163B8
public virtual void WriteLine(object o, string category)
{
this.WriteLine(o.ToString(), category);
}
/// <summary>Writes a category name and a message to the listener you create when you implement the <see cref="T:System.Diagnostics.TraceListener" /> class, followed by a line terminator.</summary>
/// <param name="message">A message to write. </param>
/// <param name="category">A category name used to organize the output. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000938 RID: 2360 RVA: 0x000181C8 File Offset: 0x000163C8
public virtual void WriteLine(string message, string category)
{
this.WriteLine(category + ": " + message);
}
// Token: 0x06000939 RID: 2361 RVA: 0x000181DC File Offset: 0x000163DC
internal static string FormatArray(ICollection list, string joiner)
{
string[] array = new string[list.Count];
int num = 0;
foreach (object obj in list)
{
array[num++] = ((obj == null) ? string.Empty : obj.ToString());
}
return string.Join(joiner, array);
}
/// <summary>Writes trace information, a data object and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="data">The trace data to emit.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600093A RID: 2362 RVA: 0x00018270 File Offset: 0x00016470
[ComVisible(false)]
public virtual void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
{
if (this.Filter != null && !this.Filter.ShouldTrace(eventCache, source, eventType, id, null, null, data, null))
{
return;
}
this.WriteLine(string.Format("{0} {1}: {2} : {3}", new object[] { source, eventType, id, data }));
if (eventCache == null)
{
return;
}
if ((this.TraceOutputOptions & TraceOptions.ProcessId) != TraceOptions.None)
{
this.WriteLine(" ProcessId=" + eventCache.ProcessId);
}
if ((this.TraceOutputOptions & TraceOptions.LogicalOperationStack) != TraceOptions.None)
{
this.WriteLine(" LogicalOperationStack=" + TraceListener.FormatArray(eventCache.LogicalOperationStack, ", "));
}
if ((this.TraceOutputOptions & TraceOptions.ThreadId) != TraceOptions.None)
{
this.WriteLine(" ThreadId=" + eventCache.ThreadId);
}
if ((this.TraceOutputOptions & TraceOptions.DateTime) != TraceOptions.None)
{
this.WriteLine(" DateTime=" + eventCache.DateTime.ToString("o"));
}
if ((this.TraceOutputOptions & TraceOptions.Timestamp) != TraceOptions.None)
{
this.WriteLine(" Timestamp=" + eventCache.Timestamp);
}
if ((this.TraceOutputOptions & TraceOptions.Callstack) != TraceOptions.None)
{
this.WriteLine(" Callstack=" + eventCache.Callstack);
}
}
/// <summary>Writes trace information, an array of data objects and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="data">An array of objects to emit as data.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600093B RID: 2363 RVA: 0x000183D4 File Offset: 0x000165D4
[ComVisible(false)]
public virtual void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, params object[] data)
{
if (this.Filter != null && !this.Filter.ShouldTrace(eventCache, source, eventType, id, null, null, null, data))
{
return;
}
this.TraceData(eventCache, source, eventType, id, TraceListener.FormatArray(data, " "));
}
/// <summary>Writes trace and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600093C RID: 2364 RVA: 0x00018420 File Offset: 0x00016620
[ComVisible(false)]
public virtual void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id)
{
this.TraceEvent(eventCache, source, eventType, id, null);
}
/// <summary>Writes trace information, a message, and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="message">A message to write.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600093D RID: 2365 RVA: 0x00018430 File Offset: 0x00016630
[ComVisible(false)]
public virtual void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string message)
{
this.TraceData(eventCache, source, eventType, id, message);
}
/// <summary>Writes trace information, a formatted array of objects and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values specifying the type of event that has caused the trace.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="format">A format string that contains zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An object array containing zero or more objects to format.</param>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600093E RID: 2366 RVA: 0x00018440 File Offset: 0x00016640
[ComVisible(false)]
public virtual void TraceEvent(TraceEventCache eventCache, string source, TraceEventType eventType, int id, string format, params object[] args)
{
this.TraceEvent(eventCache, source, eventType, id, string.Format(format, args));
}
/// <summary>Writes trace information, a message, a related activity identity and event information to the listener specific output.</summary>
/// <param name="eventCache">A <see cref="T:System.Diagnostics.TraceEventCache" /> object that contains the current process ID, thread ID, and stack trace information.</param>
/// <param name="source">A name used to identify the output, typically the name of the application that generated the trace event.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="message">A message to write.</param>
/// <param name="relatedActivityId"> A <see cref="T:System.Guid" /> object identifying a related activity.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x0600093F RID: 2367 RVA: 0x00018458 File Offset: 0x00016658
[ComVisible(false)]
public virtual void TraceTransfer(TraceEventCache eventCache, string source, int id, string message, Guid relatedActivityId)
{
this.TraceEvent(eventCache, source, TraceEventType.Transfer, id, string.Format("{0}, relatedActivityId={1}", message, relatedActivityId));
}
/// <summary>Gets the custom attributes supported by the trace listener.</summary>
/// <returns>A string array naming the custom attributes supported by the trace listener, or null if there are no custom attributes.</returns>
// Token: 0x06000940 RID: 2368 RVA: 0x00018488 File Offset: 0x00016688
protected internal virtual string[] GetSupportedAttributes()
{
return null;
}
/// <summary>Gets the custom trace listener attributes defined in the application configuration file.</summary>
/// <returns>A <see cref="T:System.Collections.Specialized.StringDictionary" /> containing the custom attributes for the trace listener.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000268 RID: 616
// (get) Token: 0x06000941 RID: 2369 RVA: 0x0001848C File Offset: 0x0001668C
public global::System.Collections.Specialized.StringDictionary Attributes
{
get
{
return this.attributes;
}
}
/// <summary>Gets and sets the trace filter for the trace listener.</summary>
/// <returns>An object derived from the <see cref="T:System.Diagnostics.TraceFilter" /> base class.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000269 RID: 617
// (get) Token: 0x06000942 RID: 2370 RVA: 0x00018494 File Offset: 0x00016694
// (set) Token: 0x06000943 RID: 2371 RVA: 0x0001849C File Offset: 0x0001669C
[ComVisible(false)]
public TraceFilter Filter
{
get
{
return this.filter;
}
set
{
this.filter = value;
}
}
/// <summary>Gets or sets the trace output options.</summary>
/// <returns>A bitwise combination of the enumeration values. The default is <see cref="F:System.Diagnostics.TraceOptions.None" />. </returns>
/// <exception cref="T:System.ArgumentOutOfRangeException">Set operation failed because the value is invalid.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x1700026A RID: 618
// (get) Token: 0x06000944 RID: 2372 RVA: 0x000184A8 File Offset: 0x000166A8
// (set) Token: 0x06000945 RID: 2373 RVA: 0x000184B0 File Offset: 0x000166B0
[ComVisible(false)]
public TraceOptions TraceOutputOptions
{
get
{
return this.options;
}
set
{
this.options = value;
}
}
// Token: 0x04000307 RID: 775
[ThreadStatic]
private int indentLevel;
// Token: 0x04000308 RID: 776
[ThreadStatic]
private int indentSize = 4;
// Token: 0x04000309 RID: 777
[ThreadStatic]
private global::System.Collections.Specialized.StringDictionary attributes = new global::System.Collections.Specialized.StringDictionary();
// Token: 0x0400030A RID: 778
[ThreadStatic]
private TraceFilter filter;
// Token: 0x0400030B RID: 779
[ThreadStatic]
private TraceOptions options;
// Token: 0x0400030C RID: 780
private string name;
// Token: 0x0400030D RID: 781
private bool needIndent = true;
}
}
@@ -0,0 +1,408 @@
using System;
using System.Collections;
namespace System.Diagnostics
{
/// <summary>Provides a thread-safe list of <see cref="T:System.Diagnostics.TraceListener" /> objects.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000103 RID: 259
public class TraceListenerCollection : ICollection, IEnumerable, IList
{
// Token: 0x06000946 RID: 2374 RVA: 0x000184BC File Offset: 0x000166BC
internal TraceListenerCollection()
: this(true)
{
}
// Token: 0x06000947 RID: 2375 RVA: 0x000184C8 File Offset: 0x000166C8
internal TraceListenerCollection(bool addDefault)
{
if (addDefault)
{
this.Add(new DefaultTraceListener());
}
}
/// <summary>Gets or sets the <see cref="T:System.Diagnostics.TraceListener" /> at the specified index in the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <returns>The <see cref="T:System.Diagnostics.TraceListener" /> at the specified index.</returns>
/// <param name="index">The zero-based index of the <paramref name="value" /> to get.</param>
// Token: 0x1700026B RID: 619
object IList.this[int index]
{
get
{
return this.listeners[index];
}
set
{
TraceListener traceListener = (TraceListener)value;
this.InitializeListener(traceListener);
this[index] = traceListener;
}
}
/// <summary>Gets a value indicating whether access to the <see cref="T:System.Diagnostics.TraceListenerCollection" /> is synchronized (thread safe).</summary>
/// <returns>Always true.</returns>
// Token: 0x1700026C RID: 620
// (get) Token: 0x0600094A RID: 2378 RVA: 0x00018528 File Offset: 0x00016728
bool ICollection.IsSynchronized
{
get
{
return this.listeners.IsSynchronized;
}
}
/// <summary>Gets an object that can be used to synchronize access to the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <returns>The current <see cref="T:System.Diagnostics.TraceListenerCollection" /> object.</returns>
// Token: 0x1700026D RID: 621
// (get) Token: 0x0600094B RID: 2379 RVA: 0x00018538 File Offset: 0x00016738
object ICollection.SyncRoot
{
get
{
return this.listeners.SyncRoot;
}
}
/// <summary>Gets a value indicating whether the <see cref="T:System.Diagnostics.TraceListenerCollection" /> has a fixed size.</summary>
/// <returns>Always false.</returns>
// Token: 0x1700026E RID: 622
// (get) Token: 0x0600094C RID: 2380 RVA: 0x00018548 File Offset: 0x00016748
bool IList.IsFixedSize
{
get
{
return this.listeners.IsFixedSize;
}
}
/// <summary>Gets a value indicating whether the <see cref="T:System.Diagnostics.TraceListenerCollection" /> is read-only</summary>
/// <returns>Always false.</returns>
// Token: 0x1700026F RID: 623
// (get) Token: 0x0600094D RID: 2381 RVA: 0x00018558 File Offset: 0x00016758
bool IList.IsReadOnly
{
get
{
return this.listeners.IsReadOnly;
}
}
/// <summary>Copies a section of the current <see cref="T:System.Diagnostics.TraceListenerCollection" /> to the specified array of <see cref="T:System.Diagnostics.TraceListener" /> objects. </summary>
/// <param name="array">The one-dimensional array of <see cref="T:System.Diagnostics.TraceListener" /> objects that is the destination of the elements copied from the <see cref="T:System.Diagnostics.TraceListenerCollection" />. The array must have zero-based indexing.</param>
/// <param name="index">The zero-based index in <paramref name="array" /> at which copying begins.</param>
// Token: 0x0600094E RID: 2382 RVA: 0x00018568 File Offset: 0x00016768
void ICollection.CopyTo(Array array, int index)
{
this.listeners.CopyTo(array, index);
}
/// <summary>Adds a trace listener to the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <returns>The position into which the new trace listener was inserted.</returns>
/// <param name="value">The object to add to the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="value" /> is null. -or-<paramref name="value" /> is not a <see cref="T:System.Diagnostics.TraceListener" />.</exception>
// Token: 0x0600094F RID: 2383 RVA: 0x00018578 File Offset: 0x00016778
int IList.Add(object value)
{
if (value is TraceListener)
{
return this.Add((TraceListener)value);
}
throw new NotSupportedException(global::Locale.GetText("You can only add TraceListener objects to the collection"));
}
/// <summary>Determines whether the <see cref="T:System.Diagnostics.TraceListenerCollection" /> contains a specific object.</summary>
/// <returns>true if the <see cref="T:System.Object" /> is found in the <see cref="T:System.Diagnostics.TraceListenerCollection" />; otherwise, false.</returns>
/// <param name="value">The object to locate in the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</param>
// Token: 0x06000950 RID: 2384 RVA: 0x000185A4 File Offset: 0x000167A4
bool IList.Contains(object value)
{
return value is TraceListener && this.listeners.Contains(value);
}
/// <summary>Determines the index of a specific object in the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <returns>The index of <paramref name="value" /> if found in the <see cref="T:System.Diagnostics.TraceListenerCollection" />; otherwise, -1.</returns>
/// <param name="value">The object to locate in the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</param>
// Token: 0x06000951 RID: 2385 RVA: 0x000185C0 File Offset: 0x000167C0
int IList.IndexOf(object value)
{
if (value is TraceListener)
{
return this.listeners.IndexOf(value);
}
return -1;
}
/// <summary>Inserts a <see cref="T:System.Diagnostics.TraceListener" /> object at the specified position in the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <param name="index">The zero-based index at which <paramref name="value" /> should be inserted.</param>
/// <param name="value">The <see cref="T:System.Diagnostics.TraceListener" /> object to insert into the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</param>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="value" /> is not a <see cref="T:System.Diagnostics.TraceListener" /> object.</exception>
// Token: 0x06000952 RID: 2386 RVA: 0x000185DC File Offset: 0x000167DC
void IList.Insert(int index, object value)
{
if (value is TraceListener)
{
this.Insert(index, (TraceListener)value);
return;
}
throw new NotSupportedException(global::Locale.GetText("You can only insert TraceListener objects into the collection"));
}
/// <summary>Removes an object from the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</summary>
/// <param name="value">The object to remove from the <see cref="T:System.Diagnostics.TraceListenerCollection" />.</param>
// Token: 0x06000953 RID: 2387 RVA: 0x00018614 File Offset: 0x00016814
void IList.Remove(object value)
{
if (value is TraceListener)
{
this.listeners.Remove(value);
}
}
/// <summary>Gets the number of listeners in the list.</summary>
/// <returns>The number of listeners in the list.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x17000270 RID: 624
// (get) Token: 0x06000954 RID: 2388 RVA: 0x00018630 File Offset: 0x00016830
public int Count
{
get
{
return this.listeners.Count;
}
}
/// <summary>Gets the first <see cref="T:System.Diagnostics.TraceListener" /> in the list with the specified name.</summary>
/// <returns>The first <see cref="T:System.Diagnostics.TraceListener" /> in the list with the given <see cref="P:System.Diagnostics.TraceListener.Name" />. This item returns null if no <see cref="T:System.Diagnostics.TraceListener" /> with the given name can be found.</returns>
/// <param name="name">The name of the <see cref="T:System.Diagnostics.TraceListener" /> to get from the list. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x17000271 RID: 625
public TraceListener this[string name]
{
get
{
object syncRoot = this.listeners.SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
if (traceListener.Name == name)
{
return traceListener;
}
}
}
return null;
}
}
/// <summary>Gets or sets the <see cref="T:System.Diagnostics.TraceListener" /> at the specified index.</summary>
/// <returns>A <see cref="T:System.Diagnostics.TraceListener" /> with the specified index.</returns>
/// <param name="i">The zero-based index of the <see cref="T:System.Diagnostics.TraceListener" /> to get from the list. </param>
/// <exception cref="T:System.ArgumentNullException">The value is null.</exception>
/// <filterpriority>2</filterpriority>
// Token: 0x17000272 RID: 626
public TraceListener this[int index]
{
get
{
return (TraceListener)this.listeners[index];
}
set
{
this.InitializeListener(value);
this.listeners[index] = value;
}
}
/// <summary>Adds a <see cref="T:System.Diagnostics.TraceListener" /> to the list.</summary>
/// <returns>The position at which the new listener was inserted.</returns>
/// <param name="listener">A <see cref="T:System.Diagnostics.TraceListener" /> to add to the list. </param>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000958 RID: 2392 RVA: 0x00018728 File Offset: 0x00016928
public int Add(TraceListener listener)
{
this.InitializeListener(listener);
return this.listeners.Add(listener);
}
// Token: 0x06000959 RID: 2393 RVA: 0x00018740 File Offset: 0x00016940
internal void Add(TraceListener listener, TraceImplSettings settings)
{
listener.IndentLevel = settings.IndentLevel;
listener.IndentSize = settings.IndentSize;
this.listeners.Add(listener);
}
// Token: 0x0600095A RID: 2394 RVA: 0x00018768 File Offset: 0x00016968
private void InitializeListener(TraceListener listener)
{
listener.IndentLevel = TraceImpl.IndentLevel;
listener.IndentSize = TraceImpl.IndentSize;
}
// Token: 0x0600095B RID: 2395 RVA: 0x00018780 File Offset: 0x00016980
private void InitializeRange(IList listeners)
{
int count = listeners.Count;
for (int num = 0; num != count; num++)
{
this.InitializeListener((TraceListener)listeners[num]);
}
}
/// <summary>Adds an array of <see cref="T:System.Diagnostics.TraceListener" /> objects to the list.</summary>
/// <param name="value">An array of <see cref="T:System.Diagnostics.TraceListener" /> objects to add to the list. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600095C RID: 2396 RVA: 0x000187B8 File Offset: 0x000169B8
public void AddRange(TraceListener[] value)
{
this.InitializeRange(value);
this.listeners.AddRange(value);
}
/// <summary>Adds the contents of another <see cref="T:System.Diagnostics.TraceListenerCollection" /> to the list.</summary>
/// <param name="value">Another <see cref="T:System.Diagnostics.TraceListenerCollection" /> whose contents are added to the list. </param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="value" /> is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x0600095D RID: 2397 RVA: 0x000187D0 File Offset: 0x000169D0
public void AddRange(TraceListenerCollection value)
{
this.InitializeRange(value);
this.listeners.AddRange(value.listeners);
}
/// <summary>Clears all the listeners from the list.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x0600095E RID: 2398 RVA: 0x000187EC File Offset: 0x000169EC
public void Clear()
{
this.listeners.Clear();
}
/// <summary>Checks whether the list contains the specified listener.</summary>
/// <returns>true if the listener is in the list; otherwise, false.</returns>
/// <param name="listener">A <see cref="T:System.Diagnostics.TraceListener" /> to find in the list. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x0600095F RID: 2399 RVA: 0x000187FC File Offset: 0x000169FC
public bool Contains(TraceListener listener)
{
return this.listeners.Contains(listener);
}
/// <summary>Copies a section of the current <see cref="T:System.Diagnostics.TraceListenerCollection" /> list to the specified array at the specified index.</summary>
/// <param name="listeners">An array of type <see cref="T:System.Array" /> to copy the elements into. </param>
/// <param name="index">The starting index number in the current list to copy from. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000960 RID: 2400 RVA: 0x0001880C File Offset: 0x00016A0C
public void CopyTo(TraceListener[] listeners, int index)
{
listeners.CopyTo(listeners, index);
}
/// <summary>Gets an enumerator for this list.</summary>
/// <returns>An enumerator of type <see cref="T:System.Collections.IEnumerator" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06000961 RID: 2401 RVA: 0x00018818 File Offset: 0x00016A18
public IEnumerator GetEnumerator()
{
return this.listeners.GetEnumerator();
}
/// <summary>Gets the index of the specified listener.</summary>
/// <returns>The index of the listener, if it can be found in the list; otherwise, -1.</returns>
/// <param name="listener">A <see cref="T:System.Diagnostics.TraceListener" /> to find in the list. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000962 RID: 2402 RVA: 0x00018828 File Offset: 0x00016A28
public int IndexOf(TraceListener listener)
{
return this.listeners.IndexOf(listener);
}
/// <summary>Inserts the listener at the specified index.</summary>
/// <param name="index">The position in the list to insert the new <see cref="T:System.Diagnostics.TraceListener" />. </param>
/// <param name="listener">A <see cref="T:System.Diagnostics.TraceListener" /> to insert in the list. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index" /> is not a valid index in the list. </exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="listener" /> is null.</exception>
/// <filterpriority>2</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000963 RID: 2403 RVA: 0x00018838 File Offset: 0x00016A38
public void Insert(int index, TraceListener listener)
{
this.InitializeListener(listener);
this.listeners.Insert(index, listener);
}
/// <summary>Removes from the collection the first <see cref="T:System.Diagnostics.TraceListener" /> with the specified name.</summary>
/// <param name="name">The name of the <see cref="T:System.Diagnostics.TraceListener" /> to remove from the list. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000964 RID: 2404 RVA: 0x00018850 File Offset: 0x00016A50
public void Remove(string name)
{
TraceListener traceListener = null;
object syncRoot = this.listeners.SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener2 = (TraceListener)obj;
if (traceListener2.Name == name)
{
traceListener = traceListener2;
break;
}
}
if (traceListener == null)
{
throw new ArgumentException(global::Locale.GetText("TraceListener " + name + " was not in the collection"));
}
this.listeners.Remove(traceListener);
}
}
/// <summary>Removes from the collection the specified <see cref="T:System.Diagnostics.TraceListener" />.</summary>
/// <param name="listener">A <see cref="T:System.Diagnostics.TraceListener" /> to remove from the list. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000965 RID: 2405 RVA: 0x00018940 File Offset: 0x00016B40
public void Remove(TraceListener listener)
{
this.listeners.Remove(listener);
}
/// <summary>Removes from the collection the <see cref="T:System.Diagnostics.TraceListener" /> at the specified index.</summary>
/// <param name="index">The zero-based index of the <see cref="T:System.Diagnostics.TraceListener" /> to remove from the list. </param>
/// <exception cref="T:System.ArgumentOutOfRangeException">The <paramref name="index" /> is not a valid index in the list. </exception>
/// <filterpriority>2</filterpriority>
// Token: 0x06000966 RID: 2406 RVA: 0x00018950 File Offset: 0x00016B50
public void RemoveAt(int index)
{
this.listeners.RemoveAt(index);
}
// Token: 0x0400030E RID: 782
private ArrayList listeners = ArrayList.Synchronized(new ArrayList(1));
}
}
+33
View File
@@ -0,0 +1,33 @@
using System;
namespace System.Diagnostics
{
/// <summary>Specifies trace data options to be written to the trace output.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000104 RID: 260
[Flags]
public enum TraceOptions
{
/// <summary>Do not write any elements.</summary>
// Token: 0x04000310 RID: 784
None = 0,
/// <summary>Write the logical operation stack, which is represented by the return value of the <see cref="P:System.Diagnostics.CorrelationManager.LogicalOperationStack" /> property.</summary>
// Token: 0x04000311 RID: 785
LogicalOperationStack = 1,
/// <summary>Write the date and time. </summary>
// Token: 0x04000312 RID: 786
DateTime = 2,
/// <summary>Write the timestamp, which is represented by the return value of the <see cref="M:System.Diagnostics.Stopwatch.GetTimestamp" /> method.</summary>
// Token: 0x04000313 RID: 787
Timestamp = 4,
/// <summary>Write the process identity, which is represented by the return value of the <see cref="P:System.Diagnostics.Process.Id" /> property.</summary>
// Token: 0x04000314 RID: 788
ProcessId = 8,
/// <summary>Write the thread identity, which is represented by the return value of the <see cref="P:System.Threading.Thread.ManagedThreadId" /> property for the current thread.</summary>
// Token: 0x04000315 RID: 789
ThreadId = 16,
/// <summary>Write the call stack, which is represented by the return value of the <see cref="P:System.Environment.StackTrace" /> property.</summary>
// Token: 0x04000316 RID: 790
Callstack = 32
}
}
+384
View File
@@ -0,0 +1,384 @@
using System;
using System.Collections;
using System.Collections.Specialized;
namespace System.Diagnostics
{
/// <summary>Provides a set of methods and properties that enable applications to trace the execution of code and associate trace messages with their source. </summary>
/// <filterpriority>1</filterpriority>
// Token: 0x02000105 RID: 261
public class TraceSource
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceSource" /> class, using the specified name for the source. </summary>
/// <param name="name">The name of the source, typically the name of the application.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is an empty string ("").</exception>
// Token: 0x06000967 RID: 2407 RVA: 0x00018960 File Offset: 0x00016B60
public TraceSource(string name)
: this(name, SourceLevels.Off)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceSource" /> class, using the specified name for the source and the default source level at which tracing is to occur. </summary>
/// <param name="name">The name of the source, typically the name of the application.</param>
/// <param name="defaultLevel">A bitwise combination of the <see cref="T:System.Diagnostics.SourceLevels" /> values that specifies the default source level at which to trace.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="name" /> is null.</exception>
/// <exception cref="T:System.ArgumentException">
/// <paramref name="name" /> is an empty string ("").</exception>
// Token: 0x06000968 RID: 2408 RVA: 0x0001896C File Offset: 0x00016B6C
public TraceSource(string name, SourceLevels sourceLevels)
{
if (name == null)
{
throw new ArgumentNullException("name");
}
Hashtable hashtable = null;
TraceSourceInfo traceSourceInfo = ((hashtable == null) ? null : (hashtable[name] as TraceSourceInfo));
this.source_switch = new SourceSwitch(name);
if (traceSourceInfo == null)
{
this.listeners = new TraceListenerCollection();
}
else
{
this.source_switch.Level = traceSourceInfo.Levels;
this.listeners = traceSourceInfo.Listeners;
}
}
/// <summary>Gets the custom switch attributes defined in the application configuration file.</summary>
/// <returns>A <see cref="T:System.Collections.Specialized.StringDictionary" /> containing the custom attributes for the trace switch.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000273 RID: 627
// (get) Token: 0x06000969 RID: 2409 RVA: 0x000189EC File Offset: 0x00016BEC
public global::System.Collections.Specialized.StringDictionary Attributes
{
get
{
return this.source_switch.Attributes;
}
}
/// <summary>Gets the collection of trace listeners for the trace source.</summary>
/// <returns>A <see cref="T:System.Diagnostics.TraceListenerCollection" /> that contains the active trace listeners associated with the source. </returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000274 RID: 628
// (get) Token: 0x0600096A RID: 2410 RVA: 0x000189FC File Offset: 0x00016BFC
public TraceListenerCollection Listeners
{
get
{
return this.listeners;
}
}
/// <summary>Gets the name of the trace source.</summary>
/// <returns>The name of the trace source.</returns>
/// <filterpriority>1</filterpriority>
// Token: 0x17000275 RID: 629
// (get) Token: 0x0600096B RID: 2411 RVA: 0x00018A04 File Offset: 0x00016C04
public string Name
{
get
{
return this.source_switch.DisplayName;
}
}
/// <summary>Gets or sets the source switch value.</summary>
/// <returns>A <see cref="T:System.Diagnostics.SourceSwitch" /> object representing the source switch value.</returns>
/// <exception cref="T:System.ArgumentNullException">
/// <see cref="P:System.Diagnostics.TraceSource.Switch" /> is set to null.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x17000276 RID: 630
// (get) Token: 0x0600096C RID: 2412 RVA: 0x00018A14 File Offset: 0x00016C14
// (set) Token: 0x0600096D RID: 2413 RVA: 0x00018A1C File Offset: 0x00016C1C
public SourceSwitch Switch
{
get
{
return this.source_switch;
}
set
{
if (value == null)
{
throw new ArgumentNullException("value");
}
this.source_switch = value;
}
}
/// <summary>Closes all the trace listeners in the trace listener collection.</summary>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode" />
/// </PermissionSet>
// Token: 0x0600096E RID: 2414 RVA: 0x00018A38 File Offset: 0x00016C38
public void Close()
{
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Close();
}
}
}
/// <summary>Flushes all the trace listeners in the trace listener collection.</summary>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
// Token: 0x0600096F RID: 2415 RVA: 0x00018ADC File Offset: 0x00016CDC
public void Flush()
{
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.Flush();
}
}
}
/// <summary>Writes trace data to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified event type, event identifier, and trace data.</summary>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values that specifies the event type of the trace data.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="data">The trace data.</param>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000970 RID: 2416 RVA: 0x00018B80 File Offset: 0x00016D80
[Conditional("TRACE")]
public void TraceData(TraceEventType eventType, int id, object data)
{
if (!this.source_switch.ShouldTrace(eventType))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceData(null, this.Name, eventType, id, data);
}
}
}
/// <summary>Writes trace data to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified event type, event identifier, and trace data array.</summary>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values that specifies the event type of the trace data.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="data">An object array containing the trace data.</param>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000971 RID: 2417 RVA: 0x00018C40 File Offset: 0x00016E40
[Conditional("TRACE")]
public void TraceData(TraceEventType eventType, int id, params object[] data)
{
if (!this.source_switch.ShouldTrace(eventType))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceData(null, this.Name, eventType, id, data);
}
}
}
/// <summary>Writes a trace event message to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified event type and event identifier.</summary>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values that specifies the event type of the trace data.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000972 RID: 2418 RVA: 0x00018D00 File Offset: 0x00016F00
[Conditional("TRACE")]
public void TraceEvent(TraceEventType eventType, int id)
{
if (!this.source_switch.ShouldTrace(eventType))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceEvent(null, this.Name, eventType, id);
}
}
}
/// <summary>Writes a trace event message to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified event type, event identifier, and message.</summary>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values that specifies the event type of the trace data.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="message">The trace message to write.</param>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000973 RID: 2419 RVA: 0x00018DC0 File Offset: 0x00016FC0
[Conditional("TRACE")]
public void TraceEvent(TraceEventType eventType, int id, string message)
{
if (!this.source_switch.ShouldTrace(eventType))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceEvent(null, this.Name, eventType, id, message);
}
}
}
/// <summary>Writes a trace event to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified event type, event identifier, and argument array and format.</summary>
/// <param name="eventType">One of the <see cref="T:System.Diagnostics.TraceEventType" /> values that specifies the event type of the trace data.</param>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="format">A composite format string (see Remarks) that contains text intermixed with zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An object array containing zero or more objects to format.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="format" /> is null. </exception>
/// <exception cref="T:System.FormatException">
/// <paramref name="format" /> is invalid.-or- The number that indicates an argument to format is less than zero, or greater than or equal to the number of specified objects to format. </exception>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000974 RID: 2420 RVA: 0x00018E80 File Offset: 0x00017080
[Conditional("TRACE")]
public void TraceEvent(TraceEventType eventType, int id, string format, params object[] args)
{
if (!this.source_switch.ShouldTrace(eventType))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceEvent(null, this.Name, eventType, id, format, args);
}
}
}
/// <summary>Writes an informational message to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified message.</summary>
/// <param name="message">The informative message to write.</param>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000975 RID: 2421 RVA: 0x00018F44 File Offset: 0x00017144
[Conditional("TRACE")]
public void TraceInformation(string format)
{
}
/// <summary>Writes an informational message to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified object array and formatting information.</summary>
/// <param name="format">A composite format string (see Remarks) that contains text intermixed with zero or more format items, which correspond to objects in the <paramref name="args" /> array.</param>
/// <param name="args">An array containing zero or more objects to format.</param>
/// <exception cref="T:System.ArgumentNullException">
/// <paramref name="format" /> is null. </exception>
/// <exception cref="T:System.FormatException">
/// <paramref name="format" /> is invalid.-or- The number that indicates an argument to format is less than zero, or greater than or equal to the number of specified objects to format. </exception>
/// <exception cref="T:System.ObjectDisposedException">An attempt was made to trace an event during finalization.</exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.EnvironmentPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x06000976 RID: 2422 RVA: 0x00018F48 File Offset: 0x00017148
[Conditional("TRACE")]
public void TraceInformation(string format, params object[] args)
{
}
/// <summary>Writes a trace transfer message to the trace listeners in the <see cref="P:System.Diagnostics.TraceSource.Listeners" /> collection using the specified numeric identifier, message, and related activity identifier.</summary>
/// <param name="id">A numeric identifier for the event.</param>
/// <param name="message">The trace message to write.</param>
/// <param name="relatedActivityId">A <see cref="T:System.Guid" /> structure that identifies the related activity.</param>
/// <filterpriority>1</filterpriority>
// Token: 0x06000977 RID: 2423 RVA: 0x00018F4C File Offset: 0x0001714C
[Conditional("TRACE")]
public void TraceTransfer(int id, string message, Guid relatedActivityId)
{
if (!this.source_switch.ShouldTrace(TraceEventType.Transfer))
{
return;
}
object syncRoot = ((ICollection)this.listeners).SyncRoot;
lock (syncRoot)
{
foreach (object obj in this.listeners)
{
TraceListener traceListener = (TraceListener)obj;
traceListener.TraceTransfer(null, this.Name, id, message, relatedActivityId);
}
}
}
/// <summary>Gets the custom attributes supported by the trace source.</summary>
/// <returns>A string array naming the custom attributes supported by the trace source, or null if there are no custom attributes.</returns>
// Token: 0x06000978 RID: 2424 RVA: 0x00019010 File Offset: 0x00017210
protected virtual string[] GetSupportedAttributes()
{
return null;
}
// Token: 0x04000317 RID: 791
private SourceSwitch source_switch;
// Token: 0x04000318 RID: 792
private TraceListenerCollection listeners;
}
}
+64
View File
@@ -0,0 +1,64 @@
using System;
namespace System.Diagnostics
{
// Token: 0x02000106 RID: 262
internal class TraceSourceInfo
{
// Token: 0x06000979 RID: 2425 RVA: 0x00019014 File Offset: 0x00017214
public TraceSourceInfo(string name, SourceLevels levels)
{
this.name = name;
this.levels = levels;
this.listeners = new TraceListenerCollection();
}
// Token: 0x0600097A RID: 2426 RVA: 0x00019038 File Offset: 0x00017238
internal TraceSourceInfo(string name, SourceLevels levels, TraceImplSettings settings)
{
this.name = name;
this.levels = levels;
this.listeners = new TraceListenerCollection(false);
this.listeners.Add(new DefaultTraceListener(), settings);
}
// Token: 0x17000277 RID: 631
// (get) Token: 0x0600097B RID: 2427 RVA: 0x0001906C File Offset: 0x0001726C
public string Name
{
get
{
return this.name;
}
}
// Token: 0x17000278 RID: 632
// (get) Token: 0x0600097C RID: 2428 RVA: 0x00019074 File Offset: 0x00017274
public SourceLevels Levels
{
get
{
return this.levels;
}
}
// Token: 0x17000279 RID: 633
// (get) Token: 0x0600097D RID: 2429 RVA: 0x0001907C File Offset: 0x0001727C
public TraceListenerCollection Listeners
{
get
{
return this.listeners;
}
}
// Token: 0x04000319 RID: 793
private string name;
// Token: 0x0400031A RID: 794
private SourceLevels levels;
// Token: 0x0400031B RID: 795
private TraceListenerCollection listeners;
}
}
+148
View File
@@ -0,0 +1,148 @@
using System;
namespace System.Diagnostics
{
/// <summary>Provides a multilevel switch to control tracing and debug output without recompiling your code.</summary>
/// <filterpriority>2</filterpriority>
// Token: 0x02000107 RID: 263
[SwitchLevel(typeof(TraceLevel))]
public class TraceSwitch : Switch
{
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceSwitch" /> class, using the specified display name and description.</summary>
/// <param name="displayName">The name to display on a user interface. </param>
/// <param name="description">The description of the switch. </param>
// Token: 0x0600097E RID: 2430 RVA: 0x00019084 File Offset: 0x00017284
public TraceSwitch(string displayName, string description)
: base(displayName, description)
{
}
/// <summary>Initializes a new instance of the <see cref="T:System.Diagnostics.TraceSwitch" /> class, using the specified display name, description, and default value for the switch. </summary>
/// <param name="displayName">The name to display on a user interface. </param>
/// <param name="description">The description of the switch. </param>
/// <param name="defaultSwitchValue">The default value of the switch.</param>
// Token: 0x0600097F RID: 2431 RVA: 0x00019090 File Offset: 0x00017290
public TraceSwitch(string displayName, string description, string defaultSwitchValue)
: base(displayName, description)
{
base.Value = defaultSwitchValue;
}
/// <summary>Gets or sets the trace level that determines the messages the switch allows.</summary>
/// <returns>One of the <see cref="T:System.Diagnostics.TraceLevel" /> values that that specifies the level of messages that are allowed by the switch.</returns>
/// <exception cref="T:System.ArgumentException">
/// <see cref="P:System.Diagnostics.TraceSwitch.Level" /> is set to a value that is not one of the <see cref="T:System.Diagnostics.TraceLevel" /> values. </exception>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="UnmanagedCode, ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700027A RID: 634
// (get) Token: 0x06000980 RID: 2432 RVA: 0x000190A4 File Offset: 0x000172A4
// (set) Token: 0x06000981 RID: 2433 RVA: 0x000190AC File Offset: 0x000172AC
public TraceLevel Level
{
get
{
return (TraceLevel)base.SwitchSetting;
}
set
{
if (!Enum.IsDefined(typeof(TraceLevel), value))
{
throw new ArgumentException("value");
}
base.SwitchSetting = (int)value;
}
}
/// <summary>Gets a value indicating whether the switch allows error-handling messages.</summary>
/// <returns>true if the <see cref="P:System.Diagnostics.TraceSwitch.Level" /> property is set to <see cref="F:System.Diagnostics.TraceLevel.Error" />, <see cref="F:System.Diagnostics.TraceLevel.Warning" />, <see cref="F:System.Diagnostics.TraceLevel.Info" />, or <see cref="F:System.Diagnostics.TraceLevel.Verbose" />; otherwise, false.</returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700027B RID: 635
// (get) Token: 0x06000982 RID: 2434 RVA: 0x000190E8 File Offset: 0x000172E8
public bool TraceError
{
get
{
return base.SwitchSetting >= 1;
}
}
/// <summary>Gets a value indicating whether the switch allows warning messages.</summary>
/// <returns>true if the <see cref="P:System.Diagnostics.TraceSwitch.Level" /> property is set to <see cref="F:System.Diagnostics.TraceLevel.Warning" />, <see cref="F:System.Diagnostics.TraceLevel.Info" />, or <see cref="F:System.Diagnostics.TraceLevel.Verbose" />; otherwise, false.</returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700027C RID: 636
// (get) Token: 0x06000983 RID: 2435 RVA: 0x000190F8 File Offset: 0x000172F8
public bool TraceWarning
{
get
{
return base.SwitchSetting >= 2;
}
}
/// <summary>Gets a value indicating whether the switch allows informational messages.</summary>
/// <returns>true if the <see cref="P:System.Diagnostics.TraceSwitch.Level" /> property is set to <see cref="F:System.Diagnostics.TraceLevel.Info" /> or <see cref="F:System.Diagnostics.TraceLevel.Verbose" />; otherwise, false. </returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700027D RID: 637
// (get) Token: 0x06000984 RID: 2436 RVA: 0x00019108 File Offset: 0x00017308
public bool TraceInfo
{
get
{
return base.SwitchSetting >= 3;
}
}
/// <summary>Gets a value indicating whether the switch allows all messages.</summary>
/// <returns>true if the <see cref="P:System.Diagnostics.TraceSwitch.Level" /> property is set to <see cref="F:System.Diagnostics.TraceLevel.Verbose" />; otherwise, false.</returns>
/// <filterpriority>1</filterpriority>
/// <PermissionSet>
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Unrestricted="true" />
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="ControlEvidence" />
/// </PermissionSet>
// Token: 0x1700027E RID: 638
// (get) Token: 0x06000985 RID: 2437 RVA: 0x00019118 File Offset: 0x00017318
public bool TraceVerbose
{
get
{
return base.SwitchSetting >= 4;
}
}
/// <summary>Updates and corrects the level for this switch.</summary>
// Token: 0x06000986 RID: 2438 RVA: 0x00019128 File Offset: 0x00017328
protected override void OnSwitchSettingChanged()
{
if (base.SwitchSetting < 0)
{
base.SwitchSetting = 0;
}
else if (base.SwitchSetting > 4)
{
base.SwitchSetting = 4;
}
}
/// <summary>Sets the <see cref="P:System.Diagnostics.Switch.SwitchSetting" /> property to the integer equivalent of the <see cref="P:System.Diagnostics.Switch.Value" /> property.</summary>
// Token: 0x06000987 RID: 2439 RVA: 0x00019160 File Offset: 0x00017360
protected override void OnValueChanged()
{
base.SwitchSetting = (int)Enum.Parse(typeof(TraceLevel), base.Value, true);
}
}
}