-Refactor to expression body properties

This commit is contained in:
James Newton-King
2017-10-23 09:49:12 +13:00
parent ef18269626
commit 9932155295
50 changed files with 285 additions and 586 deletions
+4 -13
View File
@@ -88,15 +88,9 @@ namespace Newtonsoft.Json.Linq
return false;
}
public int Count
{
get { return (_token != null) ? 1 : 0; }
}
public int Count => (_token != null) ? 1 : 0;
public bool IsReadOnly
{
get { return false; }
}
public bool IsReadOnly => false;
public int IndexOf(JToken item)
{
@@ -121,7 +115,7 @@ namespace Newtonsoft.Json.Linq
public JToken this[int index]
{
get { return (index == 0) ? _token : null; }
get => (index == 0) ? _token : null;
set
{
if (index == 0)
@@ -140,10 +134,7 @@ namespace Newtonsoft.Json.Linq
/// Gets the container's children tokens.
/// </summary>
/// <value>The container's children tokens.</value>
protected override IList<JToken> ChildrenTokens
{
get { return _content; }
}
protected override IList<JToken> ChildrenTokens => _content;
/// <summary>
/// Gets the property name.