diff options
author | Stephen Toub <stoub@microsoft.com> | 2016-12-09 18:00:05 +0300 |
---|---|---|
committer | Stephen Toub <stoub@microsoft.com> | 2016-12-09 18:27:00 +0300 |
commit | d9d1e815ad6c642cf5d61afa4a16726548598bb2 (patch) | |
tree | 4ae7e2997cf097ab205481e67b95e24151909830 /src/System.Net.Mail | |
parent | 6f48f1959c292aa78fe38902f62e9dd33436c6c5 (diff) |
Replace "readonly static" with "static readonly"
There are ~4000 occurrences in corefx of "static readonly". There are ~200 occurrences of corefx of "readonly static". Replacing all of the straggler "readonly static" cases with "static readonly" to make things consistent.
Diffstat (limited to 'src/System.Net.Mail')
5 files changed, 24 insertions, 24 deletions
diff --git a/src/System.Net.Mail/src/System/Net/Base64Stream.cs b/src/System.Net.Mail/src/System/Net/Base64Stream.cs index cd3b476c52..5217a7c9a1 100644 --- a/src/System.Net.Mail/src/System/Net/Base64Stream.cs +++ b/src/System.Net.Mail/src/System/Net/Base64Stream.cs @@ -499,7 +499,7 @@ namespace System.Net private sealed class WriteAsyncResult : LazyAsyncResult { - private readonly static AsyncCallback s_onWrite = OnWrite; + private static readonly AsyncCallback s_onWrite = OnWrite; private readonly Base64Stream _parent; private readonly byte[] _buffer; diff --git a/src/System.Net.Mail/src/System/Net/Mail/SmtpCommands.cs b/src/System.Net.Mail/src/System/Net/Mail/SmtpCommands.cs index bd143c1e08..7bbadc19f7 100644 --- a/src/System.Net.Mail/src/System/Net/Mail/SmtpCommands.cs +++ b/src/System.Net.Mail/src/System/Net/Mail/SmtpCommands.cs @@ -639,25 +639,25 @@ namespace System.Net.Mail internal static class SmtpCommands { - internal readonly static byte[] Auth = Encoding.ASCII.GetBytes("AUTH "); - internal readonly static byte[] CRLF = Encoding.ASCII.GetBytes("\r\n"); - internal readonly static byte[] Data = Encoding.ASCII.GetBytes("DATA\r\n"); - internal readonly static byte[] DataStop = Encoding.ASCII.GetBytes("\r\n.\r\n"); - internal readonly static byte[] EHello = Encoding.ASCII.GetBytes("EHLO "); - internal readonly static byte[] Expand = Encoding.ASCII.GetBytes("EXPN "); - internal readonly static byte[] Hello = Encoding.ASCII.GetBytes("HELO "); - internal readonly static byte[] Help = Encoding.ASCII.GetBytes("HELP"); - internal readonly static byte[] Mail = Encoding.ASCII.GetBytes("MAIL FROM:"); - internal readonly static byte[] Noop = Encoding.ASCII.GetBytes("NOOP\r\n"); - internal readonly static byte[] Quit = Encoding.ASCII.GetBytes("QUIT\r\n"); - internal readonly static byte[] Recipient = Encoding.ASCII.GetBytes("RCPT TO:"); - internal readonly static byte[] Reset = Encoding.ASCII.GetBytes("RSET\r\n"); - internal readonly static byte[] Send = Encoding.ASCII.GetBytes("SEND FROM:"); - internal readonly static byte[] SendAndMail = Encoding.ASCII.GetBytes("SAML FROM:"); - internal readonly static byte[] SendOrMail = Encoding.ASCII.GetBytes("SOML FROM:"); - internal readonly static byte[] Turn = Encoding.ASCII.GetBytes("TURN\r\n"); - internal readonly static byte[] Verify = Encoding.ASCII.GetBytes("VRFY "); - internal readonly static byte[] StartTls = Encoding.ASCII.GetBytes("STARTTLS"); + internal static readonly byte[] Auth = Encoding.ASCII.GetBytes("AUTH "); + internal static readonly byte[] CRLF = Encoding.ASCII.GetBytes("\r\n"); + internal static readonly byte[] Data = Encoding.ASCII.GetBytes("DATA\r\n"); + internal static readonly byte[] DataStop = Encoding.ASCII.GetBytes("\r\n.\r\n"); + internal static readonly byte[] EHello = Encoding.ASCII.GetBytes("EHLO "); + internal static readonly byte[] Expand = Encoding.ASCII.GetBytes("EXPN "); + internal static readonly byte[] Hello = Encoding.ASCII.GetBytes("HELO "); + internal static readonly byte[] Help = Encoding.ASCII.GetBytes("HELP"); + internal static readonly byte[] Mail = Encoding.ASCII.GetBytes("MAIL FROM:"); + internal static readonly byte[] Noop = Encoding.ASCII.GetBytes("NOOP\r\n"); + internal static readonly byte[] Quit = Encoding.ASCII.GetBytes("QUIT\r\n"); + internal static readonly byte[] Recipient = Encoding.ASCII.GetBytes("RCPT TO:"); + internal static readonly byte[] Reset = Encoding.ASCII.GetBytes("RSET\r\n"); + internal static readonly byte[] Send = Encoding.ASCII.GetBytes("SEND FROM:"); + internal static readonly byte[] SendAndMail = Encoding.ASCII.GetBytes("SAML FROM:"); + internal static readonly byte[] SendOrMail = Encoding.ASCII.GetBytes("SOML FROM:"); + internal static readonly byte[] Turn = Encoding.ASCII.GetBytes("TURN\r\n"); + internal static readonly byte[] Verify = Encoding.ASCII.GetBytes("VRFY "); + internal static readonly byte[] StartTls = Encoding.ASCII.GetBytes("STARTTLS"); } diff --git a/src/System.Net.Mail/src/System/Net/Mime/QEncodedStream.cs b/src/System.Net.Mail/src/System/Net/Mime/QEncodedStream.cs index ca7343910a..1f73dacfda 100644 --- a/src/System.Net.Mail/src/System/Net/Mime/QEncodedStream.cs +++ b/src/System.Net.Mail/src/System/Net/Mime/QEncodedStream.cs @@ -322,7 +322,7 @@ namespace System.Net.Mime private class WriteAsyncResult : LazyAsyncResult { - private readonly static AsyncCallback s_onWrite = OnWrite; + private static readonly AsyncCallback s_onWrite = OnWrite; private readonly QEncodedStream _parent; private readonly byte[] _buffer; diff --git a/src/System.Net.Mail/src/System/Net/Mime/QuotedPrintableStream.cs b/src/System.Net.Mail/src/System/Net/Mime/QuotedPrintableStream.cs index 4982a67654..e70646283e 100644 --- a/src/System.Net.Mail/src/System/Net/Mime/QuotedPrintableStream.cs +++ b/src/System.Net.Mail/src/System/Net/Mime/QuotedPrintableStream.cs @@ -376,7 +376,7 @@ namespace System.Net.Mime private readonly byte[] _buffer; private readonly int _offset; private readonly int _count; - private readonly static AsyncCallback s_onWrite = new AsyncCallback(OnWrite); + private static readonly AsyncCallback s_onWrite = new AsyncCallback(OnWrite); private int _written; internal WriteAsyncResult(QuotedPrintableStream parent, byte[] buffer, int offset, int count, AsyncCallback callback, object state) : base(null, state, callback) diff --git a/src/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs b/src/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs index adf08d9162..17c431f786 100644 --- a/src/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs +++ b/src/System.Net.Mail/src/System/Net/Mime/SmtpDateTime.cs @@ -58,7 +58,7 @@ namespace System.Net.Mime // array of all possible date time values // if a string matches any one of these it will be parsed correctly - internal readonly static string[] s_validDateTimeFormats = new string[] + internal static readonly string[] s_validDateTimeFormats = new string[] { DateFormatWithDayOfWeek, DateFormatWithoutDayOfWeek, @@ -66,7 +66,7 @@ namespace System.Net.Mime DateFormatWithoutDayOfWeekAndNoSeconds }; - internal readonly static char[] s_allowedWhiteSpaceChars = new char[] { ' ', '\t' }; + internal static readonly char[] s_allowedWhiteSpaceChars = new char[] { ' ', '\t' }; internal static readonly Dictionary<string, TimeSpan> s_timeZoneOffsetLookup = InitializeShortHandLookups(); |