Skip to content
Snippets Groups Projects
Commit b13320b3 authored by Lukas Drabek's avatar Lukas Drabek :keyboard:
Browse files

Add new file

parent d06ab32c
No related branches found
No related tags found
No related merge requests found
## Code Order
1. constants
2. private fields
3. public properties
4. constructors
5. static methods
6. instance methods
## Naming
```csharp
interface IEmployee
{
}
enum ERole
{
Guest,
Employee,
Secretary
}
internal class Example(IDataRepository repository)
{
private const string Path = "/app";
private const string FailMessage = "Fail";
private int _requiredAge = 18;
public int Age {get;set;}
public bool HasRequiredAge => Age >= 18;
public Example(IDataRepository repository, IExternalService externalService) : this(repository)
{
}
public static string PathOfFile(string fileName) => $"{Path}/{fileName}";
public async Task<string> PrintTestAsync(bool extendedMessage, CancellationToken ct)
{
var data = await repository.GetDataAsync(ct);
var result = data.IsSuccess switch
{
true => data.Message,
_ => FailMessage
};
return extendedMessage
? $"result has value: {result}"
: result;
}
}
```
## Git
branch prefixes:
```
feature/
fix/
refactor/
style/
docs/
chore/
```
commit message:
```
<what was changed> (short and to the point, it can appear in the changelog)
<>
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment