I think SA1402 is a great rule but I have problem with generics. I've got a class that uses the Func
delegate, so the names roughly parallel that signature. That is, I have classes named Operation<TType>
, Operation<T, TType>
, Operation<T1, T2, TType>
and so on. According to SA1402, I need to put all these small classes in separate files and come up with some strange decoration for the file name. Additionally, if I need to change one of these items I'll typically need to make changes to the rest. This seems less supportable than a single module.
Does it make sense for SA1402 to allow generics of the same basic class (as well as partials) to reside in one file? In this case all permutations of the class Operation
would reside in 'Operation.cs'.