MCPcopy Create free account
hub / github.com/apache/fory / CopyTo

Method CopyTo

csharp/src/Fory/NullableKeyDictionary.cs:173–195  ·  view source on GitHub ↗
(KeyValuePair<TKey, TValue>[] array, int arrayIndex)

Source from the content-addressed store, hash-verified

171 }
172
173 public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex)
174 {
175 ArgumentNullException.ThrowIfNull(array);
176 if (arrayIndex < 0)
177 {
178 throw new ArgumentOutOfRangeException(nameof(arrayIndex));
179 }
180
181 if (array.Length - arrayIndex < Count)
182 {
183 throw new ArgumentException("The destination array is too small.", nameof(array));
184 }
185
186 if (_hasNullKey)
187 {
188 array[arrayIndex++] = new KeyValuePair<TKey, TValue>(default!, _nullValue);
189 }
190
191 foreach (KeyValuePair<TKey, TValue> entry in _nonNullEntries)
192 {
193 array[arrayIndex++] = entry;
194 }
195 }
196
197 public bool Remove(KeyValuePair<TKey, TValue> item)
198 {

Callers 8

WriteLatin1Method · 0.45
WriteUtf8Method · 0.45
WriteUtf16Method · 0.45
ComputeHeaderHashBitsMethod · 0.45
WriteBytesMethod · 0.45
SetBytesMethod · 0.45
CopyToMethod · 0.45
CopyToMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected