We already have enough knowledge on what a type provider is, the building blocks, and the nature of type providers, also understanding the nature of type provider implementations, including the implementation strategies, as we went deeper.
To ease the experience and our type provider building mindset, a real experience of quickly using it from existing samples has proven to be very useful. We have increased our intuition on how type provider works using samples from F# 4.0 built-in type provider features, FSharp.Data.TypeProvider
.
Implementing your own type provider again is quite a bit tedious, especially when we are dealing with generative type providers as our choice of strategy.
The following are the common steps of implementing your own type provider:
Declare your type provider. The type provider must be
public
.Mark your type provider's type with
TypeProviderAttribute
. You can simply use the abbreviatedTypeProvider
. This attribute is available inMicrosoft...