File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed
projects/client/RabbitMQ.Client/src/client Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -120,6 +120,11 @@ public interface IConnection: IDisposable
120
120
///server.</summary>
121
121
IDictionary ClientProperties { get ; }
122
122
123
+ ///<summary>A dictionary of the server properties sent by the server
124
+ ///while establishing the connection. This typically includes
125
+ ///the product name and version of the server.</summary>
126
+ IDictionary ServerProperties { get ; }
127
+
123
128
///<summary>Returns the known hosts that came back from the
124
129
///broker in the connection.open-ok method at connection
125
130
///startup time. Null until the connection is completely open
Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ public abstract class ConnectionBase : IConnection
94
94
public uint m_frameMax = 0 ;
95
95
public ushort m_heartbeat = 0 ;
96
96
public IDictionary m_clientProperties ;
97
+ public IDictionary m_serverProperties ;
97
98
public AmqpTcpEndpoint [ ] m_knownHosts = null ;
98
99
99
100
public MainSession m_session0 ;
@@ -263,6 +264,18 @@ public IDictionary ClientProperties
263
264
}
264
265
}
265
266
267
+ public IDictionary ServerProperties
268
+ {
269
+ get
270
+ {
271
+ return m_serverProperties ;
272
+ }
273
+ set
274
+ {
275
+ m_serverProperties = value ;
276
+ }
277
+ }
278
+
266
279
public AmqpTcpEndpoint [ ] KnownHosts
267
280
{
268
281
get { return m_knownHosts ; }
@@ -961,6 +974,8 @@ public void Open(bool insist)
961
974
ConnectionStartDetails connectionStart = ( ConnectionStartDetails )
962
975
connectionStartCell . Value ;
963
976
977
+ ServerProperties = connectionStart . m_serverProperties ;
978
+
964
979
AmqpVersion serverVersion = new AmqpVersion ( connectionStart . m_versionMajor ,
965
980
connectionStart . m_versionMinor ) ;
966
981
if ( ! serverVersion . Equals ( Protocol . Version ) )
You can’t perform that action at this time.
0 commit comments