Skip to content
Merged
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
2 changes: 1 addition & 1 deletion .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1115,7 +1115,7 @@ dotnet_diagnostic.SA1104.severity = none
dotnet_diagnostic.SA1105.severity = none

# SA1106: Code should not contain empty statements
dotnet_diagnostic.SA1106.severity = none
dotnet_diagnostic.SA1106.severity = warning

# SA1107: Code should not contain multiple statements on one line
dotnet_diagnostic.SA1107.severity = none
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public enum ProtocolType

[SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly")]
Wsman
};
}

/// <summary>
/// The Cmdlet allows the IT Pro to create a CimSessionOptions object that she/he
Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.PowerShell.Commands.Diagnostics/PdhHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,15 +225,15 @@ private struct PDH_FMT_COUNTERVALUE_LARGE

// [FieldOffset(4), MarshalAs(UnmanagedType.LPWStr)]
// public string WideStringValue;
};
}

[StructLayout(LayoutKind.Sequential)]
private struct PDH_FMT_COUNTERVALUE_DOUBLE
{
public uint CStatus;

public double doubleValue;
};
}

[StructLayout(LayoutKind.Sequential)]
private struct PDH_FMT_COUNTERVALUE_UNICODE
Expand All @@ -242,7 +242,7 @@ private struct PDH_FMT_COUNTERVALUE_UNICODE

[MarshalAs(UnmanagedType.LPWStr)]
public string WideStringValue;
};
}

[StructLayout(LayoutKind.Sequential)]
private struct PDH_RAW_COUNTER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ internal enum MatchMode
/// Select the processes specified as input.
/// </summary>
ByInput
};
}
/// <summary>
/// The current process selection mode.
/// </summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ internal enum SelectionMode
/// Select services by Service name.
/// </summary>
ServiceName = 3
};
}
/// <summary>
/// Holds the selection mode setting.
/// </summary>
Expand Down Expand Up @@ -2706,7 +2706,7 @@ internal struct SERVICE_DESCRIPTIONW
{
[MarshalAs(UnmanagedType.LPWStr)]
internal string lpDescription;
};
}

[StructLayout(LayoutKind.Sequential)]
internal struct QUERY_SERVICE_CONFIG
Expand All @@ -2720,13 +2720,13 @@ internal struct QUERY_SERVICE_CONFIG
[MarshalAs(UnmanagedType.LPWStr)] internal string lpDependencies;
[MarshalAs(UnmanagedType.LPWStr)] internal string lpServiceStartName;
[MarshalAs(UnmanagedType.LPWStr)] internal string lpDisplayName;
};
}

[StructLayout(LayoutKind.Sequential)]
internal struct SERVICE_DELAYED_AUTO_START_INFO
{
internal bool fDelayedAutostart;
};
}

[DllImport(PinvokeDllNames.CreateServiceWDllName, CharSet = CharSet.Unicode, SetLastError = true)]
internal static extern
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public enum BreakpointType

/// <summary>Breakpoint on a command</summary>
Command
};
}

/// <summary>
/// This class implements Get-PSBreakpoint.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ namespace Microsoft.PowerShell
/// The node will be displayed the same as Full, plus, the whole StatusDescription and CurrentOperation will be displayed (in multiple lines if needed).
/// </summary>
FullPlus = 4,
};
}

/// <summary>
/// Constructs an instance from a ProgressRecord.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ internal struct EvtStringVariant

[FieldOffset(12)]
public UInt32 Type;
};
}

[DllImport(WEVTAPI, CharSet = CharSet.Unicode, SetLastError = true)]
[SecurityCritical]
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.WSMan.Management/ConfigProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5434,14 +5434,14 @@ private enum ProviderMethods
{
GetChildItems,
GetChildNames
};
}

private enum WsManElementObjectTypes
{
WSManConfigElement,
WSManConfigContainerElement,
WSManConfigLeafElement
};
}

#region def
private static readonly string[] WinrmRootName = new string[] { "winrm/Config" };
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.WSMan.Management/Interop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ void SetProxy(int accessType,
/// <summary><para><c>ProxyAuthenticationUseDigest</c> method of <c>IWSManConnectionOptionsEx2</c> interface.</para></summary>
[DispId(11)]
int ProxyAuthenticationUseDigest();
};
}

#endregion IWSManConnectionOptions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal class TooManyErrorsException : TypeInfoDataBaseLoaderException
/// </summary>
internal class XmlLoaderLoggerEntry
{
internal enum EntryType { Error, Trace };
internal enum EntryType { Error, Trace }

/// <summary>
/// Type of information being logged.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ internal sealed class DisplayResourceManagerCache
{
internal enum LoadingResult { NoError, AssemblyNotFound, ResourceNotFound, StringNotFound }

internal enum AssemblyBindingStatus { NotFound, FoundInGac, FoundInPath };
internal enum AssemblyBindingStatus { NotFound, FoundInGac, FoundInPath }

internal string GetTextTokenString(TextToken tt)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ internal class ComEventDesc
{
public Guid SourceIID;
public int Dispid;
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1698,5 +1698,5 @@ internal enum EngineState
/// Engine is stopped.
/// </summary>
Stopped = 4
};
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5779,7 +5779,7 @@ internal static IConversionData FigureConversion(Type fromType, Type toType)
return CacheConversion(fromType, toType, converter, rank);
}

internal class Null { };
internal class Null { }

private static IConversionData FigureConversionFromNull(Type toType)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ private enum MinishellParameters
Arguments = 0x02,
InputFormat = 0x04,
OutputFormat = 0x08
};
}

/// <summary>
/// Handles error handling if some parameter is specified more than once.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3384,7 +3384,7 @@ internal enum ContinueStatus
No,
YesToAll,
NoToAll
};
}

