Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion docs/dev/CodingGuidelines/CodingGuidelines.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

* [Code Style](#code-style)
* [Naming of Private and Protected Fields](#naming-of-private-and-protected-fields)
* [Naming of Objects Used in Lock Statements](#naming-of-objects-used-in-lock-statements)
* [Naming of Constants](#naming-of-constants)
* [Naming of Asynchronous Methods](#naming-of-asynchronous-methods)
* [Naming of Value Tuples](#naming-of-value-tuples)
Expand Down Expand Up @@ -49,6 +50,13 @@ public class MyClass
}
```

### Naming of Objects Used in Lock Statements

The common well-known naming convention is to call lock objects used in C# `lock` statements as "locker" or "lock". It is recommended to follow the convention in the Acuminator code.
Comment thread
SENya1990 marked this conversation as resolved.
```C#
private readonly object _locker = new();
```

### Naming of Constants

Names of constants must begin with a capital letter.
Expand Down Expand Up @@ -487,4 +495,4 @@ You can find flags indicating the version of analyzed Acumatica DLLs in the `Acu
If you need to add a new flag indicating the version of Acumatica DLLs, you should add it to the `PXContext` class. The check for Acumatica version has to be based on the presense of some new API
added in the specific version of Acumatica DLLs. We can't rely on standard .Net assembly version attributes because Acumatica assemblies don't have them or they are not updated properly.

*Remember! Only public API can be used to check the version of Acumatica DLLs because Roslyn does not load private and internal metadata of the external dependencies of the analyzed code.*
*Remember! Only public API can be used to check the version of Acumatica DLLs because Roslyn does not load private and internal metadata of the external dependencies of the analyzed code.*