Skip to content

Commit 9d4665f

Browse files
authored
1 parent fd934e0 commit 9d4665f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+465
-304
lines changed

.globalconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1022,7 +1022,7 @@ dotnet_diagnostic.SA1001.severity = none
10221022
dotnet_diagnostic.SA1002.severity = warning
10231023

10241024
# SA1003: Symbols should be spaced correctly
1025-
dotnet_diagnostic.SA1003.severity = none
1025+
dotnet_diagnostic.SA1003.severity = warning
10261026

10271027
# SA1004: Documentation lines should begin with single space
10281028
dotnet_diagnostic.SA1004.severity = none

src/Microsoft.Management.Infrastructure.CimCmdlets/CimResultObserver.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,8 @@ internal class AsyncResultCompleteEventArgs : AsyncResultEventArgsBase
115115
/// <param name="cancellationDisposable"></param>
116116
public AsyncResultCompleteEventArgs(
117117
CimSession session,
118-
IObservable<object> observable) :
119-
base(session, observable, AsyncResultType.Completion)
118+
IObservable<object> observable)
119+
: base(session, observable, AsyncResultType.Completion)
120120
{
121121
}
122122
}
@@ -137,8 +137,8 @@ internal class AsyncResultObjectEventArgs : AsyncResultEventArgsBase
137137
public AsyncResultObjectEventArgs(
138138
CimSession session,
139139
IObservable<object> observable,
140-
object resultObject) :
141-
base(session, observable, AsyncResultType.Result)
140+
object resultObject)
141+
: base(session, observable, AsyncResultType.Result)
142142
{
143143
this.resultObject = resultObject;
144144
}
@@ -162,8 +162,8 @@ internal class AsyncResultErrorEventArgs : AsyncResultEventArgsBase
162162
public AsyncResultErrorEventArgs(
163163
CimSession session,
164164
IObservable<object> observable,
165-
Exception error) :
166-
base(session, observable, AsyncResultType.Exception)
165+
Exception error)
166+
: base(session, observable, AsyncResultType.Exception)
167167
{
168168
this.error = error;
169169
}
@@ -179,8 +179,8 @@ public AsyncResultErrorEventArgs(
179179
CimSession session,
180180
IObservable<object> observable,
181181
Exception error,
182-
CimResultContext cimResultContext) :
183-
base(session, observable, AsyncResultType.Exception, cimResultContext)
182+
CimResultContext cimResultContext)
183+
: base(session, observable, AsyncResultType.Exception, cimResultContext)
184184
{
185185
this.error = error;
186186
}

src/Microsoft.PowerShell.Commands.Diagnostics/GetCounterCommand.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ public SwitchParameter Continuous
164164
FrenchCultureId, new List<Tuple<char, char>>()
165165
{
166166
// 'APOSTROPHE' to 'RIGHT SINGLE QUOTATION MARK'
167-
new Tuple<char, char>((char) 0x0027, (char) 0x2019),
167+
new Tuple<char, char>((char)0x0027, (char)0x2019),
168168
// 'MODIFIER LETTER APOSTROPHE' to 'RIGHT SINGLE QUOTATION MARK'
169-
new Tuple<char, char>((char) 0x02BC, (char) 0x2019),
169+
new Tuple<char, char>((char)0x02BC, (char)0x2019),
170170
// 'HEAVY SINGLE COMMA QUOTATION MARK ORNAMENT' to 'RIGHT SINGLE QUOTATION MARK'
171-
new Tuple<char, char>((char) 0x275C, (char) 0x2019),
171+
new Tuple<char, char>((char)0x275C, (char)0x2019),
172172
}
173173
}
174174
};

