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
* Fork this repository and make sure your local **master** branch is up to date with the main repository.
3
+
* Create a new branch for your addition with an appropriate name, e.g. **add-restart-command**
4
+
* PRs work by submitting the *entire* branch, so this allows you to continue work without locking up your whole repository.
5
+
* Commit your changes to that branch, making sure that you **follow the code guidelines below**.
6
+
* Submit your branch as a PR to be reviewed.
7
+
8
+
## Naming Conventions
9
+
* Types: **PascalCase**
10
+
* Prefix interfaces with "**I**"
11
+
* Suffix delegates with "**Del**"
12
+
* Methods: **PascalCase**
13
+
* Method names should generally use verbs in the infinitive tense, for example `GetValue()` or `OpenFile()`. Callbacks and events should use present continuous (-ing) or past tense depending on the context.
14
+
* Non-Private Members: **PascalCase**
15
+
* Private Members: **_camelCase**
16
+
17
+
## Code Design
18
+
***One type per file** with the exception of nested types and delegate declarations.
19
+
***No public fields** except for consts, use properties instead
20
+
***No stateful static types.** These are a pain to clean up, static types should not store any information.
21
+
* Use **[dependency injection](https://stackoverflow.com/a/130862)** when possible. Most Torch code uses constructor injection.
22
+
***Events and actions** should be null checked before calling or invoked with the `action?.Invoke()` syntax.
23
+
24
+
## Documentation
25
+
* All types and members not marked **private** or **internal** should have XML documentation using the `/// <summary>` tag.
26
+
* Interface implementations and overridden methods should use the `/// <inheritdoc />` tag unless the summary needs to be changed from the base/interface summary.
0 commit comments