Steffen asked me to provide a generated type provider sample to help understand the type provider API change and generated type provider itself. Changeset 19125 is made minutes ago to FSharp 3.0 Sample pack. The sample shows how to write a generated type provider.
In the solution, there are three projects:
Tweet to fsharp
In the solution, there are three projects:
- GeneratedTypeProvider project is the one generating the type provider using the new API. The generated type provides only one function which return a constant value 1.
- ConsoleApplication2, which is F# project, references to GeneratedTypeProvider project to expose the generated type from type provider
- ConsoleApplication1 references to ConsoleApplication2 project to reference type from C# code.
The way I use generated type provider is to generated DLL. I will start several post to help interested user to explore this area more after my sinus infection is getting better.
Tweet to fsharp
No comments:
Post a Comment