From f9f546cdabd928cabeae7637685e2cefa5ca5e92 Mon Sep 17 00:00:00 2001 From: Michael Becker Date: Sat, 17 Aug 2019 16:47:47 -0400 Subject: [PATCH] Fix spacing C# formatting issue --- .../Libraries/UniversalEditor.Core/IO/Writer.cs | 16 ++++++++-------- CSharp/UniversalEditor.sln | 16 ---------------- 2 files changed, 8 insertions(+), 24 deletions(-) diff --git a/CSharp/Libraries/UniversalEditor.Core/IO/Writer.cs b/CSharp/Libraries/UniversalEditor.Core/IO/Writer.cs index 78e2a874..5eaa4f83 100644 --- a/CSharp/Libraries/UniversalEditor.Core/IO/Writer.cs +++ b/CSharp/Libraries/UniversalEditor.Core/IO/Writer.cs @@ -190,7 +190,7 @@ namespace UniversalEditor.IO public void WriteNullTerminatedString(string sz, Encoding encoding) { byte[] values = encoding.GetBytes(sz); - + WriteBytes(values); WriteInt16(0); } @@ -206,7 +206,7 @@ namespace UniversalEditor.IO string ssz = sz.Substring(0, Math.Min(sz.Length, length) - 1); WriteNullTerminatedString(ssz, encoding); } - + /// /// Writes a two-byte signed integer to the current stream and advances the stream position by two bytes. /// @@ -285,7 +285,7 @@ namespace UniversalEditor.IO /// The three-byte signed integer to write. /// An I/O error occurs. /// The stream is closed. - public void WriteInt24 (int value) + public void WriteInt24(int value) { byte[] buffer = new byte[3]; if (base.Endianness == Endianness.BigEndian) @@ -535,8 +535,8 @@ namespace UniversalEditor.IO /// The stream is closed. public void WriteObject(object value) { - Type objectType = value.GetType (); - + Type objectType = value.GetType(); + if (objectType == typeof(Byte)) { WriteByte((byte)value); @@ -612,12 +612,12 @@ namespace UniversalEditor.IO WriteDateTime((DateTime)value); return; } - - System.Reflection.FieldInfo[] fis = (objectType.GetFields (System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)); + + System.Reflection.FieldInfo[] fis = (objectType.GetFields(System.Reflection.BindingFlags.Default | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance)); foreach (System.Reflection.FieldInfo fi in fis) { // Type fieldType = fi.FieldType; - WriteObject (fi.GetValue (value)); + WriteObject(fi.GetValue(value)); } } /// diff --git a/CSharp/UniversalEditor.sln b/CSharp/UniversalEditor.sln index 3a25a9c4..be2375a7 100644 --- a/CSharp/UniversalEditor.sln +++ b/CSharp/UniversalEditor.sln @@ -470,22 +470,6 @@ Global $4.AfterDelegateDeclarationParameterComma = True $4.scope = text/x-csharp $4.IndentSwitchSection = False - $4.NewLinesForBracesInProperties = False - $4.NewLinesForBracesInAccessors = False - $4.NewLinesForBracesInAnonymousMethods = False - $4.NewLinesForBracesInControlBlocks = False - $4.NewLinesForBracesInAnonymousTypes = False - $4.NewLinesForBracesInObjectCollectionArrayInitializers = False - $4.NewLinesForBracesInLambdaExpressionBody = False - $4.NewLineForElse = False - $4.NewLineForCatch = False - $4.NewLineForFinally = False - $4.NewLineForMembersInObjectInit = False - $4.NewLineForMembersInAnonymousTypes = False - $4.NewLineForClausesInQuery = False - $4.SpacingAfterMethodDeclarationName = True - $4.SpaceAfterMethodCallName = True - $4.SpaceBeforeOpenSquareBracket = True StartupItem = Applications\UniversalEditor.Bootstrapper\UniversalEditor.Bootstrapper.csproj EndGlobalSection GlobalSection(SolutionProperties) = preSolution