You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2016/11/10 11:33:53 UTC
[42/58] [abbrv] lucenenet git commit: Added CopyTo implementation in
LinkedHashMap.KeyCollection and ValueCollection
Added CopyTo implementation in LinkedHashMap.KeyCollection and ValueCollection
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f08a0e8d
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f08a0e8d
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f08a0e8d
Branch: refs/heads/grouping
Commit: f08a0e8d7059d507bfad62add71ed073904ab6c0
Parents: 7c2c581
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Nov 5 20:36:05 2016 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Tue Nov 8 02:24:56 2016 +0700
----------------------------------------------------------------------
src/Lucene.Net.Core/Support/LinkedHashMap.cs | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f08a0e8d/src/Lucene.Net.Core/Support/LinkedHashMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Support/LinkedHashMap.cs b/src/Lucene.Net.Core/Support/LinkedHashMap.cs
index 5ae23ce..bad38b6 100644
--- a/src/Lucene.Net.Core/Support/LinkedHashMap.cs
+++ b/src/Lucene.Net.Core/Support/LinkedHashMap.cs
@@ -345,7 +345,10 @@ namespace Lucene.Net.Support
public void CopyTo(TKey[] array, int arrayIndex)
{
- throw new NotImplementedException("Implement this as needed");
+ foreach (var element in outerInstance.list)
+ {
+ array[arrayIndex++] = element.Key;
+ }
}
public IEnumerator<TKey> GetEnumerator()
@@ -455,7 +458,10 @@ namespace Lucene.Net.Support
public void CopyTo(TValue[] array, int arrayIndex)
{
- throw new NotImplementedException("Implement this as needed");
+ foreach (var element in outerInstance.list)
+ {
+ array[arrayIndex++] = element.Value;
+ }
}
public IEnumerator<TValue> GetEnumerator()