Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #507 from dotnet/styleCop
Browse files Browse the repository at this point in the history
Update StyleCop and other packages
  • Loading branch information
AArnott authored Jul 12, 2020
2 parents 86376b1 + a860f9e commit b8b9292
Show file tree
Hide file tree
Showing 204 changed files with 837 additions and 796 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ StyleCopReport.xml
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
Expand Down
16 changes: 16 additions & 0 deletions Directory.Build.rsp
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#------------------------------------------------------------------------------
# This file contains command-line options that MSBuild will process as part of
# every build, unless the "/noautoresponse" switch is specified.
#
# MSBuild processes the options in this file first, before processing the
# options on the command line. As a result, options on the command line can
# override the options in this file. However, depending on the options being
# set, the overriding can also result in conflicts.
#
# NOTE: The "/noautoresponse" switch cannot be specified in this file, nor in
# any response file that is referenced by this file.
#------------------------------------------------------------------------------
/nr:false
/m
/verbosity:minimal
/clp:Summary;ForceNoAlign
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ALG_ID.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace PInvoke
public static partial class AdvApi32
{
/// <summary>
/// Hashing Algorithms
/// Hashing Algorithms.
/// </summary>
public enum ALG_ID
{
Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+CryptGetProvParamQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static partial class AdvApi32
{
/// <summary>
/// Defines the query types for <see cref="CryptGetProvParam(SafeHandle,CryptGetProvParamQuery,byte*,ref int,uint)"/> API
/// as documented by https://msdn.microsoft.com/en-us/library/windows/desktop/aa380196(v=vs.85).aspx
/// <see href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380196(v=vs.85).aspx">as documented</see>.
/// </summary>
public enum CryptGetProvParamQuery : uint
{
Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+CryptSetProvParamQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static partial class AdvApi32
{
/// <summary>
/// Defines the query types for <see cref="CryptSetProvParam(SafeHandle,CryptSetProvParamQuery,byte*,uint)"/> API
/// as documented by https://msdn.microsoft.com/en-us/library/windows/desktop/aa380276(v=vs.85).aspx
/// <see href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa380276(v=vs.85).aspx">as documented</see>.
/// </summary>
public enum CryptSetProvParamQuery : uint
{
Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+RegNotifyFilter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public enum RegNotifyFilter
/// <para>Note This flag value is only supported in Windows 8 and later.</para>
/// .
/// </summary>
REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000
REG_NOTIFY_THREAD_AGNOSTIC = 0x10000000,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+RegOpenKeyOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum RegOpenKeyOptions
/// <summary>
/// The key is a symbolic link. Registry symbolic links should only be used when absolutely necessary.
/// </summary>
REG_OPTION_OPEN_LINK = 0x00000008
REG_OPTION_OPEN_LINK = 0x00000008,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+SECURITY_INFORMATION.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public enum SECURITY_INFORMATION : uint
/// <summary>The SACL inherits ACEs from the parent object.</summary>
UNPROTECTED_SACL_SECURITY_INFORMATION = 0x10000000,

PROCESS_TRUST_LABEL_SECURITY_INFORMATION = 0x00000080
PROCESS_TRUST_LABEL_SECURITY_INFORMATION = 0x00000080,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+SERVICE_STATUS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class AdvApi32
public struct SERVICE_STATUS
{
/// <summary>
/// The type of service. <see cref="ServiceType"/>
/// The type of service. <see cref="ServiceType"/>.
/// </summary>
public ServiceType dwServiceType;

Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+SERVICE_STATUS_PROCESS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial class AdvApi32
public struct SERVICE_STATUS_PROCESS
{
/// <summary>
/// The type of service. <see cref="ServiceType"/>
/// The type of service. <see cref="ServiceType"/>.
/// </summary>
public ServiceType dwServiceType;

Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceControl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public enum ServiceControl
/// Control code supported by the <see cref="LPHANDLER_FUNCTION"/> function.
/// Windows Server 2008, Windows Vista, Windows Server 2003 and Windows XP: This control code is not supported.
/// </remarks>
SERVICE_CONTROL_USERMODEREBOOT = 0x00000040
SERVICE_CONTROL_USERMODEREBOOT = 0x00000040,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceInfoLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public enum ServiceInfoLevel
/// The lpInfo parameter is a pointer a <see cref="ServiceLaunchProtected"/> structure.
/// Note This value is supported starting with Windows 8.1.
/// </summary>
SERVICE_CONFIG_LAUNCH_PROTECTED = 12
SERVICE_CONFIG_LAUNCH_PROTECTED = 12,
}
}
}
4 changes: 2 additions & 2 deletions src/AdvApi32/AdvApi32+ServiceLaunchProtected.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ namespace PInvoke
public static partial class AdvApi32
{
/// <summary>
/// The protection type of the service
/// The protection type of the service.
/// </summary>
public enum ServiceLaunchProtected
{
SERVICE_LAUNCH_PROTECTED_NONE = 0,
SERVICE_LAUNCH_PROTECTED_WINDOWS = 1,
SERVICE_LAUNCH_PROTECTED_WINDOWS_LIGHT = 2,
SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT = 3
SERVICE_LAUNCH_PROTECTED_ANTIMALWARE_LIGHT = 3,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServicePreshutdownInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace PInvoke
public static partial class AdvApi32
{
/// <summary>
/// Contains preshutdown settings
/// Contains preshutdown settings.
/// </summary>
public struct ServicePreshutdownInfo
{
Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceSidType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public enum ServiceSidType
/// One ACE that allows GENERIC_ALL access for the service logon SID is also added to the service process token object.
/// If there are multiple services hosted in the same process and one service has SERVICE_SID_TYPE_RESTRICTED, all services must have SERVICE_SID_TYPE_RESTRICTED.
/// </summary>
SERVICE_SID_TYPE_RESTRICTED = 0x00000003
SERVICE_SID_TYPE_RESTRICTED = 0x00000003,
}
}
}
4 changes: 2 additions & 2 deletions src/AdvApi32/AdvApi32+ServiceState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ namespace PInvoke
public partial class AdvApi32
{
/// <summary>
/// Represents the current state of a servies
/// Represents the current state of a servies.
/// </summary>
public enum ServiceState
{
Expand Down Expand Up @@ -46,7 +46,7 @@ public enum ServiceState
/// <summary>
/// The service is paused.
/// </summary>
SERVICE_PAUSED = 0x00000007
SERVICE_PAUSED = 0x00000007,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceStateQuery.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public enum ServiceStateQuery
/// <summary>
/// Combines the following states: <see cref="SERVICE_ACTIVE"/> and <see cref="SERVICE_INACTIVE"/>.
/// </summary>
SERVICE_STATE_ALL = SERVICE_ACTIVE | SERVICE_INACTIVE
SERVICE_STATE_ALL = SERVICE_ACTIVE | SERVICE_INACTIVE,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceTrigger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public static partial class AdvApi32
public struct ServiceTrigger
{
/// <summary>
/// The trigger event type
/// The trigger event type.
/// </summary>
public ServiceTriggerType dwTriggerType;

Expand Down
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceTriggerAction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum ServiceTriggerAction
/// <summary>
/// Stop the service when the specified trigger event occurs.
/// </summary>
SERVICE_TRIGGER_ACTION_SERVICE_STOP = 2
SERVICE_TRIGGER_ACTION_SERVICE_STOP = 2,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceTriggerDataType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public enum ServiceTriggerDataType
/// <summary>
/// The trigger-specific data is a 64-bit unsigned integer value.
/// </summary>
SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ALL = 5
SERVICE_TRIGGER_DATA_TYPE_KEYWORD_ALL = 5,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+ServiceTriggerType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public enum ServiceTriggerType
/// The pTriggerSubtype member specifies the event provider's GUID.
/// The pDataItems member specifies trigger-specific data defined by the provider.
/// </summary>
SERVICE_TRIGGER_TYPE_CUSTOM = 20
SERVICE_TRIGGER_TYPE_CUSTOM = 20,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+TOKEN_ELEVATION_TYPE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum TOKEN_ELEVATION_TYPE
/// Process executing under UAC, the current user got some elevated right but they can't
/// be used in the process as the token is "split".
/// </summary>
TokenElevationTypeLimited
TokenElevationTypeLimited,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+TOKEN_INFORMATION_CLASS.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public enum TOKEN_INFORMATION_CLASS
TokenRestrictedDeviceGroups,
TokenSecurityAttributes,
TokenIsRestricted,
MaxTokenInfoClass
MaxTokenInfoClass,
}
}
}
2 changes: 1 addition & 1 deletion src/AdvApi32/AdvApi32+TOKEN_TYPE.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public enum TOKEN_TYPE
/// <summary>
/// The new token is an impersonation token.
/// </summary>
TokenImpersonation
TokenImpersonation,
}
}
}
4 changes: 2 additions & 2 deletions src/AdvApi32/AdvApi32.Helpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ public static unsafe void CreateService(string lpBinaryPathName, string lpServic

var descriptionStruct = new ServiceDescription
{
lpDescription = lpDescription
lpDescription = lpDescription,
};

#if NETSTANDARD2_0_ORLATER
Expand Down Expand Up @@ -350,7 +350,7 @@ public static void DeleteService(string lpServiceName)
/// A handle to an access token from which information is retrieved. The handle must have
/// TOKEN_QUERY access.
/// </param>
/// <returns>The token elevation type</returns>
/// <returns>The token elevation type.</returns>
/// <exception cref="ArgumentNullException"><paramref name="TokenHandle" /> is NULL.</exception>
/// <exception cref="Win32Exception">If the call to <see cref="GetTokenInformation(SafeObjectHandle, TOKEN_INFORMATION_CLASS, void*, int, out int)" /> fails.</exception>
public static TOKEN_ELEVATION_TYPE GetTokenElevationType(SafeObjectHandle TokenHandle)
Expand Down
8 changes: 5 additions & 3 deletions src/AdvApi32/AdvApi32.ReservedKeyHandles.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ public partial class AdvApi32
public static readonly SafeRegistryHandle HKEY_CLASSES_ROOT
= new SafeRegistryHandle((IntPtr)unchecked((int)0x80000000), false);

#pragma warning disable SA1629 // Documentation text should end with a period
/// <summary>
/// Registry entries subordinate to this key define the preferences of the current user. These preferences include the
/// settings of environment variables, data about program groups, colors, printers, network connections, and
/// application preferences. This key makes it easier to establish the current user's settings; the key maps to the
/// current user's branch in <see cref="HKEY_USERS" />. In HKEY_CURRENT_USER, software vendors store the current
/// user-specific preferences to be used within their applications. Microsoft, for example, creates the
/// user-specific preferences to be used within their applications. Microsoft, for example, creates the.
/// <code>HKEY_CURRENT_USER\Software\Microsoft</code> key for its applications to use, with each application creating
/// its own subkey under the <code>Microsoft</code> key.
/// <para>
Expand All @@ -49,6 +50,7 @@ public static readonly SafeRegistryHandle HKEY_CLASSES_ROOT
/// call the RegOpenCurrentUser function.
/// </para>
/// </summary>
#pragma warning restore SA1629 // Documentation text should end with a period
public static readonly SafeRegistryHandle HKEY_CURRENT_USER
= new SafeRegistryHandle((IntPtr)unchecked((int)0x80000001), false);

Expand Down Expand Up @@ -99,7 +101,7 @@ public static readonly SafeRegistryHandle HKEY_PERFORMANCE_NLSTEXT
/// the standard configuration. Information about the standard hardware configuration is stored under the Software and
/// System keys of <see cref="HKEY_LOCAL_MACHINE"/>.
/// <para>
/// HKEY_CURRENT_CONFIG is an alias for
/// HKEY_CURRENT_CONFIG is an alias for.
/// <code>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Hardware Profiles\Current</code>.
/// </para>
/// </summary>
Expand All @@ -108,7 +110,7 @@ public static readonly SafeRegistryHandle HKEY_CURRENT_CONFIG

/// <summary>
/// Contains information about hardware, Plug &amp; Play and network performance statistics.
/// <para>Only available on Windows 95, Windows 98 and Windows ME</para>
/// <para>Only available on Windows 95, Windows 98 and Windows ME.</para>
/// </summary>
public static readonly SafeRegistryHandle HKEY_DYN_DATA
= new SafeRegistryHandle((IntPtr)unchecked((int)0x80000006), false);
Expand Down
Loading

0 comments on commit b8b9292

Please sign in to comment.