Skip to content

Commit

Permalink
Revert "Merge pull request #1202 from ArminShoeibi/feat/file-scoped-n…
Browse files Browse the repository at this point in the history
…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
michaelklishin committed May 15, 2022
1 parent 531f0e6 commit 6b1a06b
Show file tree
Hide file tree
Showing 198 changed files with 11,710 additions and 11,514 deletions.
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 projects/RabbitMQ.Client/FrameworkExtension/StringExtension.cs
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
}
Loading

0 comments on commit 6b1a06b

Please sign in to comment.