File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
projects/client/RabbitMQ.Client/src/client/impl Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 59
59
60
60
using System . Text ;
61
61
using System . Threading ;
62
+ using System . Reflection ;
62
63
63
64
namespace RabbitMQ . Client . Framing . Impl
64
65
{
@@ -107,6 +108,16 @@ public class Connection : IConnection
107
108
private AutoResetEvent m_heartbeatRead = new AutoResetEvent ( false ) ;
108
109
private AutoResetEvent m_heartbeatWrite = new AutoResetEvent ( false ) ;
109
110
111
+ #if CORECLR
112
+ private static string version = typeof ( Connection ) . GetTypeInfo ( ) . Assembly
113
+ . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( )
114
+ . InformationalVersion ;
115
+ #else
116
+ private static string version = typeof ( Connection ) . Assembly
117
+ . GetCustomAttribute < AssemblyInformationalVersionAttribute > ( )
118
+ . InformationalVersion ;
119
+ #endif
120
+
110
121
111
122
// true if we haven't finished connection negotiation.
112
123
// In this state socket exceptions are treated as fatal connection
@@ -354,9 +365,6 @@ IProtocol IConnection.Protocol
354
365
355
366
public static IDictionary < string , object > DefaultClientProperties ( )
356
367
{
357
-
358
- string version = "0.0.0.0" ; // assembly.GetName().Version.ToString();
359
- //TODO: Get the rest of this data from the Assembly Attributes
360
368
IDictionary < string , object > table = new Dictionary < string , object > ( ) ;
361
369
table [ "product" ] = Encoding . UTF8 . GetBytes ( "RabbitMQ" ) ;
362
370
table [ "version" ] = Encoding . UTF8 . GetBytes ( version ) ;
You can’t perform that action at this time.
0 commit comments