Applies to: "Name a source file to the type it contains (AV1506)"
Consider the next file:
public class TableLoader
{
// ...
}
public class TableLoader<TKey, TConverter> : TableLoader
{
// ...
}
Options:
- Allow both types to live in the same file, because their names are the same (they only differ in arity)
- Split into TableLoader.cs and TableLoader`2.cs (because arity = 2)
- Split into TableLoader.cs and TableLoaderTKeyTConverter.cs
- Split into TableLoader.cs and TableLoader.generic.cs (nested)
I think it is worth providing guidance on this situation, to align naming accross the entire team. My preference would be 2. Though I often see option 1 in codebases too.
Applies to: "Name a source file to the type it contains (AV1506)"
Consider the next file:
Options:
I think it is worth providing guidance on this situation, to align naming accross the entire team. My preference would be 2. Though I often see option 1 in codebases too.