Fixed m_ prefixes in a few files from shared partition (dotnet/coreclr#10473)
authorJan Kotas <jkotas@microsoft.com>
Sat, 25 Mar 2017 02:31:22 +0000 (19:31 -0700)
committerGitHub <noreply@github.com>
Sat, 25 Mar 2017 02:31:22 +0000 (19:31 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/9851f95cd3d4cefe824b8ad90c61f05ff2fddbf1

src/coreclr/src/mscorlib/shared/System/AttributeUsageAttribute.cs
src/coreclr/src/mscorlib/shared/System/DefaultBinder.cs
src/coreclr/src/mscorlib/shared/System/Lazy.cs
src/coreclr/src/mscorlib/shared/System/Runtime/Serialization/ISafeSerializationData.cs

index 22cc548..6f9aeb2 100644 (file)
@@ -20,41 +20,39 @@ namespace System
     [AttributeUsage(AttributeTargets.Class, Inherited = true)]
     public sealed class AttributeUsageAttribute : Attribute
     {
-        internal AttributeTargets m_attributeTarget = AttributeTargets.All; // Defaults to all
-        internal bool m_allowMultiple = false; // Defaults to false
-        internal bool m_inherited = true; // Defaults to true
+        private AttributeTargets _attributeTarget = AttributeTargets.All; // Defaults to all
+        private bool _allowMultiple = false; // Defaults to false
+        private bool _inherited = true; // Defaults to true
 
         internal static AttributeUsageAttribute Default = new AttributeUsageAttribute(AttributeTargets.All);
 
         //Constructors 
         public AttributeUsageAttribute(AttributeTargets validOn)
         {
-            m_attributeTarget = validOn;
+            _attributeTarget = validOn;
         }
         internal AttributeUsageAttribute(AttributeTargets validOn, bool allowMultiple, bool inherited)
         {
-            m_attributeTarget = validOn;
-            m_allowMultiple = allowMultiple;
-            m_inherited = inherited;
+            _attributeTarget = validOn;
+            _allowMultiple = allowMultiple;
+            _inherited = inherited;
         }
 
-
-        //Properties 
         public AttributeTargets ValidOn
         {
-            get { return m_attributeTarget; }
+            get { return _attributeTarget; }
         }
 
         public bool AllowMultiple
         {
-            get { return m_allowMultiple; }
-            set { m_allowMultiple = value; }
+            get { return _allowMultiple; }
+            set { _allowMultiple = value; }
         }
 
         public bool Inherited
         {
-            get { return m_inherited; }
-            set { m_inherited = value; }
+            get { return _inherited; }
+            set { _inherited = value; }
         }
     }
 }
index 6fd6cf1..3b46d5f 100644 (file)
@@ -731,11 +731,11 @@ namespace System
         public sealed override void ReorderArgumentArray(ref object[] args, object state)
         {
             BinderState binderState = (BinderState)state;
-            ReorderParams(binderState.m_argsMap, args);
-            if (binderState.m_isParamArray)
+            ReorderParams(binderState._argsMap, args);
+            if (binderState._isParamArray)
             {
                 int paramArrayPos = args.Length - 1;
-                if (args.Length == binderState.m_originalSize)
+                if (args.Length == binderState._originalSize)
                     args[paramArrayPos] = ((object[])args[paramArrayPos])[0];
                 else
                 {
@@ -751,10 +751,10 @@ namespace System
             }
             else
             {
-                if (args.Length > binderState.m_originalSize)
+                if (args.Length > binderState._originalSize)
                 {
-                    object[] newArgs = new object[binderState.m_originalSize];
-                    Array.Copy(args, 0, newArgs, 0, binderState.m_originalSize);
+                    object[] newArgs = new object[binderState._originalSize];
+                    Array.Copy(args, 0, newArgs, 0, binderState._originalSize);
                     args = newArgs;
                 }
             }
@@ -1186,15 +1186,15 @@ namespace System
 
         internal class BinderState
         {
-            internal int[] m_argsMap;
-            internal int m_originalSize;
-            internal bool m_isParamArray;
+            internal readonly int[] _argsMap;
+            internal readonly int _originalSize;
+            internal readonly bool _isParamArray;
 
             internal BinderState(int[] argsMap, int originalSize, bool isParamArray)
             {
-                m_argsMap = argsMap;
-                m_originalSize = originalSize;
-                m_isParamArray = isParamArray;
+                _argsMap = argsMap;
+                _originalSize = originalSize;
+                _isParamArray = isParamArray;
             }
         }
     }
index 46a019f..55f915b 100644 (file)
@@ -201,7 +201,7 @@ namespace System
         [NonSerialized]
         private Func<T> _factory;
 
-        // m_value eventually stores the lazily created value. It is valid when _state = null.
+        // _value eventually stores the lazily created value. It is valid when _state = null.
         private T _value;
 
         /// <summary>
index 12c2e34..5089d13 100644 (file)
@@ -69,7 +69,7 @@ namespace System.Runtime.Serialization
     //       ...
     //     realSerializedDataN
     //     safeSerializationData     -> this is the serialization data member of the parent type
-    //       m_serializedState       -> list of saved serialized states from subclasses responding to the safe
+    //       _serializedState        -> list of saved serialized states from subclasses responding to the safe
     //                                  serialization event
     //     RealTypeSerializationName -> type which is using safe serialization
     //   Type:
@@ -135,21 +135,21 @@ namespace System.Runtime.Serialization
     //  
     //    1. Include a data member of type SafeSerializationManager:
     //  
-    //       private SafeSerializationManager m_safeSerializationManager;
+    //       private SafeSerializationManager _safeSerializationManager;
     //     
     //    2. Add a protected SerializeObjectState event, which passes through to the SafeSerializationManager:
     //  
     //       protected event EventHandler<SafeSerializationEventArgs> SerializeObjectState
     //       {
-    //           add { m_safeSerializationManager.SerializeObjectState += value; }
-    //           remove { m_safeSerializationManager.SerializeObjectState -= value; }
+    //           add { _safeSerializationManager.SerializeObjectState += value; }
+    //           remove { _safeSerializationManager.SerializeObjectState -= value; }
     //       }
     //
     //    3. Serialize the safe serialization object in GetObjectData, and call its CompleteSerialization method:
     //  
     //       {
-    //           info.AddValue("m_safeSerializationManager", m_safeSerializationManager, typeof(SafeSerializationManager));
-    //           m_safeSerializationManager.CompleteSerialization(this, info, context);
+    //           info.AddValue("_safeSerializationManager", _safeSerializationManager, typeof(SafeSerializationManager));
+    //           _safeSerializationManager.CompleteSerialization(this, info, context);
     //       }
     //
     //    4. Add an OnDeserialized handler if one doesn't already exist, and call CompleteDeserialization in it:
@@ -157,7 +157,7 @@ namespace System.Runtime.Serialization
     //       [OnDeserialized]
     //       private void OnDeserialized(StreamingContext context)
     //       {
-    //           m_safeSerializationManager.CompleteDeserialization(this);
+    //           _safeSerializationManager.CompleteDeserialization(this);
     //       }
     //
     // On the client side, using safe serialization is also pretty easy.  For example:
@@ -168,30 +168,30 @@ namespace System.Runtime.Serialization
     //       [Serializable]
     //       private struct TransparentExceptionState : ISafeSerializationData
     //       {
-    //           public string m_extraData;
+    //           public string _extraData;
     //
     //           void ISafeSerializationData.CompleteDeserialization(object obj)
     //           {
     //               TransparentException exception = obj as TransparentException;
-    //               exception.m_state = this;
+    //               exception._state = this;
     //           }
     //       }
     //
     //       [NonSerialized]
-    //       private TransparentExceptionState m_state = new TransparentExceptionState();
+    //       private TransparentExceptionState _state = new TransparentExceptionState();
     //
     //       public TransparentException()
     //       {
     //           SerializeObjectState += delegate(object exception, SafeSerializationEventArgs eventArgs)
     //           {
-    //               eventArgs.AddSerializedState(m_state);
+    //               eventArgs.AddSerializedState(_state);
     //           };
     //       }
     //
     //       public string ExtraData
     //       {
-    //           get { return m_state.m_extraData; }
-    //           set { m_state.m_extraData = value; }
+    //           get { return _state._extraData; }
+    //           set { _state._extraData = value; }
     //       }
     //   }
     //