You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Start work refactoring example and web socket calls to async
The console example and web socket methods were not using task properly. This is the start of work to fix that.
* Fix Bittrex web socket not re-adding the listener
* Missed a line from last checkin
* Ignore publish profiles
* Move rest of example to async and logger calls
* Catch errors when the connection goes down
Connection re-connect will be initiated, the errors should not crash out of the method and should only log info messages
* Update definitions
* Just in case...
* Did not mean to add 3rd condition
* Add additional disposed check
* Ensure Async method for all task return values
Ensure Async naming convention for anything return a Task
* Eradicate all .Sync calls
* Fix Dispose method, update readme
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -10,10 +10,12 @@ Please follow these coding guidelines...
10
10
- Only implement async methods as a general rule. Synchronous calls can be done by using the Sync extension method in ```CryptoUtility```. Saves a lot of duplicate code.
11
11
- Use CryptoUtility.UtcNow instead of DateTime.UtcNow. This makes it easy to mock the date and time for unit or integration tests.
12
12
- Use CryptoUtility.UnixTimeStampToDateTimeSeconds and CryptoUtility.UnixTimestampFromDateTimeSeconds, etc. for date conversions, keep all date in UTC.
13
-
-Follow these code style guidelines please (we're not monsters):
13
+
-Please follow these code style guidelines please (we're not monsters):
14
14
- Tabs for indent.
15
15
- Curly braces on separate lines.
16
-
- Wrap all if statements with curly braces, makes debug and set breakpoints much easier, along with adding new code to the if statement block.
16
+
- Wrap if, else if, and any loops or control logic with curly braces. Avoid `if (something) doSomething();` on same line or next line without curly braces.
17
+
- Append 'Async' to the end of the name of any method returning a Task - except for unit and integration test methods.
18
+
- Avoid using `.Sync()` or `.RunSynchronously()` - all code should use Tasks and/or async / await.
17
19
18
20
When creating a new Exchange API, please do the following:
19
21
- For reference comparisons, https://github.com/ccxt/ccxt is a good project to compare against when creating a new exchange. Use node.js in Visual Studio to debug through the code.
0 commit comments