Skip to content

Polyfills

Sam Gerené edited this page Dec 4, 2017 · 8 revisions

Target Frameworks

The CDP4-SDK provides support for the following target frameworks:

  • net45
  • net451
  • net452
  • net46
  • net461
  • net462
  • net47
  • netstandard1.6

Not all methods used in the net* targets are available in the same namespace in netstandard1.6. Support for the different target frameworks is implemented with so called polyfill methods.

Query* methods

The Type class does not expose the same API in the different target frameworks. A polyfill class is made available to provide exentions methods on the Type class to harmonize the implementation for all the target frameworks of the CDP4-SDK.

Methods and properties that are not available using the same .NET libraries or namespaces for all the target frameworks are prefixed with the word Query. These methods are implemented in the same file. Compiler directives are used to differentiate between the implementations that are valid for the different target frameworks specified above.

kudos to Michael Whelan for an excellent article on porting code to .NET Core.

Clone this wiki locally