-
Notifications
You must be signed in to change notification settings - Fork 1
Process Structure
The System.Diagnostics
namespace defines a number of types that allow you to programmatically interact
with Windows processes and various diagnostic-related types. The System.Diagnostics.Process
class defines several
useful methods and fields for interacting with a Windows process. This is pretty neat, you can look up and control
pretty much any process. Some things you can access with Process
are things like its PID, Name, Threads, Modules (*.dll
and *.exe
), and more.
Each process has a primary thread which is created when entering Main()
.
A Windows Process does not directly run an executable, instead applications run within an application domain.
Application domains are logical partitions for assemblies and executables that are independent from one-another.
A process can host several application domains, though, usually only the default application domain is needed.
The default domain is created automatically for a .NET executable.
You can interact with application domains through the System.AppDomain
class.
Each application domain also contains logical containers called contexts. These provide a context for certain objects to run under.
- The default context is context 0.
- Context-agile objects do not demand special contextual treatment.
- Context-bound objects need special contextual treatment.
Context-bound objects have two main requirements. The first is that they are marked with an attribute from
a special class of .NET attributes called context attributes. These attributes derive from the ContextAttribute
base class. The other requirement is that the object derives from ContextBoundObject
. Otherwise, the CLR
might move the objects outside of its required context.
- Abstract Classes
- Access Modifiers
- Anonymous Methods
- Anonymous Types
- Arrays
- Attributes
- Console I/O
- Constructors
- Const Fields
- Delegates
- Enums
- Exceptions
- Extension Methods
- File IO
- Generics
- Interfaces
- Iterators
- LINQ
- Main
- Null Operators
- Parameters
- Polymorphism
- Virtual Functions
- Reflection
- Serialization
- Strings
- Value Types
- "Base" Keyword
- "Is" and "As"
- "Sealed" Keyword
- nameof expression