Scope of this Project

The intent of this project is to replace each of the sealed classes in the Team Foundation API with an interface and an adapter that allows an application to access the sealed class through the interface. Those familiar with the Team Foundation API know that this is a rather ambitious goal.

The attached spreadsheet contains an analysis of the Team Foundation API for Team Foundation Server 2008. This information was generated by reflecting through all the Microsoft.TeamFoundation.* assemblies to catalog the public classes and interfaces. This analysis revealed that the Team Foundation API has 970 public classes, 277 of with are sealed. To fully implement the CodePlex.TeamFoundation.Adapters, each of these 277 sealed classes will require an interface as well as an adapter class that implements the interface. In addition, any of the unsealed classes that have methods or properties that reference a sealed class will also require an interface and adapter.

Clearly this project when fully implemented will be huge, with hundreds of interfaces and adapter classes. Obviously it's not practical to implement all these interfaces and adapters manually. Fortunately, authoring the interfaces and adapters is very mechanical. For this reason, the code could be generated programmatically as follows:
  • Catalog all of the public classes in the Team Foundation API (done, see attached spreadsheet)
  • For each class cataloged:
    • If the class is sealed, then generate an interface that mirrors the class
    • If the class is not sealed, but contains references to one or more sealed classes, then generate an interface that mirrors the class
  • For each interface generated:
    • If any of the properties or methods reference a class that required a new interface, then replace that reference with a reference to the corresponding interface.
    • Generate an adapter class that implements the interface.

Comments and suggestions welcome.

Attachment: TfsApiPublicTypes.xlsx

Last edited Apr 6, 2009 at 12:45 AM by mdanner, version 3


No comments yet.