Skip to content

Commit 6848544

Browse files
committed
Code style fixes
***NO_CI***
1 parent 2bd1b7e commit 6848544

File tree

5 files changed

+27
-27
lines changed

5 files changed

+27
-27
lines changed

nanoFramework.System.Net.Http/Http/System.Net.HttpListener.cs

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public class HttpListener
109109
/// </remarks>
110110
public SslProtocols SslProtocols
111111
#pragma warning restore S2292 // Trivial properties should be auto-implemented
112-
// nanoFramework doesn't support auto-properties
112+
// nanoFramework doesn't support auto-properties
113113
{
114114
get { return m_sslProtocols; }
115115
set { m_sslProtocols = value; }
@@ -194,7 +194,7 @@ private void InitListener(string prefix, int port)
194194
/// <param name="clientStream">The stream to add.</param>
195195
internal void AddClientStream(OutputNetworkStreamWrapper clientStream)
196196
{
197-
lock(m_ClientStreams)
197+
lock (m_ClientStreams)
198198
{
199199
m_ClientStreams.Add(clientStream);
200200
}
@@ -207,7 +207,7 @@ internal void AddClientStream(OutputNetworkStreamWrapper clientStream)
207207
/// <param name="clientStream">The stream to remove.</param>
208208
internal void RemoveClientStream(OutputNetworkStreamWrapper clientStream)
209209
{
210-
lock(m_ClientStreams)
210+
lock (m_ClientStreams)
211211
{
212212
for (int i = 0; i < m_ClientStreams.Count; i++)
213213
{
@@ -283,7 +283,7 @@ private void WaitingConnectionThreadFunc(OutputNetworkStreamWrapper outputStream
283283
outputStream.Dispose();
284284
}
285285
}
286-
catch(Exception ex)
286+
catch (Exception ex)
287287
{
288288
Debug.WriteLine(ex.Message);
289289
}
@@ -310,7 +310,7 @@ public void Abort()
310310
{
311311
// First we shut down the service.
312312
Close();
313-
313+
314314
// Now we need to go through list of all client sockets and close all of them.
315315
// This will cause exceptions on read/write operations on these sockets.
316316
foreach (OutputNetworkStreamWrapper netStream in m_ClientStreams)
@@ -418,7 +418,7 @@ private void AcceptThreadFunc()
418418
// Throws exception if this fails
419419
// pass the server certificate
420420
// do not require client certificate
421-
((SslStream)netStream).AuthenticateAsServer(m_httpsCert, false, m_sslProtocols);
421+
((SslStream)netStream).AuthenticateAsServer(m_httpsCert, false, m_sslProtocols);
422422

423423
netStream.ReadTimeout = 10000;
424424
}
@@ -465,13 +465,13 @@ public void Start()
465465
lock (lockObj)
466466
{
467467
if (m_Closed) throw new ObjectDisposedException();
468-
468+
469469
// If service was already started, the call has no effect.
470470
if (m_ServiceRunning)
471471
{
472472
return;
473473
}
474-
474+
475475
m_listener = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
476476

477477
try
@@ -532,7 +532,7 @@ public void Close()
532532
{
533533
// empty on purpose to catch any exceptions thrown when calling the Stop above
534534
}
535-
535+
536536
m_Closed = true;
537537
}
538538
}
@@ -549,19 +549,19 @@ public void Close()
549549
/// </para>
550550
/// </remarks>
551551
public void Stop()
552-
{
552+
{
553553
// Need to lock access to object, because Stop can be called from a
554554
// different thread.
555555
lock (lockObj)
556556
{
557557
if (m_Closed) throw new ObjectDisposedException();
558-
558+
559559
m_ServiceRunning = false;
560-
560+
561561
// We close the server socket that listen for incoming connection.
562562
// Connections that already accepted are processed.
563563
// Connections that has been in queue for server socket, but not accepted, are lost.
564-
if(m_listener != null)
564+
if (m_listener != null)
565565
{
566566
m_listener.Close();
567567
m_listener = null;
@@ -604,7 +604,7 @@ public HttpListenerContext GetContext()
604604
lock (lockObj)
605605
{
606606
if (m_Closed) throw new ObjectDisposedException();
607-
607+
608608
if (!m_ServiceRunning) throw new InvalidOperationException();
609609
}
610610

@@ -640,7 +640,7 @@ public HttpListenerContext GetContext()
640640
/// <itemref>false</itemref>.</value>
641641
public bool IsListening
642642
{
643-
get { return m_ServiceRunning; }
643+
get { return m_ServiceRunning; }
644644
}
645645

646646
/// <summary>
@@ -666,7 +666,7 @@ public int MaximumResponseHeadersLength
666666
#pragma warning disable S3928 // Parameter names used into ArgumentException constructors should match an existing one
667667
throw new ArgumentOutOfRangeException();
668668
#pragma warning restore S3928 // Parameter names used into ArgumentException constructors should match an existing one
669-
// can't add description as that would increase the deployment image size
669+
// can't add description as that would increase the deployment image size
670670
}
671671

672672
m_maxResponseHeadersLen = value;
@@ -679,7 +679,7 @@ public int MaximumResponseHeadersLength
679679
/// </summary>
680680
public X509Certificate HttpsCert
681681
#pragma warning restore S2292 // Trivial properties should be auto-implemented
682-
// nanoFramework doesn't support auto-properties
682+
// nanoFramework doesn't support auto-properties
683683
{
684684
get { return m_httpsCert; }
685685
set { m_httpsCert = value; }

nanoFramework.System.Net.Http/Http/System.Net.HttpUtility.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public static byte[] UrlEncodeToBytes(string str, Encoding e)
8282
}
8383

8484
var bytes = e.GetBytes(str);
85-
85+
8686
return UrlEncodeBytesToBytesInternal(bytes, 0, bytes.Length, false);
8787
}
8888

@@ -117,11 +117,11 @@ private static byte[] UrlEncodeBytesToBytesInternal(
117117
{
118118
var num = 0;
119119
var num2 = 0;
120-
120+
121121
for (var i = 0; i < count; i++)
122122
{
123123
var ch = (char)bytes[offset + i];
124-
124+
125125
if (ch == ' ')
126126
{
127127
num++;
@@ -139,12 +139,12 @@ private static byte[] UrlEncodeBytesToBytesInternal(
139139

140140
var buffer = new byte[count + (num2 * 2)];
141141
var num4 = 0;
142-
142+
143143
for (var j = 0; j < count; j++)
144144
{
145145
var num6 = bytes[offset + j];
146146
var ch2 = (char)num6;
147-
147+
148148
if (IsSafe(ch2))
149149
{
150150
buffer[num4++] = num6;

nanoFramework.System.Net.Http/Http/System.Net.Internal.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public class HttpKnownHeaderNames
148148
/// <summary>The <b>Accept-Ranges</b> HTTP header.</summary>
149149
public const string AcceptRanges = "Accept-Ranges";
150150
/// <summary>The <b>MIME-Version</b> HTTP header.</summary>
151-
public const string MimeVersion = "MIME-Version";
151+
public const string MimeVersion = "MIME-Version";
152152
/// <summary>
153153
/// The <b>Sec-WebSocket-Accept</b> HTTP header.
154154
/// </summary>

nanoFramework.System.Net.Http/Http/System.Net._HttpDateParse.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ out DateTime dtOut
458458
if (iLastLettered == DATE_ANSI_INDEX_YEAR)
459459
{
460460
// this should be an unusual case.
461-
// FIXME dtOut = dtOut.ToUniversalTime();
461+
// FIXME dtOut = dtOut.ToUniversalTime();
462462
}
463463

464464
//
@@ -480,9 +480,9 @@ out DateTime dtOut
480480
dtOut.AddHours(offset);
481481
}
482482

483-
// In the end, we leave it all in LocalTime
483+
// In the end, we leave it all in LocalTime
484484

485-
// FIXME dtOut = dtOut.ToLocalTime();
485+
// FIXME dtOut = dtOut.ToLocalTime();
486486

487487
quit:
488488

nanoFramework.System.Net.Http/Http/System.Uri.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1197,7 +1197,7 @@ public static bool IsWellFormedUriString(
11971197
return false;
11981198
}
11991199

1200-
default:
1200+
default:
12011201
return false;
12021202
}
12031203
}

0 commit comments

Comments
 (0)