-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
428841e
commit 369ddeb
Showing
7 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
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,47 @@ | ||
using System.Collections; | ||
using System.Diagnostics.CodeAnalysis; | ||
|
||
namespace Speckle.Sdk.Serialisation.V2.Send; | ||
|
||
public class EmptyDictionary<TKey, TValue> : IDictionary<TKey, TValue> | ||
{ | ||
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator() => throw new NotImplementedException(); | ||
|
||
IEnumerator IEnumerable.GetEnumerator() => GetEnumerator(); | ||
|
||
public void Add(KeyValuePair<TKey, TValue> item) { } | ||
|
||
public void Clear() => throw new NotImplementedException(); | ||
|
||
public bool Contains(KeyValuePair<TKey, TValue> item) => false; | ||
|
||
public void CopyTo(KeyValuePair<TKey, TValue>[] array, int arrayIndex) => throw new NotImplementedException(); | ||
|
||
public bool Remove(KeyValuePair<TKey, TValue> item) => false; | ||
|
||
public int Count => 0; | ||
public bool IsReadOnly => false; | ||
|
||
public void Add(TKey key, TValue value) { } | ||
|
||
public bool ContainsKey(TKey key) => false; | ||
|
||
public bool Remove(TKey key) => false; | ||
|
||
public bool TryGetValue(TKey key, [UnscopedRef] out TValue value) | ||
{ | ||
value = default!; | ||
return false; | ||
} | ||
|
||
public TValue this[TKey key] | ||
{ | ||
#pragma warning disable CA1065 | ||
get => throw new NotImplementedException(); | ||
#pragma warning restore CA1065 | ||
set { } | ||
} | ||
|
||
public ICollection<TKey> Keys { get; } | ||
public ICollection<TValue> Values { get; } | ||
} |
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
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
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
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
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
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