Coffeehouse Post

Single Post Permalink

View Thread: .Net versioning question
  • User profile image

    @BitFlipper: Can you create wrapper classes (deriving from the same interface) that calls specific versions of the API? Then put each instance of these wrapper classes into a Dictionary keyed by the version number. Your calling routine can be generalized to simply look up the instance by version number in the Dictionary and then call the appropriate method exposed by the interface on that particular instance.

    The routine that populates the Dictionary can read the types from configuration and instantiate them dynamically.