Skip to content

Commit 9bfd62b

Browse files
committed
Remove documentation warnings from SysInfoApi
1 parent e227a5d commit 9bfd62b

6 files changed

Lines changed: 26 additions & 8 deletions

File tree

src-native/THNETII.WinApi.Headers.SysInfoApi/COMPUTER_NAME_FORMAT.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
namespace THNETII.WinApi.Native.SysInfoApi
1+
namespace THNETII.WinApi.Native.SysInfoApi
22
{
3+
using static SysInfoApiFunctions;
4+
35
// C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\sysinfoapi.h, line 296
46
/// <summary>
57
/// Specifies a type of computer name.

src-native/THNETII.WinApi.Headers.SysInfoApi/GlobalSuppressions.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// This file is used by Code Analysis to maintain SuppressMessage
1+
// This file is used by Code Analysis to maintain SuppressMessage
22
// attributes that are applied to this project.
33
// Project-level suppressions either have no target or are given
44
// a specific target and scoped to a namespace, type, member, etc.
@@ -13,3 +13,4 @@
1313
[assembly: SuppressMessage("Usage", "PC003: Native API not available in UWP")]
1414
[assembly: SuppressMessage("Globalization", "CA2101: Specify marshaling for P/Invoke string arguments")]
1515
[assembly: SuppressMessage("Documentation", "CA1200: Avoid using cref tags with a prefix")]
16+
[assembly: SuppressMessage("Documentation", "CS0419: Ambiguous cref reference")]

src-native/THNETII.WinApi.Headers.SysInfoApi/MEMORYSTATUSEX.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
using System.ComponentModel;
1+
using System.ComponentModel;
22
using System.Runtime.InteropServices;
33

44
using THNETII.InteropServices.Memory;
55

66
namespace THNETII.WinApi.Native.SysInfoApi
77
{
8+
using static SysInfoApiFunctions;
9+
810
// C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\sysinfoapi.h, line 72
911
/// <summary>
1012
/// Contains information about the current state of both physical and virtual memory, including extended memory. The <see cref="GlobalMemoryStatusEx"/> function stores information in this structure.
@@ -48,7 +50,7 @@ public double MemoryLoadPercentage
4850
/// </summary>
4951
public ulong ullTotalPageFile;
5052
/// <summary>
51-
/// 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. To calculate the system-wide available commit value, call <see cref="GetPerformanceInfo"/> and subtract the value of <see cref="CommitTotal"/> from the value of <see cref="CommitLimit"/>.
53+
/// 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. To calculate the system-wide available commit value, call <see cref="GetPerformanceInfo"/> and subtract the value of <see cref="PERFORMANCE_INFORMATION.CommitTotal"/> from the value of <see cref="PERFORMANCE_INFORMATION.CommitLimit"/>.
5254
/// </summary>
5355
public ulong ullAvailPageFile;
5456
/// <summary>

src-native/THNETII.WinApi.Headers.SysInfoApi/SYSTEM_INFO.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1-
using System;
1+
using System;
22
using System.ComponentModel;
33
using System.Runtime.InteropServices;
44

55
using THNETII.WinApi.Native.WinNT;
66

77
namespace THNETII.WinApi.Native.SysInfoApi
88
{
9+
using static LOGICAL_PROCESSOR_RELATIONSHIP;
910
using static PROCESSOR_ARCHITECTURE;
11+
using static SysInfoApiFunctions;
1012

1113
// C:\Program Files (x86)\Windows Kits\10\Include\10.0.17134.0\um\sysinfoapi.h, line 47
1214
/// <summary>

src-native/THNETII.WinApi.Headers.SysInfoApi/SysInfoApiFunctions.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
1-
using Microsoft.Win32.SafeHandles;
1+
using Microsoft.Win32.SafeHandles;
2+
23
using System;
34
using System.Runtime.InteropServices;
45
using System.Text;
6+
57
using THNETII.InteropServices.Memory;
68
using THNETII.WinApi.Native.MinWinBase;
79
using THNETII.WinApi.Native.WinError;
810
using THNETII.WinApi.Native.WinNT;
11+
using THNETII.WinApi.Native.ErrHandlingApi;
12+
using THNETII.WinApi.Native.WinUser;
913

1014
#if NETSTANDARD1_6
1115
using EntryPointNotFoundException = System.Exception;
@@ -14,6 +18,7 @@
1418
namespace THNETII.WinApi.Native.SysInfoApi
1519
{
1620
using static COMPUTER_NAME_FORMAT;
21+
using static ErrHandlingApiFunctions;
1722
using static LOGICAL_PROCESSOR_RELATIONSHIP;
1823
using static NativeLibraryNames;
1924
using static WinErrorConstants;

src-native/THNETII.WinApi.Headers.SysInfoApi/THNETII.WinApi.Headers.SysInfoApi.csproj

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
<?xml version="1.0" encoding="utf-8"?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<Project Sdk="Microsoft.NET.Sdk">
33

44
<PropertyGroup>
55
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
66
<LangVersion>7.3</LangVersion>
77
<TargetFrameworks>netstandard1.6;netstandard2.0</TargetFrameworks>
88
<GenerateDocumentationFile>true</GenerateDocumentationFile>
9-
<NoWarn>CS1591</NoWarn>
9+
<NoWarn>$(NoWarn);CS0419;CS1591</NoWarn>
1010
<RootNamespace>THNETII.WinApi.Native.SysInfoApi</RootNamespace>
1111
</PropertyGroup>
1212

@@ -28,6 +28,12 @@
2828
<ProjectReference Include="..\THNETII.WinApi.Constants.WinNT\THNETII.WinApi.Constants.WinNT.csproj">
2929
<PrivateAssets>All</PrivateAssets>
3030
</ProjectReference>
31+
<ProjectReference Include="..\THNETII.WinApi.Headers.ErrHandlingApi\THNETII.WinApi.Headers.ErrHandlingApi.csproj">
32+
<PrivateAssets>All</PrivateAssets>
33+
</ProjectReference>
34+
<ProjectReference Include="..\THNETII.WinApi.Headers.WinUser\THNETII.WinApi.Headers.WinUser.csproj">
35+
<PrivateAssets>All</PrivateAssets>
36+
</ProjectReference>
3137
</ItemGroup>
3238

3339
<ItemGroup>

0 commit comments

Comments
 (0)