Use expression body syntax

This commit is contained in:
teinarss
2021-02-25 20:52:13 +01:00
committed by Paul Chote
parent 555c43843b
commit 4a1e4f3e16
403 changed files with 1342 additions and 2031 deletions

View File

@@ -74,8 +74,8 @@ namespace OpenRA.Primitives
return innerDict.ContainsKey(key);
}
public ICollection<TKey> Keys { get { return innerDict.Keys; } }
public ICollection<TValue> Values { get { return innerDict.Values; } }
public ICollection<TKey> Keys => innerDict.Keys;
public ICollection<TValue> Values => innerDict.Values;
public bool TryGetValue(TKey key, out TValue value)
{
@@ -84,8 +84,8 @@ namespace OpenRA.Primitives
public TValue this[TKey key]
{
get { return innerDict[key]; }
set { innerDict[key] = value; }
get => innerDict[key];
set => innerDict[key] = value;
}
public void Clear()
@@ -94,10 +94,7 @@ namespace OpenRA.Primitives
OnRefresh(this);
}
public int Count
{
get { return innerDict.Count; }
}
public int Count => innerDict.Count;
public void Add(KeyValuePair<TKey, TValue> item)
{
@@ -114,10 +111,7 @@ namespace OpenRA.Primitives
innerDict.CopyTo(array, arrayIndex);
}
public bool IsReadOnly
{
get { return innerDict.IsReadOnly; }
}
public bool IsReadOnly => innerDict.IsReadOnly;
public bool Remove(KeyValuePair<TKey, TValue> item)
{
@@ -134,9 +128,6 @@ namespace OpenRA.Primitives
return innerDict.GetEnumerator();
}
public IEnumerable ObservedItems
{
get { return innerDict.Keys; }
}
public IEnumerable ObservedItems => innerDict.Keys;
}
}