Browse Source

Modernizing some code.

Bart De Smet 8 years ago
parent
commit
93eaba9365
1 changed files with 5 additions and 20 deletions
  1. 5 20
      Ix.NET/Source/System.Interactive.Async/Grouping.cs

+ 5 - 20
Ix.NET/Source/System.Interactive.Async/Grouping.cs

@@ -397,10 +397,7 @@ namespace System.Linq.Internal
         internal TKey _key;
         internal TKey _key;
         internal Grouping<TKey, TElement> _next;
         internal Grouping<TKey, TElement> _next;
 
 
-        IEnumerator IEnumerable.GetEnumerator()
-        {
-            return GetEnumerator();
-        }
+        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
 
 
         public IEnumerator<TElement> GetEnumerator()
         public IEnumerator<TElement> GetEnumerator()
         {
         {
@@ -412,20 +409,11 @@ namespace System.Linq.Internal
 
 
         // DDB195907: implement IGrouping<>.Key implicitly
         // DDB195907: implement IGrouping<>.Key implicitly
         // so that WPF binding works on this property.
         // so that WPF binding works on this property.
-        public TKey Key
-        {
-            get { return _key; }
-        }
+        public TKey Key => _key;
 
 
-        int ICollection<TElement>.Count
-        {
-            get { return _count; }
-        }
+        int ICollection<TElement>.Count => _count;
 
 
-        bool ICollection<TElement>.IsReadOnly
-        {
-            get { return true; }
-        }
+        bool ICollection<TElement>.IsReadOnly => true;
 
 
         void ICollection<TElement>.Add(TElement item)
         void ICollection<TElement>.Add(TElement item)
         {
         {
@@ -452,10 +440,7 @@ namespace System.Linq.Internal
             throw new NotSupportedException(Strings.NOT_SUPPORTED);
             throw new NotSupportedException(Strings.NOT_SUPPORTED);
         }
         }
 
 
-        int IList<TElement>.IndexOf(TElement item)
-        {
-            return Array.IndexOf(_elements, item, 0, _count);
-        }
+        int IList<TElement>.IndexOf(TElement item) => Array.IndexOf(_elements, item, 0, _count);
 
 
         void IList<TElement>.Insert(int index, TElement item)
         void IList<TElement>.Insert(int index, TElement item)
         {
         {