diff --git a/OpenRA.Game/CryptoUtil.cs b/OpenRA.Game/CryptoUtil.cs index 8a3b973f4f..43958df0c0 100644 --- a/OpenRA.Game/CryptoUtil.cs +++ b/OpenRA.Game/CryptoUtil.cs @@ -123,14 +123,14 @@ namespace OpenRA // SEQUENCE -> BIT_STRING -> SEQUENCE -> INTEGER // Modulus is padded with a zero to avoid issues with the sign bit - writer.Write((byte)0x02); + writer.Write((byte)0x02); WriteTLVLength(writer, parameters.Modulus.Length + 1); writer.Write((byte)0); writer.Write(parameters.Modulus); // SEQUENCE -> BIT_STRING -> SEQUENCE -> INTEGER // Exponent is padded with a zero to avoid issues with the sign bit - writer.Write((byte)0x02); + writer.Write((byte)0x02); WriteTLVLength(writer, parameters.Exponent.Length + 1); writer.Write((byte)0); writer.Write(parameters.Exponent); @@ -180,7 +180,7 @@ namespace OpenRA try { using (var rsa = new RSACryptoServiceProvider()) - { + { rsa.ImportParameters(parameters); return Encoding.UTF8.GetString(rsa.Decrypt(Convert.FromBase64String(data), false)); } @@ -203,7 +203,7 @@ namespace OpenRA try { using (var rsa = new RSACryptoServiceProvider()) - { + { rsa.ImportParameters(parameters); using (var csp = SHA1.Create()) return Convert.ToBase64String(rsa.SignHash(csp.ComputeHash(data), CryptoConfig.MapNameToOID("SHA1"))); @@ -227,7 +227,7 @@ namespace OpenRA try { using (var rsa = new RSACryptoServiceProvider()) - { + { rsa.ImportParameters(parameters); using (var csp = SHA1.Create()) return rsa.VerifyHash(csp.ComputeHash(data), CryptoConfig.MapNameToOID("SHA1"), Convert.FromBase64String(signature)); diff --git a/OpenRA.Game/Support/VariableExpression.cs b/OpenRA.Game/Support/VariableExpression.cs index e02a8e58bd..c7bfb6e13f 100644 --- a/OpenRA.Game/Support/VariableExpression.cs +++ b/OpenRA.Game/Support/VariableExpression.cs @@ -168,8 +168,8 @@ namespace OpenRA.Support public readonly Grouping Closes; public TokenTypeInfo(string symbol, Precedence precedence, Sides operandSides = Sides.None, - Associativity associativity = Associativity.Left, - Grouping opens = Grouping.None, Grouping closes = Grouping.None) + Associativity associativity = Associativity.Left, + Grouping opens = Grouping.None, Grouping closes = Grouping.None) { Symbol = symbol; Precedence = precedence; @@ -181,9 +181,9 @@ namespace OpenRA.Support } public TokenTypeInfo(string symbol, Precedence precedence, Sides operandSides, - Sides whitespaceSides, - Associativity associativity = Associativity.Left, - Grouping opens = Grouping.None, Grouping closes = Grouping.None) + Sides whitespaceSides, + Associativity associativity = Associativity.Left, + Grouping opens = Grouping.None, Grouping closes = Grouping.None) { Symbol = symbol; Precedence = precedence; @@ -195,15 +195,14 @@ namespace OpenRA.Support } public TokenTypeInfo(string symbol, Precedence precedence, Grouping opens, Grouping closes = Grouping.None, - Associativity associativity = Associativity.Left) + Associativity associativity = Associativity.Left) { Symbol = symbol; Precedence = precedence; WhitespaceSides = Sides.None; OperandSides = opens == Grouping.None ? - (closes == Grouping.None ? Sides.None : Sides.Left) - : - (closes == Grouping.None ? Sides.Right : Sides.Both); + (closes == Grouping.None ? Sides.None : Sides.Left) : + (closes == Grouping.None ? Sides.Right : Sides.Both); Associativity = associativity; Opens = opens; Closes = closes; diff --git a/OpenRA.Mods.Common/Graphics/TextRenderable.cs b/OpenRA.Mods.Common/Graphics/TextRenderable.cs index b6f4b3154b..57820a9246 100644 --- a/OpenRA.Mods.Common/Graphics/TextRenderable.cs +++ b/OpenRA.Mods.Common/Graphics/TextRenderable.cs @@ -39,9 +39,9 @@ namespace OpenRA.Mods.Common.Graphics public TextRenderable(SpriteFont font, WPos pos, int zOffset, Color color, string text) : this(font, pos, zOffset, color, - ChromeMetrics.Get("TextContrastColorDark"), - ChromeMetrics.Get("TextContrastColorLight"), - text) { } + ChromeMetrics.Get("TextContrastColorDark"), + ChromeMetrics.Get("TextContrastColorLight"), + text) { } public WPos Pos { get { return pos; } } public PaletteReference Palette { get { return null; } } diff --git a/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs b/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs index 8b2f9aad10..32762170bd 100644 --- a/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs +++ b/OpenRA.Mods.Common/Scripting/Global/TriggerGlobal.cs @@ -52,7 +52,7 @@ namespace OpenRA.Mods.Common.Scripting } [Desc("Call a function for each passenger when it enters a transport. " + - "The callback function will be called as func(Actor transport, Actor passenger).")] + "The callback function will be called as func(Actor transport, Actor passenger).")] public void OnPassengerEntered(Actor a, LuaFunction func) { GetScriptTriggers(a).RegisterCallback(Trigger.OnPassengerEntered, func, Context); diff --git a/OpenRA.Mods.Common/Traits/Carryall.cs b/OpenRA.Mods.Common/Traits/Carryall.cs index 55923a34ed..dc4ebe0aff 100644 --- a/OpenRA.Mods.Common/Traits/Carryall.cs +++ b/OpenRA.Mods.Common/Traits/Carryall.cs @@ -112,11 +112,11 @@ namespace OpenRA.Mods.Common.Traits if (State == CarryallState.Carrying) { if (!Carryable.IsDead) - { - var positionable = Carryable.Trait(); - positionable.SetPosition(Carryable, self.Location); - Carryable.Kill(e.Attacker); - } + { + var positionable = Carryable.Trait(); + positionable.SetPosition(Carryable, self.Location); + Carryable.Kill(e.Attacker); + } Carryable = null; } diff --git a/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs b/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs index 039ad3c3f8..2ee86e8499 100644 --- a/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs +++ b/OpenRA.Mods.Common/Traits/ExitsDebugOverlay.cs @@ -100,6 +100,6 @@ namespace OpenRA.Mods.Common.Traits rgbaRenderer.DrawLine(wr.Screen3DPosition(spawnPos), wr.Screen3DPosition(exitCellCenter), 1f, self.Owner.Color.RGB); } } - } + } } } diff --git a/OpenRA.Mods.Common/UtilityCommands/CheckExplicitInterfacesCommand.cs b/OpenRA.Mods.Common/UtilityCommands/CheckExplicitInterfacesCommand.cs index 2b24c7f5d8..f02622a0d4 100644 --- a/OpenRA.Mods.Common/UtilityCommands/CheckExplicitInterfacesCommand.cs +++ b/OpenRA.Mods.Common/UtilityCommands/CheckExplicitInterfacesCommand.cs @@ -67,15 +67,15 @@ namespace OpenRA.Mods.Common.UtilityCommands var allMatch = true; for (var i = 0; i < lenImpl; i++) { - var implementingParam = implementingMethodParams[i]; - var interfaceParam = interfaceMethodParams[i]; - if (implementingParam.ParameterType != interfaceParam.ParameterType + var implementingParam = implementingMethodParams[i]; + var interfaceParam = interfaceMethodParams[i]; + if (implementingParam.ParameterType != interfaceParam.ParameterType || implementingParam.Name != interfaceParam.Name || implementingParam.IsOut != interfaceParam.IsOut) - { + { allMatch = false; break; - } + } } // Explicitly implemented methods are never public in C#. diff --git a/OpenRA.Test/OpenRA.Game/VariableExpressionTest.cs b/OpenRA.Test/OpenRA.Game/VariableExpressionTest.cs index e243a03843..7087c22c7b 100644 --- a/OpenRA.Test/OpenRA.Game/VariableExpressionTest.cs +++ b/OpenRA.Test/OpenRA.Game/VariableExpressionTest.cs @@ -52,8 +52,8 @@ namespace OpenRA.Test void AssertParseFailure(string expression, string errorMessage) { var actualErrorMessage = Assert.Throws(typeof(InvalidDataException), - () => new IntegerExpression(expression).Evaluate(testValues), - expression).Message; + () => new IntegerExpression(expression).Evaluate(testValues), + expression).Message; Assert.AreEqual(errorMessage, actualErrorMessage, expression + " ===> " + actualErrorMessage); }