We use the same coding style conventions as outlined in .NET Framework Coding Styles, with the following additions:
- We put one type per file, including nested types. Files containing a nested type, should follow the
Parent.NestedType.cs
convention. Generic types should follow theGenericWithOneTypeParameter`1.cs
,GenericWithTwowTypeParameters`2.cs
convention. - We avoid using regions.
- We sort members in classes in the following order; fields, constructors, events, properties and then methods.
- We favor private fields over private properties
- For MEF parts/components, we favor constructor injection over property/field injection.
- We flavor
IVsService<T>
andIVsService<TService, TInterface>
over usage ofSVsServiceProvider
.
- We favor a single Assert per unit test.
- We use the
Method_Setup_Behavior
naming style for unit tests, for example,GetProperty_NullAsName_ThrowsArgument
orCalculateValues_WhenDisposed_ReturnsNull