Repository navigation
Expand file tree
/
Copy pathPersistentProcessRule.cs
More file actions
64 lines (39 loc) · 1.64 KB
/
Copy pathPersistentProcessRule.cs
File metadata and controls
64 lines (39 loc) · 1.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*
* ThreadPilot - persistent process rule models.
*/
namespace ThreadPilot.Models
{
using System;
using System.Diagnostics;
public sealed record PersistentProcessRule
{
public string Id { get; init; } = Guid.NewGuid().ToString("N");
public string Name { get; init; } = string.Empty;
public bool IsEnabled { get; init; }
public string? ProcessName { get; init; }
public string? ExecutablePath { get; init; }
public CpuSelection? CpuSelection { get; init; }
public long? LegacyAffinityMask { get; init; }
public ProcessPriorityClass? Priority { get; init; }
public bool ApplyAffinityOnStart { get; init; }
public bool ApplyPriorityOnStart { get; init; }
public DateTime CreatedAt { get; init; } = DateTime.UtcNow;
public DateTime UpdatedAt { get; init; } = DateTime.UtcNow;
public string? Description { get; init; }
}
public sealed record PersistentRuleApplyResult
{
public bool Success { get; init; }
public string RuleId { get; init; } = string.Empty;
public int ProcessId { get; init; }
public string ProcessName { get; init; } = string.Empty;
public bool AffinityApplied { get; init; }
public bool PriorityApplied { get; init; }
public string? ErrorCode { get; init; }
public string UserMessage { get; init; } = string.Empty;
public string TechnicalMessage { get; init; } = string.Empty;
public bool IsAccessDenied { get; init; }
public bool IsAntiCheatLikely { get; init; }
public bool IsProcessExited { get; init; }
}
}