internal ContinueStatus lastShouldProcessContinueStatus = ContinueStatus.Yes;
internal ContinueStatus lastErrorContinueStatus = ContinueStatus.Yes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ internal enum NativeCommandIOFormat
{
Text,
Xml
};
}

/// <summary>
/// Different streams produced by minishell output.
Expand Down Expand Up @@ -1419,7 +1419,7 @@ private struct SHFILEINFO

[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 80)]
public string szTypeName;
};
}

private const uint SHGFI_EXETYPE = 0x000002000; // flag used to ask to return exe type

Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/Pipe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ internal enum VariableStreamKind
Error,
Warning,
Information
};
}

/// <summary>
/// Pipe provides a way to stitch two commands.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -308,5 +308,5 @@ internal static class SerializationStrings
internal const string MonadNamespacePrefix = "ps";

#endregion namespace values
};
}
}
12 changes: 6 additions & 6 deletions src/System.Management.Automation/engine/debugger/debugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public enum DebuggerResumeAction
/// Stop executing the script.
/// </summary>
Stop = 4,
};
}

/// <summary>
/// Arguments for the DebuggerStop event.
Expand Down Expand Up @@ -112,7 +112,7 @@ public DebuggerStopEventArgs(
/// leave pending runspace debug sessions suspended until a debugger is attached.
/// </summary>
internal bool SuspendRemote { get; set; }
};
}

/// <summary>
/// Kinds of breakpoint updates.
Expand All @@ -135,7 +135,7 @@ public enum BreakpointUpdateType
/// A breakpoint was disabled.
/// </summary>
Disabled = 3
};
}

/// <summary>
/// Arguments for the BreakpointUpdated event.
Expand Down Expand Up @@ -166,7 +166,7 @@ internal BreakpointUpdatedEventArgs(Breakpoint breakpoint, BreakpointUpdateType
/// Gets the current breakpoint count.
/// </summary>
public int BreakpointCount { get; }
};
}

#region PSJobStartEventArgs

Expand Down Expand Up @@ -292,7 +292,7 @@ public enum DebugModes
/// PowerShell remote script debugging.
/// </summary>
RemoteScript = 0x4
};
}

/// <summary>
/// Defines unhandled breakpoint processing behavior.
Expand Down Expand Up @@ -1589,7 +1589,7 @@ private class CallStackInfo
internal bool IsFrameHidden { get; set; }

internal bool TopFrameAtBreakpoint { get; set; }
};
}

private struct CallStackList
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public enum PSThreadOptions
/// This option is not valid for asynchronous calls
/// </remarks>
UseCurrentThread = 3
};
}

/// <summary>
/// Defines type which has information about RunspaceState and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public enum DynamicKeywordNameMode
/// Name may be optionally present, expression or bare word.
/// </summary>
OptionalName = 4,
};
}

/// <summary>
/// Defines the body mode for a dynamic keyword. It can be a scriptblock, hashtable or command which means no body.
Expand Down
4 changes: 2 additions & 2 deletions src/System.Management.Automation/engine/regex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public enum WildcardOptions
/// Specifies culture-invariant matching.
/// </summary>
CultureInvariant = 4
};
}

/// <summary>
/// Represents a wildcard pattern.
Expand Down Expand Up @@ -729,7 +729,7 @@ internal static WildcardPatternException NewWildcardPatternException(string inva

return e;
}
};
}

/// <summary>
/// Convert a string with wild cards into its equivalent regex.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ internal enum PSConnectionRetryStatus
AutoDisconnectStarting = 4,
AutoDisconnectSucceeded = 5,
InternalErrorAbort = 6
};
}

/// <summary>
/// PSConnectionRetryStatusEventArgs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2297,7 +2297,7 @@ private static string[] ParseArgv(ProcessStartInfo psi)
case '"':
// Special case for arguments within quotes
// Just return argument value within the quotes
while ((++i < argsLength) && argsToParse[i] != '"') { };
while ((++i < argsLength) && argsToParse[i] != '"') { }
if (iStart < argsLength - 1)
{
iStart++;
Expand All @@ -2307,12 +2307,12 @@ private static string[] ParseArgv(ProcessStartInfo psi)

default:
// Common case for parsing arguments with space character delimiter
while ((++i < argsLength) && argsToParse[i] != ' ') { };
while ((++i < argsLength) && argsToParse[i] != ' ') { }
break;
}

argvList.Add(argsToParse.Substring(iStart, (i-iStart)));
while ((++i < argsLength) && argsToParse[i] == ' ') { };
while ((++i < argsLength) && argsToParse[i] == ' ') { }
}

return argvList.ToArray();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ internal enum ConnectionStatus
AutoDisconnectStarting = 4,
AutoDisconnectSucceeded = 5,
InternalErrorAbort = 6
};
}

/// <summary>
/// ConnectionStatusEventArgs.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ internal enum WSManDataType : uint
WSMAN_DATA_TYPE_BINARY = 2,
WSMAN_DATA_TYPE_WS_XML_READER = 3,
WSMAN_DATA_TYPE_DWORD = 4
};
}

[StructLayout(LayoutKind.Sequential)]
internal class WSManDataStruct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ private enum PreProcessCommandResult
/// The PreProcessCommandResult used for managing breakpoints.
/// </summary>
BreakpointManagement,
};
}

private class DebuggerCommandArgument
{
Expand Down
2 changes: 1 addition & 1 deletion src/System.Management.Automation/engine/serialization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ internal enum ContainerType
List,
Enumerable,
None
};
}

/// <summary>
/// This internal helper class provides methods for serializing mshObject.
Expand Down
Loading