Skip to content

Commit

Permalink
fix: API errors
Browse files Browse the repository at this point in the history
  • Loading branch information
matkoch committed Nov 15, 2023
1 parent d39f33b commit a94c0c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
10 changes: 0 additions & 10 deletions source/Nuke.Utilities/Collections/Dictionary.AddDictionary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,4 @@ public static TDictionary AddDictionary<TDictionary, TKey, TValue>(
dictionary.AddPair(key, value);
return dictionary;
}

public static TDictionary AddDictionary<TDictionary, TKey, TValue>(
this TDictionary dictionary,
IReadOnlyDictionary<TKey, TValue> otherDictionary)
where TDictionary : IDictionary<TKey, TValue>
{
foreach (var (key, value) in otherDictionary)
dictionary.AddPair(key, value);
return dictionary;
}
}
3 changes: 3 additions & 0 deletions source/Nuke.Utilities/Collections/Dictionary.AsReadOnly.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
// Distributed under the MIT License.
// https://github.com/nuke-build/nuke/blob/master/LICENSE

#if NETSTANDARD2_0

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
Expand All @@ -16,3 +18,4 @@ public static IReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this ID
return new ReadOnlyDictionary<TKey, TValue>(dictionary);
}
}
#endif

0 comments on commit a94c0c1

Please sign in to comment.