This project is read-only.

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. As if that's not enough, 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 an adapter is very mechanical, so the code for all the interfaces and adapters 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 in 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 references a sealed class, 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 1:17 AM by mdanner, version 9

Comments

No comments yet.