-
Notifications
You must be signed in to change notification settings - Fork 595
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "Merge pull request #1202 from ArminShoeibi/feat/file-scoped-n…
…amespaces" This reverts commit 1713f50, reversing changes made to f8c7b9d. It's a nice feature but it makes it impossible to backport things from main to 7.x and 6.x unless those branches also adopt it. So file-scoped namespaces are not necessary worth the backporting pain for library maintainers. Conflicts: projects/RabbitMQ.Client/client/api/DefaultEndpointResolver.cs projects/RabbitMQ.Client/client/impl/AutorecoveringConnection.Recording.cs projects/RabbitMQ.Client/client/impl/SocketFrameHandler.cs
- Loading branch information
1 parent
531f0e6
commit 6b1a06b
Showing
198 changed files
with
11,710 additions
and
11,514 deletions.
There are no files selected for viewing
14 changes: 8 additions & 6 deletions
14
projects/RabbitMQ.Client/FrameworkExtension/DictionaryExtension.cs
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace RabbitMQ; | ||
namespace RabbitMQ | ||
{ | ||
#nullable enable | ||
#if NETSTANDARD | ||
internal static class DictionaryExtension | ||
{ | ||
public static bool Remove<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, out TValue value) | ||
internal static class DictionaryExtension | ||
{ | ||
return dictionary.TryGetValue(key, out value) && dictionary.Remove(key); | ||
public static bool Remove<TKey, TValue>(this Dictionary<TKey, TValue> dictionary, TKey key, out TValue value) | ||
{ | ||
return dictionary.TryGetValue(key, out value) && dictionary.Remove(key); | ||
} | ||
} | ||
} | ||
#endif | ||
} |
14 changes: 8 additions & 6 deletions
14
projects/RabbitMQ.Client/FrameworkExtension/StringExtension.cs
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 |
---|---|---|
@@ -1,13 +1,15 @@ | ||
using System; | ||
|
||
namespace RabbitMQ; | ||
namespace RabbitMQ | ||
{ | ||
#nullable enable | ||
#if NETSTANDARD | ||
internal static class StringExtension | ||
{ | ||
public static bool Contains(this string toSearch, string value, StringComparison comparisonType) | ||
internal static class StringExtension | ||
{ | ||
return toSearch.IndexOf(value, comparisonType) > 0; | ||
public static bool Contains(this string toSearch, string value, StringComparison comparisonType) | ||
{ | ||
return toSearch.IndexOf(value, comparisonType) > 0; | ||
} | ||
} | ||
} | ||
#endif | ||
} |
Oops, something went wrong.