@@ -30,22 +30,22 @@ public NServiceBusHeaderAdapter(Headers headers)
3030
3131 public Guid ? MessageId => _messageId ??= _headers . Get < Guid > ( NServiceBusMessageHeaders . MessageId ) ;
3232
33- public Guid ? RequestId { get ; } = default ;
33+ public Guid ? RequestId { get ; } = null ;
3434
3535 public Guid ? CorrelationId => _correlationId ??= _headers . Get < Guid > ( NServiceBusMessageHeaders . CorrelationId ) ;
3636 public Guid ? ConversationId => _conversationId ??= _headers . Get < Guid > ( NServiceBusMessageHeaders . ConversationId ) ;
3737
38- public Guid ? InitiatorId { get ; } = default ;
38+ public Guid ? InitiatorId { get ; } = null ;
3939
40- public DateTime ? ExpirationTime { get ; }
40+ public DateTime ? ExpirationTime { get ; } = null ;
4141
4242 public Uri SourceAddress => _sourceAddress ??= GetEndpointAddress ( NServiceBusMessageHeaders . OriginatingEndpoint ) ;
4343
44- public Uri DestinationAddress { get ; } = default ;
44+ public Uri DestinationAddress { get ; } = null ;
4545
4646 public Uri ResponseAddress => _responseAddress ??= GetEndpointAddress ( NServiceBusMessageHeaders . ReplyToAddress ) ;
4747
48- public Uri FaultAddress { get ; } = default ;
48+ public Uri FaultAddress { get ; } = null ;
4949
5050 public DateTime ? SentTime => _sentTime ??= GetSentTime ( ) ;
5151
@@ -57,22 +57,22 @@ Uri GetEndpointAddress(string key)
5757 {
5858 var endpoint = _headers . Get < string > ( key ) ;
5959 return string . IsNullOrWhiteSpace ( endpoint )
60- ? default
61- : new Uri ( $ "queue:{ endpoint } ") ;
60+ ? null
61+ : new Uri ( $ "queue:{ endpoint } ?bind=false ") ;
6262 }
6363
6464 DateTime ? GetSentTime ( )
6565 {
6666 var timeSent = _headers . Get < string > ( NServiceBusMessageHeaders . TimeSent ) ;
6767 if ( string . IsNullOrWhiteSpace ( timeSent ) )
68- return default ;
68+ return null ;
6969
7070 if ( timeSent . Length >= 28 )
7171 timeSent = timeSent . Substring ( 0 , 19 ) + '.' + timeSent . Substring ( 20 , 6 ) ;
7272
7373 return DateTime . TryParse ( timeSent , CultureInfo . InvariantCulture , DateTimeStyles . AssumeUniversal | DateTimeStyles . AdjustToUniversal , out var value )
7474 ? value
75- : default ( DateTime ? ) ;
75+ : null ;
7676 }
7777
7878 IEnumerable < string > GetMessageTypes ( )
@@ -81,7 +81,7 @@ IEnumerable<string> GetMessageTypes()
8181 if ( string . IsNullOrWhiteSpace ( enclosedMessageTypes ) )
8282 yield break ;
8383
84- string [ ] typeNames = enclosedMessageTypes . Split ( new [ ] { ';' } , StringSplitOptions . RemoveEmptyEntries ) ;
84+ string [ ] typeNames = enclosedMessageTypes . Split ( [ ';' ] , StringSplitOptions . RemoveEmptyEntries ) ;
8585 foreach ( var typeName in typeNames )
8686 {
8787 var messageType = Type . GetType ( typeName ) ;
@@ -111,13 +111,13 @@ public NServiceBusHostInfo(string machineName, string version)
111111 }
112112
113113 public string MachineName { get ; }
114- public string ProcessName => default ;
115- public int ProcessId => default ;
116- public string Assembly => default ;
117- public string AssemblyVersion => default ;
118- public string FrameworkVersion => default ;
114+ public string ProcessName => null ;
115+ public int ProcessId => 0 ;
116+ public string Assembly => null ;
117+ public string AssemblyVersion => null ;
118+ public string FrameworkVersion => null ;
119119 public string MassTransitVersion { get ; }
120- public string OperatingSystemVersion => default ;
120+ public string OperatingSystemVersion => null ;
121121 }
122122
123123
@@ -169,7 +169,7 @@ public bool TryGetHeader(string key, out object value)
169169 return _headers . TryGetHeader ( key , out value ) ;
170170 }
171171
172- public T Get < T > ( string key , T defaultValue = default )
172+ public T Get < T > ( string key , T defaultValue = null )
173173 where T : class
174174 {
175175 return _headers . Get ( key , defaultValue ) ;
0 commit comments