Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c31f276

Browse files
committed
Format source code
1 parent 0c3a942 commit c31f276

19 files changed

+947
-679
lines changed

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/PowerModeChangedEventArgs.cs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
9-
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
8+
9+
namespace Microsoft.Win32
10+
{
1011
/// <devdoc>
1112
/// <para>Provides data for the <see cref='Microsoft.Win32.SystemEvents.PowerModeChanged'/> event.</para>
1213
/// </devdoc>
1314
public class PowerModeChangedEventArgs : EventArgs
1415
{
15-
private readonly PowerModes mode;
16-
16+
private readonly PowerModes _mode;
17+
1718
/// <devdoc>
1819
/// <para>Initializes a new instance of the <see cref='Microsoft.Win32.PowerModeChangedEventArgs'/> class.</para>
1920
/// </devdoc>
20-
public PowerModeChangedEventArgs(PowerModes mode) {
21-
this.mode = mode;
21+
public PowerModeChangedEventArgs(PowerModes mode)
22+
{
23+
_mode = mode;
2224
}
23-
25+
2426
/// <devdoc>
2527
/// <para>Gets the power mode.</para>
2628
/// </devdoc>
27-
public PowerModes Mode {
28-
get {
29-
return mode;
29+
public PowerModes Mode
30+
{
31+
get
32+
{
33+
return _mode;
3034
}
3135
}
3236
}

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/PowerModeChangedEventHandler.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
98

9+
namespace Microsoft.Win32
10+
{
1011
/// <devdoc>
1112
/// <para>Represents the method that will handle the <see cref='Microsoft.Win32.SystemEvents.PowerModeChanged'/> event.</para>
1213
/// </devdoc>

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/PowerModes.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,34 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System.Diagnostics;
7-
using System;
5+
using System.Diagnostics;
6+
using System;
87

8+
namespace Microsoft.Win32
9+
{
910
/// <devdoc>
1011
/// <para> Specifies how the system
1112
/// power mode changes.</para>
1213
/// </devdoc>
13-
public enum PowerModes {
14-
14+
public enum PowerModes
15+
{
1516
/// <devdoc>
1617
/// <para> The system is about to resume.</para>
1718
/// </devdoc>
1819
Resume = 1,
19-
20+
2021
/// <devdoc>
2122
/// The power mode status has changed. This may
2223
/// indicate a weak or charging battery, a transition
2324
/// from AC power from battery, or other change in the
2425
/// status of the system power supply.
2526
/// </devdoc>
2627
StatusChange = 2,
27-
28+
2829
/// <devdoc>
2930
/// The system is about to be suspended.
3031
/// </devdoc>
3132
Suspend = 3,
32-
3333
}
3434
}
3535

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionEndReasons.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System.Diagnostics;
7-
using System;
5+
using System.Diagnostics;
6+
using System;
87

8+
namespace Microsoft.Win32
9+
{
910
/// <devdoc>
1011
/// <para> Specifies how the current
1112
/// logon session is ending.</para>
1213
/// </devdoc>
13-
public enum SessionEndReasons {
14-
14+
public enum SessionEndReasons
15+
{
1516
/// <devdoc>
1617
/// The user is logging off. The system may continue
1718
/// running but the user who started this application
1819
/// is logging off.
1920
/// </devdoc>
2021
Logoff = 1,
21-
22+
2223
/// <devdoc>
2324
/// The system is shutting down.
2425
/// </devdoc>
2526
SystemShutdown = 2,
26-
2727
}
2828
}
2929

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionEndedEventArgs.cs

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,35 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
98

10-
9+
namespace Microsoft.Win32
10+
{
1111
/// <devdoc>
1212
/// <para>Provides data for the <see cref='Microsoft.Win32.SystemEvents.SessionEnded'/> event.</para>
1313
/// </devdoc>
14-
public class SessionEndedEventArgs : EventArgs {
15-
16-
private readonly SessionEndReasons reason;
17-
14+
public class SessionEndedEventArgs : EventArgs
15+
{
16+
private readonly SessionEndReasons _reason;
17+
1818
/// <devdoc>
1919
/// <para>Initializes a new instance of the <see cref='Microsoft.Win32.SessionEndedEventArgs'/> class.</para>
2020
/// </devdoc>
21-
public SessionEndedEventArgs(SessionEndReasons reason) {
22-
this.reason = reason;
21+
public SessionEndedEventArgs(SessionEndReasons reason)
22+
{
23+
_reason = reason;
2324
}
24-
25+
2526
/// <devdoc>
2627
/// <para>Gets how the session ended.</para>
2728
/// </devdoc>
28-
public SessionEndReasons Reason {
29-
get {
30-
return reason;
29+
public SessionEndReasons Reason
30+
{
31+
get
32+
{
33+
return _reason;
3134
}
3235
}
3336
}

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionEndedEventHandler.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
9-
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
108

9+
namespace Microsoft.Win32
10+
{
1111
/// <devdoc>
1212
/// <para>Represents the method that will handle the <see cref='Microsoft.Win32.SystemEvents.SessionEnded'/> event.</para>
1313
/// </devdoc>

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionEndingEventArgs.cs

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,51 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
98

10-
9+
namespace Microsoft.Win32
10+
{
1111
/// <devdoc>
1212
/// <para>Provides data for the <see cref='Microsoft.Win32.SystemEvents.SessionEnding'/> event.</para>
1313
/// </devdoc>
14-
public class SessionEndingEventArgs : EventArgs {
15-
16-
private bool cancel;
17-
private readonly SessionEndReasons reason;
18-
14+
public class SessionEndingEventArgs : EventArgs
15+
{
16+
private bool _cancel;
17+
private readonly SessionEndReasons _reason;
18+
1919
/// <devdoc>
2020
/// <para>Initializes a new instance of the <see cref='Microsoft.Win32.SessionEndingEventArgs'/> class.</para>
2121
/// </devdoc>
22-
public SessionEndingEventArgs(SessionEndReasons reason) {
23-
this.reason = reason;
22+
public SessionEndingEventArgs(SessionEndReasons reason)
23+
{
24+
_reason = reason;
2425
}
25-
26+
2627
/// <devdoc>
2728
/// <para>Gets or sets a value indicating whether to cancel the user request to end the session.</para>
2829
/// </devdoc>
29-
public bool Cancel {
30-
get {
31-
return cancel;
30+
public bool Cancel
31+
{
32+
get
33+
{
34+
return _cancel;
3235
}
33-
set {
34-
cancel = value;
36+
set
37+
{
38+
_cancel = value;
3539
}
3640
}
37-
41+
3842
/// <devdoc>
3943
/// <para>Gets how the session is ending.</para>
4044
/// </devdoc>
41-
public SessionEndReasons Reason {
42-
get {
43-
return reason;
45+
public SessionEndReasons Reason
46+
{
47+
get
48+
{
49+
return _reason;
4450
}
4551
}
4652
}

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionEndingEventHandler.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
98

9+
namespace Microsoft.Win32
10+
{
1011
/// <devdoc>
1112
/// <para>Represents the method that will handle the <see cref='Microsoft.Win32.SystemEvents.SessionEnding'/> event.</para>
1213
/// </devdoc>

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchEventArgs.cs

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,35 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
9-
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
8+
9+
namespace Microsoft.Win32
10+
{
1011
/// <devdoc>
1112
/// <para>Provides data for the <see cref='Microsoft.Win32.SystemEvents.SessionSwitch'/> event.</para>
1213
/// </devdoc>
13-
public class SessionSwitchEventArgs : EventArgs {
14-
15-
private readonly SessionSwitchReason reason;
16-
14+
public class SessionSwitchEventArgs : EventArgs
15+
{
16+
private readonly SessionSwitchReason _reason;
17+
1718
/// <devdoc>
1819
/// <para>Initializes a new instance of the <see cref='Microsoft.Win32.SessionSwitchEventArgs'/> class.</para>
1920
/// </devdoc>
20-
public SessionSwitchEventArgs(SessionSwitchReason reason) {
21-
this.reason = reason;
21+
public SessionSwitchEventArgs(SessionSwitchReason reason)
22+
{
23+
_reason = reason;
2224
}
23-
25+
2426
/// <devdoc>
2527
/// <para>Gets the reason for the session switch.</para>
2628
/// </devdoc>
27-
public SessionSwitchReason Reason {
28-
get {
29-
return reason;
29+
public SessionSwitchReason Reason
30+
{
31+
get
32+
{
33+
return _reason;
3034
}
3135
}
3236
}

src/Microsoft.Win32.SystemEvents/src/Microsoft/Win32/SessionSwitchEventHandler.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5-
namespace Microsoft.Win32 {
6-
using System;
7-
using System.Diagnostics;
8-
using System.Security.Permissions;
5+
using System;
6+
using System.Diagnostics;
7+
using System.Security.Permissions;
98

9+
namespace Microsoft.Win32
10+
{
1011
/// <devdoc>
1112
/// <para>Represents the method that will handle the <see cref='Microsoft.Win32.SystemEvents.SessionSwitch'/> event.</para>
1213
/// </devdoc>

0 commit comments

Comments
 (0)