src/Microsoft.PowerShell.Commands.Management/commands/management/Navigation.cs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1609,8 +1609,7 @@ protected override void ProcessRecord()
16091609
if (!Force && drive == SessionState.Drive.Current)
16101610
{
16111611
PSInvalidOperationException invalidOperation =
1612-
(PSInvalidOperationException)
1613-
PSTraceSource.NewInvalidOperationException(
1612+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
16141613
NavigationResources.RemoveDriveInUse,
16151614
drive.Name);
16161615

@@ -2637,8 +2636,7 @@ protected override void ProcessRecord()
26372636
if (isCurrentLocationOrAncestor)
26382637
{
26392638
PSInvalidOperationException invalidOperation =
2640-
(PSInvalidOperationException)
2641-
PSTraceSource.NewInvalidOperationException(
2639+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
26422640
NavigationResources.RemoveItemInUse,
26432641
resolvedPath.Path);
26442642

@@ -3012,8 +3010,7 @@ private void MoveItem(string path, bool literalPath = false)
30123010
if (!InvokeProvider.Item.Exists(path, currentContext))
30133011
{
30143012
PSInvalidOperationException invalidOperation =
3015-
(PSInvalidOperationException)
3016-
PSTraceSource.NewInvalidOperationException(
3013+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
30173014
NavigationResources.MoveItemDoesntExist,
30183015
path);
30193016

@@ -3099,8 +3096,7 @@ private void MoveItem(string path, bool literalPath = false)
30993096
if (isCurrentLocationOrAncestor)
31003097
{
31013098
PSInvalidOperationException invalidOperation =
3102-
(PSInvalidOperationException)
3103-
PSTraceSource.NewInvalidOperationException(
3099+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
31043100
NavigationResources.MoveItemInUse,
31053101
path);
31063102

@@ -3354,8 +3350,7 @@ private void RenameItem(string path, bool literalPath = false)
33543350
if (!InvokeProvider.Item.Exists(path, currentContext))
33553351
{
33563352
PSInvalidOperationException invalidOperation =
3357-
(PSInvalidOperationException)
3358-
PSTraceSource.NewInvalidOperationException(
3353+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
33593354
NavigationResources.RenameItemDoesntExist,
33603355
path);
33613356

@@ -3441,8 +3436,7 @@ private void RenameItem(string path, bool literalPath = false)
34413436
if (isCurrentLocationOrAncestor)
34423437
{
34433438
PSInvalidOperationException invalidOperation =
3444-
(PSInvalidOperationException)
3445-
PSTraceSource.NewInvalidOperationException(
3439+
(PSInvalidOperationException)PSTraceSource.NewInvalidOperationException(
34463440
NavigationResources.RenamedItemInUse,
34473441
path);
34483442

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleControl.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,8 +551,7 @@ internal static void RemoveBreakHandler()
551551
{
552552
var handle = NativeMethods.CreateFile(
553553
"CONIN$",
554-
(UInt32)
555-
(NativeMethods.AccessQualifiers.GenericRead | NativeMethods.AccessQualifiers.GenericWrite),
554+
(UInt32)(NativeMethods.AccessQualifiers.GenericRead | NativeMethods.AccessQualifiers.GenericWrite),
556555
(UInt32)NativeMethods.ShareModes.ShareRead,
557556
(IntPtr)0,
558557
(UInt32)NativeMethods.CreationDisposition.OpenExisting,
@@ -2171,8 +2170,7 @@ private static void ReadConsoleOutputPlain
21712170
{
21722171
for (int c = atContentsCol; c < bufferSize.X + atContentsCol; c++, characterBufferIndex++)
21732172
{
2174-
contents[r, c].Character = (char)
2175-
characterBuffer[characterBufferIndex].UnicodeChar;
2173+
contents[r, c].Character = (char)characterBuffer[characterBufferIndex].UnicodeChar;
21762174
ConsoleColor fgColor, bgColor;
21772175
WORDToColor(characterBuffer[characterBufferIndex].Attributes,
21782176
out fgColor,

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleHost.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ internal static int Start(string bannerText, string helpText)
124124
try
125125
{
126126
string profileDir = Platform.CacheDirectory;
127-
#if ! UNIX
127+
#if !UNIX
128128
if (!Directory.Exists(profileDir))
129129
{
130130
Directory.CreateDirectory(profileDir);
@@ -2870,31 +2870,27 @@ private class ConsoleHostStartupException : Exception
28702870
{
28712871
internal
28722872
ConsoleHostStartupException()
2873-
:
2874-
base()
2873+
: base()
28752874
{
28762875
}
28772876

28782877
internal
28792878
ConsoleHostStartupException(string message)
2880-
:
2881-
base(message)
2879+
: base(message)
28822880
{
28832881
}
28842882

28852883
protected
28862884
ConsoleHostStartupException(
28872885
System.Runtime.Serialization.SerializationInfo info,
28882886
System.Runtime.Serialization.StreamingContext context)
2889-
:
2890-
base(info, context)
2887+
: base(info, context)
28912888
{
28922889
}
28932890

28942891
internal
28952892
ConsoleHostStartupException(string message, Exception innerException)
2896-
:
2897-
base(message, innerException)
2893+
: base(message, innerException)
28982894
{
28992895
}
29002896
}

src/Microsoft.PowerShell.ConsoleHost/host/msh/ConsoleTextWriter.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ class ConsoleTextWriter : TextWriter
1313
{
1414
internal
1515
ConsoleTextWriter(ConsoleHostUserInterface ui)
16-
:
17-
base(System.Globalization.CultureInfo.CurrentCulture)
16+
: base(System.Globalization.CultureInfo.CurrentCulture)
1817
{
1918
Dbg.Assert(ui != null, "ui needs a value");
2019

src/Microsoft.PowerShell.ConsoleHost/host/msh/ProgressNode.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,7 @@ namespace Microsoft.PowerShell
4747
/// </summary>
4848
internal
4949
ProgressNode(Int64 sourceId, ProgressRecord record)
50-
:
51-
base(record.ActivityId, record.Activity, record.StatusDescription)
50+
: base(record.ActivityId, record.Activity, record.StatusDescription)
5251
{
5352
Dbg.Assert(record.RecordType == ProgressRecordType.Processing, "should only create node for Processing records");
5453

src/Microsoft.PowerShell.ConsoleHost/host/msh/Serialization.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ class WrappedSerializer : Serialization
5858
{
5959
internal
6060
WrappedSerializer(DataFormat dataFormat, string streamName, TextWriter output)
61-
:
62-
base(dataFormat, streamName)
61+
: base(dataFormat, streamName)
6362
{
6463
Dbg.Assert(output != null, "output should have a value");
6564

@@ -147,8 +146,7 @@ class WrappedDeserializer : Serialization
147146
{
148147
internal
149148
WrappedDeserializer(DataFormat dataFormat, string streamName, TextReader input)
150-
:
151-
base(dataFormat, streamName)
149+
: base(dataFormat, streamName)
152150
{
153151
Dbg.Assert(input != null, "input should have a value");
154152

src/System.Management.Automation/FormatAndOutput/common/DisplayDatabase/FormatTable.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ public class FormatTableLoadException : RuntimeException
3232
/// <summary>
3333
/// This is the default constructor.
3434
/// </summary>
35-
public FormatTableLoadException() : base()
35+
public FormatTableLoadException()
36+
: base()
3637
{
3738
SetDefaultErrorRecord();
3839
}
@@ -43,7 +44,8 @@ public FormatTableLoadException() : base()
4344
/// <param name="message">
4445
/// A localized error message.
4546
/// </param>
46-
public FormatTableLoadException(string message) : base(message)
47+
public FormatTableLoadException(string message)
48+
: base(message)
4749
{
4850
SetDefaultErrorRecord();
4951
}
@@ -70,8 +72,8 @@ public FormatTableLoadException(string message, Exception innerException)
7072
/// <param name="loadErrors">
7173
/// The errors that occured
7274
/// </param>
73-
internal FormatTableLoadException(ConcurrentBag<string> loadErrors) :
74-
base(StringUtil.Format(FormatAndOutXmlLoadingStrings.FormatTableLoadErrors))
75+
internal FormatTableLoadException(ConcurrentBag<string> loadErrors)
76+
: base(StringUtil.Format(FormatAndOutXmlLoadingStrings.FormatTableLoadErrors))
7577
{
7678
_errors = new Collection<string>(loadErrors.ToArray());
7779
SetDefaultErrorRecord();

0 commit comments

Comments
 (0)