From a4fa272b80be9d3bd1085d029c4a648997dac9b7 Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Sun, 25 Jan 2015 11:38:49 +0100 Subject: [PATCH 1/3] style: change readonly static to static readonly Nitpick fix code to use 'static readonly' vs 'readonly static', as this is consistent with bulk of code base. --- src/Orleans/Logging/TraceLogger.cs | 2 +- src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Orleans/Logging/TraceLogger.cs b/src/Orleans/Logging/TraceLogger.cs index 5c8deeb88e1..63e95347788 100644 --- a/src/Orleans/Logging/TraceLogger.cs +++ b/src/Orleans/Logging/TraceLogger.cs @@ -126,7 +126,7 @@ public enum LoggerType private readonly LoggerType loggerType; private readonly string logName; - private readonly static object lockable; + private static readonly object lockable; private static readonly List> traceLevelOverrides = new List>(); diff --git a/src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs b/src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs index c975b8bc3d6..966748cf384 100644 --- a/src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs +++ b/src/OrleansRuntime/Messaging/IncomingMessageAcceptor.cs @@ -35,7 +35,7 @@ internal class IncomingMessageAcceptor : AsynchAgent private readonly IPEndPoint listenAddress; private Action sniffIncomingMessageHandler; - internal readonly static string PingHeader = Message.Header.APPLICATION_HEADER_FLAG + Message.Header.PING_APPLICATION_HEADER; + internal static readonly string PingHeader = Message.Header.APPLICATION_HEADER_FLAG + Message.Header.PING_APPLICATION_HEADER; internal Socket AcceptingSocket; protected MessageCenter MessageCenter; From d78c380faf8d4e2d64fa432d2d53cc73f93d2521 Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Sun, 25 Jan 2015 11:52:04 +0100 Subject: [PATCH 2/3] style: change 'static internal' to 'internal static' Nitpick fix code to use 'internal static' vs 'static internal', as this is consistent with bulk of code base. --- .../Serialization/SerializerGenerationUtilities.cs | 6 +++--- src/Orleans/Serialization/SerializationManager.cs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ClientGenerator/Serialization/SerializerGenerationUtilities.cs b/src/ClientGenerator/Serialization/SerializerGenerationUtilities.cs index 1a54832c208..3606107645b 100644 --- a/src/ClientGenerator/Serialization/SerializerGenerationUtilities.cs +++ b/src/ClientGenerator/Serialization/SerializerGenerationUtilities.cs @@ -30,7 +30,7 @@ namespace Orleans.CodeGeneration.Serialization { class SerializerGenerationUtilities { - static internal CodeMemberMethod GenerateCopier(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) + internal static CodeMemberMethod GenerateCopier(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) { var copier = new CodeMemberMethod { Name = name }; copier.Attributes = (copier.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public; @@ -42,7 +42,7 @@ static internal CodeMemberMethod GenerateCopier(string name, string typeName, Co return copier; } - static internal CodeMemberMethod GenerateSerializer(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) + internal static CodeMemberMethod GenerateSerializer(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) { var serializer = new CodeMemberMethod { Name = name }; serializer.Attributes = (serializer.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public; @@ -56,7 +56,7 @@ static internal CodeMemberMethod GenerateSerializer(string name, string typeName return serializer; } - static internal CodeMemberMethod GenerateDeserializer(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) + internal static CodeMemberMethod GenerateDeserializer(string name, string typeName, CodeTypeParameterCollection genericTypeParams = null) { var deserializer = new CodeMemberMethod { Name = name }; deserializer.Attributes = (deserializer.Attributes & ~MemberAttributes.AccessMask) | MemberAttributes.Public; diff --git a/src/Orleans/Serialization/SerializationManager.cs b/src/Orleans/Serialization/SerializationManager.cs index 97c8b2b47e1..bd9261ae622 100644 --- a/src/Orleans/Serialization/SerializationManager.cs +++ b/src/Orleans/Serialization/SerializationManager.cs @@ -133,7 +133,7 @@ internal static bool UseStandardSerializer #region Static initialization - static internal void Initialize(bool useStandardSerializer) + internal static void Initialize(bool useStandardSerializer) { UseStandardSerializer = useStandardSerializer; if (StatisticsCollector.CollectSerializationStats) From 60a99fd8195d58f0085b82548d1334242545323e Mon Sep 17 00:00:00 2001 From: Rasmus Christian Pedersen Date: Sun, 25 Jan 2015 12:03:29 +0100 Subject: [PATCH 3/3] style: remove superfluous space This commit removes superfluous space in ' using System;' statement --- src/ClientGenerator/NamespaceGenerator.cs | 2 +- src/Orleans/AssemblyLoader/AssemblyLoader.cs | 2 +- src/Orleans/Async/ObserverSubscriptionManager.cs | 2 +- src/Orleans/AzureUtils/AzureTableDataManager.cs | 2 +- src/Orleans/Configuration/ClientConfiguration.cs | 2 +- src/Orleans/Configuration/OrleansConfiguration.cs | 2 +- src/Orleans/Core/GrainExtensions.cs | 2 +- src/Orleans/Messaging/GatewayManager.cs | 2 +- src/Orleans/Messaging/ProxiedMessageCenter.cs | 2 +- src/Orleans/Messaging/SqlMembershipTable.cs | 2 +- src/Orleans/Providers/IStorageProvider.cs | 2 +- src/Orleans/Providers/ProviderLoader.cs | 2 +- src/Orleans/Runtime/GrainInterfaceMap.cs | 2 +- src/Orleans/Runtime/GrainReference.cs | 2 +- src/Orleans/Serialization/SerializationManager.cs | 2 +- src/Orleans/Timers/IRemindable.cs | 2 +- src/OrleansAzureUtils/AzureClient.cs | 2 +- src/OrleansAzureUtils/AzureSilo.cs | 2 +- src/OrleansProviders/Storage/ShardedStorageProvider.cs | 2 +- 19 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/ClientGenerator/NamespaceGenerator.cs b/src/ClientGenerator/NamespaceGenerator.cs index f9ec6ee2643..8eec567bba6 100644 --- a/src/ClientGenerator/NamespaceGenerator.cs +++ b/src/ClientGenerator/NamespaceGenerator.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.CodeDom; using System.Collections.Generic; using System.Linq; diff --git a/src/Orleans/AssemblyLoader/AssemblyLoader.cs b/src/Orleans/AssemblyLoader/AssemblyLoader.cs index ff9260026bf..21069e3486d 100644 --- a/src/Orleans/AssemblyLoader/AssemblyLoader.cs +++ b/src/Orleans/AssemblyLoader/AssemblyLoader.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/src/Orleans/Async/ObserverSubscriptionManager.cs b/src/Orleans/Async/ObserverSubscriptionManager.cs index 426ae53bd7d..f4fa6fcc043 100644 --- a/src/Orleans/Async/ObserverSubscriptionManager.cs +++ b/src/Orleans/Async/ObserverSubscriptionManager.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using Orleans.Runtime; diff --git a/src/Orleans/AzureUtils/AzureTableDataManager.cs b/src/Orleans/AzureUtils/AzureTableDataManager.cs index 286d0ed16d3..404417e1a46 100644 --- a/src/Orleans/AzureUtils/AzureTableDataManager.cs +++ b/src/Orleans/AzureUtils/AzureTableDataManager.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Data.Services.Client; using System.Linq; diff --git a/src/Orleans/Configuration/ClientConfiguration.cs b/src/Orleans/Configuration/ClientConfiguration.cs index 0162f0f7563..eb8c3bb6587 100644 --- a/src/Orleans/Configuration/ClientConfiguration.cs +++ b/src/Orleans/Configuration/ClientConfiguration.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.IO; using System.Net; diff --git a/src/Orleans/Configuration/OrleansConfiguration.cs b/src/Orleans/Configuration/OrleansConfiguration.cs index 00980c7632e..bc6b7d92e98 100644 --- a/src/Orleans/Configuration/OrleansConfiguration.cs +++ b/src/Orleans/Configuration/OrleansConfiguration.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/Orleans/Core/GrainExtensions.cs b/src/Orleans/Core/GrainExtensions.cs index 59602b9381b..9c99f5f3ebb 100644 --- a/src/Orleans/Core/GrainExtensions.cs +++ b/src/Orleans/Core/GrainExtensions.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using Orleans.Runtime; namespace Orleans diff --git a/src/Orleans/Messaging/GatewayManager.cs b/src/Orleans/Messaging/GatewayManager.cs index 17c2e5935ae..70910775fb6 100644 --- a/src/Orleans/Messaging/GatewayManager.cs +++ b/src/Orleans/Messaging/GatewayManager.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/src/Orleans/Messaging/ProxiedMessageCenter.cs b/src/Orleans/Messaging/ProxiedMessageCenter.cs index fb71cddb771..b887f424bb2 100644 --- a/src/Orleans/Messaging/ProxiedMessageCenter.cs +++ b/src/Orleans/Messaging/ProxiedMessageCenter.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net; diff --git a/src/Orleans/Messaging/SqlMembershipTable.cs b/src/Orleans/Messaging/SqlMembershipTable.cs index 2ef3f7c57a7..612c1e02900 100644 --- a/src/Orleans/Messaging/SqlMembershipTable.cs +++ b/src/Orleans/Messaging/SqlMembershipTable.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Net; using System.Text; using System.Data; diff --git a/src/Orleans/Providers/IStorageProvider.cs b/src/Orleans/Providers/IStorageProvider.cs index 2896fd04613..e0d6524555b 100644 --- a/src/Orleans/Providers/IStorageProvider.cs +++ b/src/Orleans/Providers/IStorageProvider.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Runtime.Serialization; using System.Threading.Tasks; diff --git a/src/Orleans/Providers/ProviderLoader.cs b/src/Orleans/Providers/ProviderLoader.cs index 4b5cbc44295..d71822e6f05 100644 --- a/src/Orleans/Providers/ProviderLoader.cs +++ b/src/Orleans/Providers/ProviderLoader.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; diff --git a/src/Orleans/Runtime/GrainInterfaceMap.cs b/src/Orleans/Runtime/GrainInterfaceMap.cs index 3de99abcf0d..2b38458b3f8 100644 --- a/src/Orleans/Runtime/GrainInterfaceMap.cs +++ b/src/Orleans/Runtime/GrainInterfaceMap.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/src/Orleans/Runtime/GrainReference.cs b/src/Orleans/Runtime/GrainReference.cs index ac9f0a92226..39c7791b46a 100644 --- a/src/Orleans/Runtime/GrainReference.cs +++ b/src/Orleans/Runtime/GrainReference.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Runtime.Serialization; using System.Text; diff --git a/src/Orleans/Serialization/SerializationManager.cs b/src/Orleans/Serialization/SerializationManager.cs index bd9261ae622..1837929c9dd 100644 --- a/src/Orleans/Serialization/SerializationManager.cs +++ b/src/Orleans/Serialization/SerializationManager.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; diff --git a/src/Orleans/Timers/IRemindable.cs b/src/Orleans/Timers/IRemindable.cs index 47ca634ec60..adf53be5557 100644 --- a/src/Orleans/Timers/IRemindable.cs +++ b/src/Orleans/Timers/IRemindable.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Runtime.Serialization; using System.Threading.Tasks; diff --git a/src/OrleansAzureUtils/AzureClient.cs b/src/OrleansAzureUtils/AzureClient.cs index 40ff610cedb..b8313ef0fed 100644 --- a/src/OrleansAzureUtils/AzureClient.cs +++ b/src/OrleansAzureUtils/AzureClient.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Diagnostics; using System.IO; using System.Threading; diff --git a/src/OrleansAzureUtils/AzureSilo.cs b/src/OrleansAzureUtils/AzureSilo.cs index 75626d8733d..ab53cef8100 100644 --- a/src/OrleansAzureUtils/AzureSilo.cs +++ b/src/OrleansAzureUtils/AzureSilo.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Diagnostics; using System.Globalization; using Microsoft.WindowsAzure.ServiceRuntime; diff --git a/src/OrleansProviders/Storage/ShardedStorageProvider.cs b/src/OrleansProviders/Storage/ShardedStorageProvider.cs index 5c2b2f6ddbe..95a39cfb190 100644 --- a/src/OrleansProviders/Storage/ShardedStorageProvider.cs +++ b/src/OrleansProviders/Storage/ShardedStorageProvider.cs @@ -21,7 +21,7 @@ The above copyright notice and this permission notice shall be included in all c TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ - using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks;