Skip to content

Restore Constants class as public #833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/Apigen/apigen/Apigen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,7 @@ internal sealed class Protocol : {ImplNamespaceBase}.ProtocolBase
EmitLine("");
EmitContentHeaderReader();
EmitLine(" }");
EmitLine(" internal sealed class Constants");
EmitLine(" public static class Constants");
EmitLine(" {");
foreach (KeyValuePair<string, int> de in m_constants)
{
Expand Down
30 changes: 30 additions & 0 deletions projects/Unit/APIApproval.Approve.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -782,6 +782,36 @@ namespace RabbitMQ.Client.Exceptions
public object Offender { get; }
}
}
namespace RabbitMQ.Client.Framing
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of just bringing this back, could we change the namespace to RabbitMQ.Client instead?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lukebakken I like this idea. But this PR is already merged, so we'd need another one 🤷‍♂️

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easy-peasy, I'll get it right now in a new PR.

{
public static class Constants
{
public const int AccessRefused = 403;
public const int ChannelError = 504;
public const int CommandInvalid = 503;
public const int ConnectionForced = 320;
public const int ContentTooLarge = 311;
public const int FrameBody = 3;
public const int FrameEnd = 206;
public const int FrameError = 501;
public const int FrameHeader = 2;
public const int FrameHeartbeat = 8;
public const int FrameMethod = 1;
public const int FrameMinSize = 4096;
public const int InternalError = 541;
public const int InvalidPath = 402;
public const int NoConsumers = 313;
public const int NotAllowed = 530;
public const int NotFound = 404;
public const int NotImplemented = 540;
public const int PreconditionFailed = 406;
public const int ReplySuccess = 200;
public const int ResourceError = 506;
public const int ResourceLocked = 405;
public const int SyntaxError = 502;
public const int UnexpectedFrame = 505;
}
}
namespace RabbitMQ.Client.Logging
{
[System.Diagnostics.Tracing.EventSource(Name="rabbitmq-dotnet-client")]
Expand Down