This class manages Processes running with Typemock Isolator.
Inheritance Hierarchy
SystemMarshalByRefObject
System.ComponentModelComponent
System.DiagnosticsProcess
TypeMock.IntegrationTypeMockProcess
Namespace: TypeMock.Integration
Assembly: TypeMock.Integration (in TypeMock.Integration.dll) Version: 8.0.0.0 (8.0.0.0)
Syntax
The TypeMockProcess type exposes the following members.
Constructors
| Name | Description | |
|---|---|---|
| TypeMockProcess(ProcessStartInfo) |
Create a new process with Typemock Isolator enabled
| |
| TypeMockProcess(ProcessStartInfo, Boolean) |
Create a new process with Typemock Isolator enabled
| |
| TypeMockProcess(ProcessStartInfo, String) |
Create a new process with Typemock Isolator enabled and
a code coverage tool linked
|
Properties
| Name | Description | |
|---|---|---|
| BasePriority | Gets the base priority of the associated process. (Inherited from Process.) | |
| Blocking | ||
| CanRaiseEvents | Gets a value indicating whether the component can raise an event. (Inherited from Component.) | |
| Events | Gets the list of event handlers that are attached to this Component. (Inherited from Component.) | |
| HandleCount | Gets the number of handles opened by the process. (Inherited from Process.) | |
| Id | Gets the unique identifier for the associated process. (Inherited from Process.) | |
| MainWindowHandle | Gets the window handle of the main window of the associated process. (Inherited from Process.) | |
| MainWindowTitle | Gets the caption of the main window of the process. (Inherited from Process.) | |
| MaxWorkingSet | Gets or sets the maximum allowable working set size for the associated process. (Inherited from Process.) | |
| MinWorkingSet | Gets or sets the minimum allowable working set size for the associated process. (Inherited from Process.) | |
| NonpagedSystemMemorySize | Obsolete. Gets the nonpaged system memory size allocated to this process. (Inherited from Process.) | |
| NonpagedSystemMemorySize64 | Gets the amount of nonpaged system memory allocated for the associated process. (Inherited from Process.) | |
| PagedMemorySize | Obsolete. Gets the paged memory size. (Inherited from Process.) | |
| PagedMemorySize64 | Gets the amount of paged memory allocated for the associated process. (Inherited from Process.) | |
| PagedSystemMemorySize | Obsolete. Gets the paged system memory size. (Inherited from Process.) | |
| PagedSystemMemorySize64 | Gets the amount of pageable system memory allocated for the associated process. (Inherited from Process.) | |
| PeakPagedMemorySize | Obsolete. Gets the peak paged memory size. (Inherited from Process.) | |
| PeakPagedMemorySize64 | Gets the maximum amount of memory in the virtual memory paging file used by the associated process. (Inherited from Process.) | |
| PeakVirtualMemorySize | Obsolete. Gets the peak virtual memory size. (Inherited from Process.) | |
| PeakVirtualMemorySize64 | Gets the maximum amount of virtual memory used by the associated process. (Inherited from Process.) | |
| PeakWorkingSet | Obsolete. Gets the peak working set size for the associated process. (Inherited from Process.) | |
| PeakWorkingSet64 | Gets the maximum amount of physical memory used by the associated process. (Inherited from Process.) | |
| PriorityBoostEnabled | 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. (Inherited from Process.) | |
| PriorityClass | Gets or sets the overall priority category for the associated process. (Inherited from Process.) | |
| PrivateMemorySize | Obsolete. Gets the private memory size. (Inherited from Process.) | |
| PrivateMemorySize64 | Gets the amount of private memory allocated for the associated process. (Inherited from Process.) | |
| PrivilegedProcessorTime | Gets the privileged processor time for this process. (Inherited from Process.) | |
| ProcessName | Gets the name of the process. (Inherited from Process.) | |
| ProcessorAffinity | Gets or sets the processors on which the threads in this process can be scheduled to run. (Inherited from Process.) | |
| Responding | Gets a value indicating whether the user interface of the process is responding. (Inherited from Process.) | |
| SessionId | Gets the Terminal Services session identifier for the associated process. (Inherited from Process.) | |
| StartTime | Gets the time that the associated process was started. (Inherited from Process.) | |
| TotalProcessorTime | Gets the total processor time for this process. (Inherited from Process.) | |
| UserProcessorTime | Gets the user processor time for this process. (Inherited from Process.) | |
| VirtualMemorySize | Obsolete. Gets the size of the process's virtual memory. (Inherited from Process.) | |
| VirtualMemorySize64 | Gets the amount of the virtual memory allocated for the associated process. (Inherited from Process.) | |
| WorkingSet | Obsolete. Gets the associated process's physical memory usage. (Inherited from Process.) | |
| WorkingSet64 | Gets the amount of physical memory allocated for the associated process. (Inherited from Process.) |
Methods
| Name | Description | |
|---|---|---|
| BeginErrorReadLine | Begins asynchronous read operations on the redirected StandardError stream of the application. (Inherited from Process.) | |
| BeginOutputReadLine | Begins asynchronous read operations on the redirected StandardOutput stream of the application. (Inherited from Process.) | |
| CancelErrorRead | Cancels the asynchronous read operation on the redirected StandardError stream of an application. (Inherited from Process.) | |
| CancelOutputRead | Cancels the asynchronous read operation on the redirected StandardOutput stream of an application. (Inherited from Process.) | |
| Close | Frees all the resources that are associated with this component. (Inherited from Process.) | |
| CloseMainWindow | Closes a process that has a user interface by sending a close message to its main window. (Inherited from Process.) | |
| CreateObjRef | Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from MarshalByRefObject.) | |
| DisableTypeMockOnProcess |
Disable Typemock Isolator on process
| |
| DisableTypeMockOnProcess(Process) |
Disable Typemock Isolator on process
| |
| Dispose | Releases all resources used by the Component. (Inherited from Component.) | |
| Dispose(Boolean) |
Note: Dispose is already implemented by Process base class
(Overrides ProcessDispose(Boolean).) | |
| Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
| Finalize | Releases unmanaged resources and performs other cleanup operations before the Component is reclaimed by garbage collection. (Inherited from Component.) | |
| GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
| GetLifetimeService | Retrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| GetService | Returns an object that represents a service provided by the Component or by its Container. (Inherited from Component.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| InitializeLifetimeService | Obtains a lifetime service object to control the lifetime policy for this instance. (Inherited from MarshalByRefObject.) | |
| IsEnabled |
Use to determain if Typemock Isolator is enabled on process
| |
| IsEnabled(Process) |
Use to determain if Typemock Isolator is enabled on process
| |
| Kill | Immediately stops the associated process. (Inherited from Process.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| MemberwiseClone(Boolean) | Creates a shallow copy of the current MarshalByRefObject object. (Inherited from MarshalByRefObject.) | |
| OnExited | Raises the Exited event. (Inherited from Process.) | |
| PrepareTypeMockProcess |
Enable Typemock Isolator on process
| |
| PrepareTypeMockProcess(Process) |
Enables Typemock Isolator on process
| |
| Refresh | Discards any information about the associated process that has been cached inside the process component. (Inherited from Process.) | |
| Start |
Starts new process with Typemock Isolator enabled
| |
| Start(ProcessStartInfo) |
Starts new process with Typemock Isolator enabled
| |
| Start(String) |
Starts new process with Typemock Isolator enabled.
| |
| Start(ProcessStartInfo, Boolean) | ||
| Start(ProcessStartInfo, String) |
Starts new process with Typemock Isolator enabled and a coverage profiler linked
| |
| Start(String, String) |
Starts new process with Typemock Isolator enabled.
| |
| Start(ProcessStartInfo, String, Boolean) | ||
| ToString | Formats the process's name as a string, combined with the parent component type, if applicable. (Inherited from Process.) | |
| UnlinkWithCovarage |
Unlinks coverage profiler
| |
| WaitForExit | Instructs the Process component to wait indefinitely for the associated process to exit. (Inherited from Process.) | |
| WaitForExit(Int32) | Instructs the Process component to wait the specified number of milliseconds for the associated process to exit. (Inherited from Process.) | |
| WaitForInputIdle | Causes the 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. (Inherited from Process.) | |
| WaitForInputIdle(Int32) | Causes the 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. (Inherited from Process.) |
Events
| Name | Description | |
|---|---|---|
| ErrorDataReceived | Occurs when an application writes to its redirected StandardError stream. (Inherited from Process.) | |
| Exited | Occurs when a process exits. (Inherited from Process.) | |
| OutputDataReceived | Occurs when an application writes to its redirected StandardOutput stream. (Inherited from Process.) |
Remarks
| All actions that are on process object should be before the process starts running |
Examples
C#
public void RunTest() { ProcessStartInfo info = new ProcessStartInfo(UnitTestRunner, UnitTestRunnerParams); using(typeMockProcess.Start(info)) { } }
See Also