mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 22:55:42 +00:00
style: remove redundant else branches
This commit is contained in:
parent
d7bf9d1788
commit
b79435211a
@ -1,4 +1,4 @@
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Diagnostics.Contracts;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Web;
|
||||
|
||||
@ -70,11 +70,9 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
dictionary.Add(key, addValue);
|
||||
return addValue;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -126,12 +124,10 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
dictionary.Add(key, addValue);
|
||||
return addValue;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses the specified functions to add a key/value pair to the <see cref="Dictionary{TKey,TValue}" /> if the key does
|
||||
@ -202,13 +198,11 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var add = addValueFactory(key);
|
||||
dictionary.Add(key, add);
|
||||
|
||||
return add;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -268,14 +262,12 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var add = addValueFactory(key);
|
||||
dictionary.Add(key, add);
|
||||
|
||||
return add;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Uses the specified functions and argument to add a key/value pair to the <see cref="Dictionary{TKey,TValue}" /> if
|
||||
@ -352,13 +344,11 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var add = addValueFactory(key, factoryArgument);
|
||||
dictionary.Add(key, add);
|
||||
|
||||
return add;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -424,14 +414,12 @@ public static class DictionaryExtensions
|
||||
|
||||
return updated;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
var add = addValueFactory(key, factoryArgument);
|
||||
dictionary.Add(key, add);
|
||||
|
||||
return add;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Converts an <see cref="IEnumerable{T}" /> of <see cref="KeyValuePair{TKey, TValue}" /> to a data connection
|
||||
|
Loading…
Reference in New Issue
Block a user