DotNetDupe
4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
Toggle main menu visibility
Loading...
Searching...
No Matches
ProcessStreamer.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
Common.h
"
4
#include "
System/Object.h
"
5
#include "
System/String.h
"
6
#include "
System/EventArgs.h
"
7
#include "
System/EventHandler.h
"
8
#include "
System/SmartPointer.h
"
9
#include "
System/Exception.h
"
10
#include "
System/Collections/Generic/List.h
"
11
#include "
System/Diagnostics/SystemMetrics.h
"
12
#include "
System/Diagnostics/ProcessStreamOptions.h
"
13
14
namespace
DotNetDupe
{
15
namespace
System
{
16
namespace
Diagnostics
{
17
20
class
ProcessEventArgs
:
public
EventArgs
{
21
public
:
24
explicit
ProcessEventArgs
(
const
ProcessInfo
& proc) : m_proc(proc) {}
25
28
const
ProcessInfo
&
GetProcess
()
const
{
return
m_proc; }
29
30
private
:
31
ProcessInfo
m_proc;
32
};
33
36
class
ProcessBatchEventArgs
:
public
EventArgs
{
37
public
:
40
explicit
ProcessBatchEventArgs
(
const
Collections::Generic::List<ProcessInfo>
& lstBatch)
41
: m_lstBatch(lstBatch) {}
42
45
const
Collections::Generic::List<ProcessInfo>
&
GetBatch
()
const
{
return
m_lstBatch; }
46
47
private
:
48
Collections::Generic::List<ProcessInfo>
m_lstBatch;
49
};
50
53
class
ProcessStreamErrorEventArgs
:
public
EventArgs
{
54
public
:
57
explicit
ProcessStreamErrorEventArgs
(
const
String
& sErrorMessage)
58
: m_sErrorMessage(sErrorMessage) {}
59
62
String
GetErrorMessage
()
const
{
return
m_sErrorMessage; }
63
64
private
:
65
String
m_sErrorMessage;
66
};
67
73
class
ProcessStreamer
:
public
virtual
Object
{
74
private
:
75
class
Impl;
76
SmartPointer<Impl>
m_pImpl;
77
78
public
:
79
EventHandler<ProcessEventArgs>
&
ProcessDiscovered
;
80
EventHandler<ProcessBatchEventArgs>
&
BatchReady
;
81
EventHandler<ProcessEventArgs>
&
ProcessUpdated
;
82
EventHandler<>
&
Completed
;
83
EventHandler<ProcessStreamErrorEventArgs>
&
Error
;
84
87
DOTNETDUPE_API
explicit
ProcessStreamer
(
const
ProcessStreamOptions
& options =
ProcessStreamOptions
());
88
90
DOTNETDUPE_API
~ProcessStreamer
()
override
;
91
93
DOTNETDUPE_API
void
Start
();
94
96
DOTNETDUPE_API
void
Cancel
();
97
100
DOTNETDUPE_API
bool
IsRunning
()
const
;
101
104
DOTNETDUPE_API
ProcessStreamOptions
GetOptions
()
const
;
105
};
106
107
}
108
}
109
}
Common.h
Defines common cross-platform macros, export decorators, and fundamental types.
DOTNETDUPE_API
#define DOTNETDUPE_API
Platform-specific linkage decoration for exporting or importing library symbols.
Definition
Common.h:20
EventArgs.h
Represents the base class for classes that contain event data.
EventHandler.h
Represents the method that will handle an event when the event provides data.
Exception.h
Represents errors that occur during application execution and serves as the ultimate base exception.
List.h
Represents a strongly typed list of objects that can be accessed by index mirroring ....
Object.h
Base object class for DotNetDupe mirroring .NET System.Object.
ProcessStreamOptions.h
SmartPointer.h
Provides reference-counted and weak pointer memory management primitives ensuring zero raw ownership.
String.h
High-performance UTF-8 / UTF-16 string manipulation class mirroring .NET System.String.
SystemMetrics.h
DotNetDupe::System::Collections::Generic::List
Represents a strongly typed list of objects accessible by index.
Definition
List.h:29
DotNetDupe::System::Diagnostics::ProcessBatchEventArgs::ProcessBatchEventArgs
ProcessBatchEventArgs(const Collections::Generic::List< ProcessInfo > &lstBatch)
Constructs batch event args.
Definition
ProcessStreamer.h:40
DotNetDupe::System::Diagnostics::ProcessBatchEventArgs::GetBatch
const Collections::Generic::List< ProcessInfo > & GetBatch() const
Gets the batch list.
Definition
ProcessStreamer.h:45
DotNetDupe::System::Diagnostics::ProcessEventArgs::GetProcess
const ProcessInfo & GetProcess() const
Gets the process info.
Definition
ProcessStreamer.h:28
DotNetDupe::System::Diagnostics::ProcessEventArgs::ProcessEventArgs
ProcessEventArgs(const ProcessInfo &proc)
Constructs event args with process info.
Definition
ProcessStreamer.h:24
DotNetDupe::System::Diagnostics::ProcessStreamErrorEventArgs::GetErrorMessage
String GetErrorMessage() const
Gets the error message.
Definition
ProcessStreamer.h:62
DotNetDupe::System::Diagnostics::ProcessStreamErrorEventArgs::ProcessStreamErrorEventArgs
ProcessStreamErrorEventArgs(const String &sErrorMessage)
Constructs error event args.
Definition
ProcessStreamer.h:57
DotNetDupe::System::Diagnostics::ProcessStreamer::BatchReady
EventHandler< ProcessBatchEventArgs > & BatchReady
Definition
ProcessStreamer.h:80
DotNetDupe::System::Diagnostics::ProcessStreamer::GetOptions
ProcessStreamOptions GetOptions() const
Gets the configuration options.
Definition
ProcessStreamer.cpp:246
DotNetDupe::System::Diagnostics::ProcessStreamer::Cancel
void Cancel()
Cancels background streaming.
Definition
ProcessStreamer.cpp:238
DotNetDupe::System::Diagnostics::ProcessStreamer::ProcessUpdated
EventHandler< ProcessEventArgs > & ProcessUpdated
Definition
ProcessStreamer.h:81
DotNetDupe::System::Diagnostics::ProcessStreamer::Start
void Start()
Starts background process streaming.
Definition
ProcessStreamer.cpp:233
DotNetDupe::System::Diagnostics::ProcessStreamer::Error
EventHandler< ProcessStreamErrorEventArgs > & Error
Definition
ProcessStreamer.h:83
DotNetDupe::System::Diagnostics::ProcessStreamer::IsRunning
bool IsRunning() const
Gets whether streaming is active.
Definition
ProcessStreamer.cpp:242
DotNetDupe::System::Diagnostics::ProcessStreamer::ProcessStreamer
ProcessStreamer(const ProcessStreamOptions &options=ProcessStreamOptions())
Initializes a new instance of the ProcessStreamer class with options.
Definition
ProcessStreamer.cpp:223
DotNetDupe::System::Diagnostics::ProcessStreamer::ProcessDiscovered
EventHandler< ProcessEventArgs > & ProcessDiscovered
Definition
ProcessStreamer.h:79
DotNetDupe::System::Diagnostics::ProcessStreamer::Completed
EventHandler & Completed
Definition
ProcessStreamer.h:82
DotNetDupe::System::EventArgs::EventArgs
EventArgs()
Initializes a new instance of the EventArgs class.
Definition
EventArgs.cpp:7
DotNetDupe::System::EventHandler
Represents the method that will handle an event when the event provides data.
Definition
EventHandler.h:27
DotNetDupe::System::Object
Supports all classes in the DotNetDupe class hierarchy.
Definition
Object.h:18
DotNetDupe::System::SmartPointer
A unified smart pointer that supports both unique and shared ownership semantics.
Definition
SmartPointer.h:72
DotNetDupe::System::String
Represents text as a sequence of UTF-8 code units with culture-invariant operations.
Definition
String.h:74
DotNetDupe::System::Diagnostics
Definition
ActiveUserSession.h:11
DotNetDupe::System
Definition
Action.h:11
DotNetDupe
Definition
IServiceCollection.h:7
DotNetDupe::System::Diagnostics::ProcessInfo
Comprehensive telemetry snapshot for an operating system process.
Definition
SystemMetrics.h:81
DotNetDupe::System::Diagnostics::ProcessStreamOptions
Configuration options controlling the execution of a ProcessStreamer.
Definition
ProcessStreamOptions.h:18
DotNetDupe::System::Diagnostics::ProcessStreamOptions::ProcessStreamOptions
ProcessStreamOptions()
Default constructor configuring progressive telemetry defaults.
Definition
ProcessStreamOptions.h:26
Include
System
Diagnostics
ProcessStreamer.h
Generated by
1.18.0