-
Notifications
You must be signed in to change notification settings - Fork 8
Replace old references with current ones; remove dead code #1
base: master
Are you sure you want to change the base?
Replace old references with current ones; remove dead code #1
Conversation
…ri; Remove more dead code; this commit is still broken
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the Uri
changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please do a quick overview of the diff if you do find+replace changes to prevent having to wait for review to find out about little unintended changes. ;)
{ | ||
/// <summary> | ||
/// Provides api methods centered around an HttpClient | ||
/// </summary> | ||
public partial class ApiClient : BaseApiClient, IApiClient | ||
{ | ||
public event EventHandler<GenericEventArgs<RemoteLogoutReason>> RemoteLoggedOut; | ||
public event EventHandler<GenericEventArgs<AuthenticationResult>> Authenticated; | ||
public event EventHandler<GenericEventArgs<AuthenticationResult>> OnAuthenticated; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did this get changed?
} | ||
|
||
var dict = new QueryStringDictionary { }; | ||
var dict = new NameValueCollection { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var dict = new NameValueCollection { }; | |
var dict = new NameValueCollection(); |
{ | ||
if (query == null) | ||
{ | ||
throw new ArgumentNullException("query"); | ||
} | ||
|
||
var dict = new QueryStringDictionary { }; | ||
var dict = new NameValueCollection{ }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var dict = new NameValueCollection{ }; | |
var dict = new NameValueCollection(); |
{ | ||
if (query == null) | ||
{ | ||
throw new ArgumentNullException("query"); | ||
} | ||
|
||
var dict = new QueryStringDictionary { }; | ||
var dict = new NameValueCollection { }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
var dict = new NameValueCollection { }; | |
var dict = new NameValueCollection(); |
@@ -1173,7 +1109,7 @@ public Task SendMessageCommandAsync(string sessionId, MessageCommand command) | |||
|
|||
if (command.TimeoutMs.HasValue) | |||
{ | |||
cmd.Arguments["Timeout"] = command.TimeoutMs.Value.ToString(CultureInfo.InvariantCulture); | |||
cmd.Arguments["Timeout"] = command.TimeoutMs?.ToString(CultureInfo.InvariantCulture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why?
@@ -98,7 +97,7 @@ private async void Receive() | |||
} | |||
catch (Exception ex) | |||
{ | |||
_logger.ErrorException("Error receiving web socket message", ex); | |||
_logger.LogError("Error receiving web socket message", ex); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_logger.LogError("Error receiving web socket message", ex); | |
_logger.LogError(ex, "Error receiving web socket message"); |
{ | ||
_logger.Warn("Unrecognized WebSocketMessageType: {0}", type.ToString()); | ||
_logger.LogWarning("Unrecognized WebSocketMessageType: {0}", type.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_logger.LogWarning("Unrecognized WebSocketMessageType: {0}", type.ToString()); | |
_logger.LogWarning("Unrecognized WebSocketMessageType: {0}", type); |
{ | ||
_logger.Warn("Unrecognized WebSocketState: {0}", _client.State.ToString()); | ||
_logger.LogWarning("Unrecognized WebSocketState: {0}", _client.State.ToString()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_logger.LogWarning("Unrecognized WebSocketState: {0}", _client.State.ToString()); | |
_logger.LogWarning("Unrecognized WebSocketState: {0}", _client.State); |
|
||
_socket.Open(); | ||
|
||
_socket.Opened += (sender, args) => taskCompletionSource.TrySetResult(true); | ||
_socket.Closed += _socket_Closed; | ||
_socket.Closed += Socket_Closed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_socket.Closed += Socket_Closed; | |
_socket.Closed += OnSocketClosed; |
|
||
_socket.MessageReceived += websocket_MessageReceived; | ||
_socket.MessageReceived += Websocket_MessageReceived; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_socket.MessageReceived += Websocket_MessageReceived; | |
_socket.MessageReceived += OnWebsocketMessageReceived; |
Not 100% sure if this has exact parity with the server's API, but it builds and works.