Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Models/ProcessModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
private long processorAffinity;

[ObservableProperty]
private IntPtr mainWindowHandle;

Check warning on line 42 in Models/ProcessModel.cs

View workflow job for this annotation

GitHub Actions / Analyze C# (csharp, manual)

Use built-in type alias (https://dotnetanalyzers.github.io/StyleCopAnalyzers/SA1121.html)

Check warning on line 42 in Models/ProcessModel.cs

View workflow job for this annotation

GitHub Actions / build-test-scan

Use built-in type alias (https://dotnetanalyzers.github.io/StyleCopAnalyzers/SA1121.html)

Check warning on line 42 in Models/ProcessModel.cs

View workflow job for this annotation

GitHub Actions / build-test-scan

Use built-in type alias (https://dotnetanalyzers.github.io/StyleCopAnalyzers/SA1121.html)

[ObservableProperty]
private string mainWindowTitle = string.Empty;
Expand All @@ -59,6 +59,14 @@
[ObservableProperty]
private bool isRegistryPriorityEnabled;

internal DateTime? StartTimeUtc { get; set; }

internal bool IsSameInstance(ProcessModel other) =>
this.ProcessId == other.ProcessId
&& (this.StartTimeUtc.HasValue && other.StartTimeUtc.HasValue
? this.StartTimeUtc == other.StartTimeUtc
: string.Equals(this.Name, other.Name, StringComparison.OrdinalIgnoreCase));

public void ForceNotifyProcessorAffinityChanged()
{
this.OnPropertyChanged(nameof(this.ProcessorAffinity));
Expand Down
Loading
Loading