-
Notifications
You must be signed in to change notification settings - Fork 337
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# AI Instructions | ||
|
||
## Project Context | ||
|
||
MySqlConnector is a high-performance ADO.NET Data Provider for MySQL. | ||
It implements the MySQL protocol and handles authentication, connection pooling, and data access. | ||
|
||
## Key Conventions | ||
|
||
### Code Style | ||
- follow Microsoft's C# coding conventions with the exception that field names are prefixed with `m_` and are specified at the end of the class definition | ||
- use C# nullable reference types and implicit usings | ||
- XML documentation required for public APIs | ||
- use tabs for indentation in *.cs files; use two spaces for indentation in XML and JSON files, including *.csproj files | ||
- follow the rules from `.editorconfig` | ||
- implement async methods using the IOBehavior pattern: sync and async methods delegate to a common implementation that takes an IOBehavior parameter and handles both I/O types | ||
|
||
### Performance | ||
- minimize allocations in hot paths | ||
- use Span-based APIs wherever possible | ||
|
||
### Testing | ||
- Test files should be located in corresponding test directories. Place unit tests in tests/MySqlConnector.Tests. Place integration tests in tests/IntegrationTests. | ||
- Test names should be descriptive and follow the pattern `CamelCaseShortDescription`. | ||
- Use xUnit for tests. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters