File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
projects/client/RabbitMQ.Client/src/client Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -126,10 +126,6 @@ public class ConnectionFactory
126
126
/// seconds, with zero meaning none (value: 0)</summary>
127
127
public const ushort DefaultHeartbeat = 0 ; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
128
128
129
- /// <summary>Default value for extra client properties to be sent to
130
- /// the server (value: empty Hashtable)
131
- public static readonly IDictionary DefaultClientProperties = new Hashtable ( ) ; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
132
-
133
129
/// <summary>Username to use when authenticating to the server</summary>
134
130
public string UserName = DefaultUser ;
135
131
@@ -165,6 +161,16 @@ public class ConnectionFactory
165
161
///<summary>The AMQP protocol to be used</summary>
166
162
public IProtocol Protocol = Protocols . FromEnvironment ( ) ;
167
163
164
+ /// <summary>Default value for extra client properties to be sent to
165
+ /// the server (value: empty Hashtable)</summary>
166
+ public static IDictionary DefaultClientProperties
167
+ {
168
+ get
169
+ {
170
+ return new Hashtable ( ) ; // PLEASE KEEP THIS MATCHING THE DOC ABOVE
171
+ }
172
+ }
173
+
168
174
public AmqpTcpEndpoint Endpoint
169
175
{
170
176
get
Original file line number Diff line number Diff line change @@ -116,7 +116,7 @@ public interface IConnection: IDisposable
116
116
///(0 for disabled), in seconds.</summary>
117
117
ushort Heartbeat { get ; }
118
118
119
- ///<summary>The client properties that has been sent to the
119
+ ///<summary>A copy of the client properties that has been sent to the
120
120
///server.</summary>
121
121
IDictionary ClientProperties { get ; }
122
122
Original file line number Diff line number Diff line change @@ -255,7 +255,7 @@ public IDictionary ClientProperties
255
255
{
256
256
get
257
257
{
258
- return m_clientProperties ;
258
+ return new Hashtable ( m_clientProperties ) ;
259
259
}
260
260
set
261
261
{
@@ -973,12 +973,12 @@ public void Open(bool insist)
973
973
serverVersion . Minor ) ;
974
974
}
975
975
976
- ClientProperties = BuildClientPropertiesTable ( m_factory . ClientProperties ) ;
976
+ m_clientProperties = BuildClientPropertiesTable ( m_factory . ClientProperties ) ;
977
977
978
978
// FIXME: check that PLAIN is supported.
979
979
// FIXME: parse out locales properly!
980
980
ConnectionTuneDetails connectionTune =
981
- m_model0 . ConnectionStartOk ( ClientProperties ,
981
+ m_model0 . ConnectionStartOk ( m_clientProperties ,
982
982
"PLAIN" ,
983
983
Encoding . UTF8 . GetBytes ( "\0 " + m_factory . UserName +
984
984
"\0 " + m_factory . Password ) ,
You can’t perform that action at this time.
0 commit comments