XML comments added Builds cleanly.

oddly a ignore in the gitignore went missing.
restored.
This commit is contained in:
Stan44 2025-05-11 21:50:25 -05:00
parent 8a6f9144c4
commit 0ae815cf2c
6 changed files with 266 additions and 182 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
# Ignore Build # Ignore Build
.vscode/
/docfx_project /docfx_project
/src/AdvChkSys/bin /src/AdvChkSys/bin
/src/AdvChkSys/obj /src/AdvChkSys/obj

View File

@ -14,9 +14,24 @@ namespace AdvChkSys.Dependencies
/// </summary> /// </summary>
public enum DependencyType public enum DependencyType
{ {
/// <summary>
/// Indicates a neighboring chunk relationship.
/// </summary>
Neighbor, Neighbor,
/// <summary>
/// Indicates a reference relationship between chunks.
/// </summary>
Reference, Reference,
/// <summary>
/// Indicates an update relationship between chunks.
/// </summary>
Update, Update,
/// <summary>
/// Indicates a custom dependency relationship.
/// </summary>
Custom Custom
} }

View File

@ -18,10 +18,29 @@ namespace AdvChkSys.Loading
/// </summary> /// </summary>
public enum Priority public enum Priority
{ {
/// <summary>
/// Immediate priority - process as soon as possible
/// </summary>
Immediate, Immediate,
/// <summary>
/// High priority - process after immediate requests
/// </summary>
High, High,
/// <summary>
/// Normal priority - standard processing order
/// </summary>
Normal, Normal,
/// <summary>
/// Low priority - process after normal requests
/// </summary>
Low, Low,
/// <summary>
/// Background priority - process when system is idle
/// </summary>
Background Background
} }

View File

@ -1,5 +1,4 @@
using System; using System;
using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;

View File

@ -4,7 +4,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using System.Threading; using System.Threading;
using System.Threading.Tasks;
namespace AdvChkSys.Threading namespace AdvChkSys.Threading
{ {
@ -244,6 +244,14 @@ namespace AdvChkSys.Threading
/// </summary> /// </summary>
public double[] History { get; } public double[] History { get; }
/// <summary>
///
/// </summary>
/// <param name="current"></param>
/// <param name="average"></param>
/// <param name="min"></param>
/// <param name="max"></param>
/// <param name="history"></param>
public PerformanceReport(double current, double average, double min, double max, double[] history) public PerformanceReport(double current, double average, double min, double max, double[] history)
{ {
Current = current; Current = current;

View File

@ -35,8 +35,10 @@ namespace AdvChkSys.Util
private static ulong GetAvailableMemoryWindows() private static ulong GetAvailableMemoryWindows()
{ {
var memStatus = new MEMORYSTATUSEX(); var memStatus = new MEMORYSTATUSEX
memStatus.dwLength = (uint)Marshal.SizeOf(typeof(MEMORYSTATUSEX)); {
dwLength = (uint)Marshal.SizeOf(typeof(MEMORYSTATUSEX))
};
if (GlobalMemoryStatusEx(ref memStatus)) if (GlobalMemoryStatusEx(ref memStatus))
{ {
return memStatus.ullAvailPhys; return memStatus.ullAvailPhys;
@ -81,21 +83,61 @@ namespace AdvChkSys.Util
return 0; return 0;
} }
/// <summary>
/// Structure containing memory status information for Windows systems.
/// </summary>
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)]
public struct MEMORYSTATUSEX public struct MEMORYSTATUSEX
{ {
/// <summary>
/// The size of the structure, in bytes. You must set this member before calling GlobalMemoryStatusEx.
/// </summary>
public uint dwLength; public uint dwLength;
/// <summary>
/// A number between 0 and 100 that specifies the approximate percentage of physical memory
/// that is in use (0 indicates no memory use and 100 indicates full memory use).
/// </summary>
public uint dwMemoryLoad; public uint dwMemoryLoad;
/// <summary>
/// The total size of physical memory, in bytes.
/// </summary>
public ulong ullTotalPhys; public ulong ullTotalPhys;
/// <summary>
/// The amount of physical memory currently available, in bytes.
/// This is the amount of physical memory that can be immediately reused without having to write its contents to disk first.
/// </summary>
public ulong ullAvailPhys; public ulong ullAvailPhys;
/// <summary>
/// The current committed memory limit for the system or the current process, whichever is smaller, in bytes.
/// </summary>
public ulong ullTotalPageFile; public ulong ullTotalPageFile;
/// <summary>
/// The maximum amount of memory the current process can commit, in bytes.
/// This value is equal to or smaller than the system-wide available commit value.
/// </summary>
public ulong ullAvailPageFile; public ulong ullAvailPageFile;
/// <summary>
/// The size of the user-mode portion of the virtual address space of the calling process, in bytes.
/// </summary>
public ulong ullTotalVirtual; public ulong ullTotalVirtual;
/// <summary>
/// The amount of unreserved and uncommitted memory currently in the user-mode portion
/// of the virtual address space of the calling process, in bytes.
/// </summary>
public ulong ullAvailVirtual; public ulong ullAvailVirtual;
/// <summary>
/// Reserved. This value is always 0.
/// </summary>
public ulong ullAvailExtendedVirtual; public ulong ullAvailExtendedVirtual;
} }
/// <summary>
/// Retrieves information about the system's current usage of both physical and virtual memory.
/// </summary>
/// <param name="lpBuffer">A pointer to a <see cref="MEMORYSTATUSEX"/> structure that receives the memory status information.</param>
/// <returns>If the function succeeds, the return value is <c>true</c>. If the function fails, the return value is <c>false</c>.</returns>
[DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)] [DllImport("kernel32.dll", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer); public static extern bool GlobalMemoryStatusEx(ref MEMORYSTATUSEX lpBuffer);
} }
} }