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
{{ message }}
This repository was archived by the owner on May 18, 2025. It is now read-only.
Scott Lilly edited this page Jul 12, 2020
·
1 revision
These are the coding standards to use in your pull requests.
Some of the existing code may not follow these standards. If it doesn't you can submit a pull request cleaning up the code to conform to the standards. However, please do that in a pull request that is separate from any changes. That makes it easier to review.
Naming convention
Constants: UPPER_CASE_WITH_UNDERSCORES
Classes/functions/properties: PascalCase
Private class-level variables: _camelCase
Private static class-level variables: s_camelCase (helps to identify that you may need to add a lock, when using the variable in a function)
Lower-case second (and subsequent) letters when the variable name is an abbreviation: Xml, Sql, Id
Variables declared in the code-behind, or a business/service class, should never be prefixed with datatype.
XAML control names can be prefixed with datatype (btn = button, lbl = label, etc.)
Code blocks
Always wrap code blocks with curly braces, even if they are only one line.
The opening curly brace goes on a new line.
Unit tests
Test projects names should match the project they are testing, with a prefix of "Test."
The tests for the SOSCSRPG.Engine project should be in the Test.SOSCSRPG.Engine project
Test names should start with "Test_" and give a descriptive name of the functionality they are testing