-
Notifications
You must be signed in to change notification settings - Fork 383
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Removed the
Update
and GetOrDefault
extension methods (they wer…
…e unused). - Renamed `DictionaryExtensions` to `KeyValuePairExtensions`, since nothing in that file extends dictionary any more!
- Loading branch information
1 parent
a53ede1
commit 18462be
Showing
2 changed files
with
24 additions
and
30 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace LLama.Extensions | ||
{ | ||
/// <summary> | ||
/// Extensions to the KeyValuePair struct | ||
/// </summary> | ||
public static class KeyValuePairExtensions | ||
{ | ||
/// <summary> | ||
/// Deconstruct a KeyValuePair into it's constituent parts. | ||
/// </summary> | ||
/// <param name="pair">The KeyValuePair to deconstruct</param> | ||
/// <param name="first">First element, the Key</param> | ||
/// <param name="second">Second element, the Value</param> | ||
/// <typeparam name="TKey">Type of the Key</typeparam> | ||
/// <typeparam name="TValue">Type of the Value</typeparam> | ||
public static void Deconstruct<TKey, TValue>(this KeyValuePair<TKey, TValue> pair, out TKey first, out TValue second) | ||
{ | ||
first = pair.Key; | ||
second = pair.Value; | ||
} | ||
} | ||
} |