Skip to content

Commit

Permalink
Rename ChildProcessInfo from ProcessID to PID and set default value o…
Browse files Browse the repository at this point in the history
…f CommandLine to null rather than an empty string.
  • Loading branch information
H4NM committed Jan 19, 2025
1 parent da8aa7c commit 8fd03ad
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion WhoYouCalling.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>AnyCPU;x64;x86</Platforms>
<FileVersion>1.4.1</FileVersion>
<FileVersion>1.4.2</FileVersion>
<ApplicationManifest>WhoYouCalling\app.manifest</ApplicationManifest>
<AssemblyName>wyc</AssemblyName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion WhoYouCalling/ETW/KernelListener.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ private void ProcessStart(ProcessTraceData data)

monitoredParentProcess.ChildProcesses.Add(new ChildProcessInfo
{
ProcessID = data.ProcessID,
PID = data.ProcessID,
ProcessName = data.ProcessName,
ETWRegisteredStartTime = DateTime.Now
});
Expand Down
2 changes: 1 addition & 1 deletion WhoYouCalling/Process/ChildProcessInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ namespace WhoYouCalling.Process
{
public class ChildProcessInfo
{
public int ProcessID { get; set; }
public int PID { get; set; }
public string ProcessName { get; set; } = string.Empty;
public DateTime ETWRegisteredStartTime { get; set; } = new();
}
Expand Down
2 changes: 1 addition & 1 deletion WhoYouCalling/Process/MonitoredProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ public class MonitoredProcess
{
public int PID { get; set; } = 0;
public string ProcessName { get; set; } = "";
public string CommandLine { get; set; } = "";
public string? CommandLine { get; set; } = null;
public string? ExecutableFileName { get; set; } = null;
public bool MappedProcess { get; set; } = true;
public bool? IsolatedProcess { get; set; } = null;
Expand Down
2 changes: 1 addition & 1 deletion WhoYouCalling/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,7 @@ private static string GetMainExecutableFileNameWithPIDOrPath(int pid = 0, string
return executableFileName;
}

public static void AddProcessToMonitor(int pid, string processName = "", string commandLine = "")
public static void AddProcessToMonitor(int pid, string processName = "", string? commandLine = null)
{
MonitoredProcess monitoredProcess = new MonitoredProcess
{
Expand Down
2 changes: 1 addition & 1 deletion imgs/version.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8fd03ad

Please sign in to comment.