Adds style cop (#109)

This commit is contained in:
Kamron Batman 2020-04-26 00:16:02 -07:00 • committed by GitHub
parent 3e715bcb60
commit 556a17aba8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1725 changed files with 33831 additions and 38046 deletions

View file

@ -18,7 +18,6 @@
*
***************************************************************************/
using System;
using System.IO;
#if !MONO
@ -34,11 +33,11 @@ namespace Server
public const int KB = 1024;
public const int MB = 1024 * KB;
public static int BufferSize{ get; set; } = 1 * MB;
public static int BufferSize { get; set; } = 1 * MB;
public static int Concurrency{ get; set; } = 1;
public static int Concurrency { get; set; } = 1;
public static bool Unbuffered{ get; set; } = true;
public static bool Unbuffered { get; set; } = true;
public static bool AreSynchronous => Concurrency < 1;
@ -46,7 +45,7 @@ namespace Server
public static FileStream OpenSequentialStream(string path, FileMode mode, FileAccess access, FileShare share)
{
FileOptions options = FileOptions.SequentialScan;
var options = FileOptions.SequentialScan;
if (Concurrency > 0)
options |= FileOptions.Asynchronous;
@ -59,7 +58,7 @@ namespace Server
else
return new FileStream(path, mode, access, share, BufferSize, options);
SafeFileHandle fileHandle =
var fileHandle =
UnsafeNativeMethods.CreateFile(path, (int)access, share, IntPtr.Zero, mode, (int)options, IntPtr.Zero);
if (fileHandle.IsInvalid) throw new IOException();