forked from fsprojects/FSharpx.Extras
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Normalized line endings on files, that had not been normalized before.
- Loading branch information
1 parent
c025f9d
commit cb9942f
Showing
126 changed files
with
27,157 additions
and
27,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,35 @@ | ||
module $rootnamespace$ | ||
|
||
open FSharpx.TypeProviders.DSL | ||
open Microsoft.FSharp.Core.CompilerServices | ||
open Samples.FSharpPreviewRelease2011.ProvidedTypes | ||
open System.Reflection | ||
|
||
let rootNamespace = "$rootnamespace$" | ||
let thisAssembly = Assembly.GetExecutingAssembly() | ||
|
||
let addMyTypedMembers (param:string) (tyDef:ProvidedTypeDefinition) = | ||
try | ||
tyDef | ||
|+> literalField "MySampleFieldName" param | ||
|> addXmlDoc (sprintf "Returns the string that was provided as the static parameter (i.e. %s)" param) | ||
|> ignore | ||
|
||
tyDef | ||
with | ||
| exn -> tyDef | ||
|
||
let typedMySample () = | ||
erasedType<obj> thisAssembly rootNamespace "MySample" | ||
|> staticParameter "sampleParam" (fun typeName param -> | ||
erasedType<obj> thisAssembly rootNamespace typeName | ||
|> addMyTypedMembers param) | ||
|
||
[<TypeProvider>] | ||
type public SampleTypeProvider() as this = | ||
inherit TypeProviderForNamespaces() | ||
|
||
do this.AddNamespace(rootNamespace, [typedMySample()]) | ||
|
||
[<TypeProviderAssembly>] | ||
module $rootnamespace$ | ||
|
||
open FSharpx.TypeProviders.DSL | ||
open Microsoft.FSharp.Core.CompilerServices | ||
open Samples.FSharpPreviewRelease2011.ProvidedTypes | ||
open System.Reflection | ||
|
||
let rootNamespace = "$rootnamespace$" | ||
let thisAssembly = Assembly.GetExecutingAssembly() | ||
|
||
let addMyTypedMembers (param:string) (tyDef:ProvidedTypeDefinition) = | ||
try | ||
tyDef | ||
|+> literalField "MySampleFieldName" param | ||
|> addXmlDoc (sprintf "Returns the string that was provided as the static parameter (i.e. %s)" param) | ||
|> ignore | ||
|
||
tyDef | ||
with | ||
| exn -> tyDef | ||
|
||
let typedMySample () = | ||
erasedType<obj> thisAssembly rootNamespace "MySample" | ||
|> staticParameter "sampleParam" (fun typeName param -> | ||
erasedType<obj> thisAssembly rootNamespace typeName | ||
|> addMyTypedMembers param) | ||
|
||
[<TypeProvider>] | ||
type public SampleTypeProvider() as this = | ||
inherit TypeProviderForNamespaces() | ||
|
||
do this.AddNamespace(rootNamespace, [typedMySample()]) | ||
|
||
[<TypeProviderAssembly>] | ||
do () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
#r @"bin\debug\$assemblyname$.dll" | ||
|
||
open $rootnamespace$ | ||
|
||
type sample = MySample<"SampleStaticValue"> | ||
printfn "The provided static param value is %s" sample.MySampleFieldName | ||
|
||
|
||
#r @"bin\debug\$assemblyname$.dll" | ||
|
||
open $rootnamespace$ | ||
|
||
type sample = MySample<"SampleStaticValue"> | ||
printfn "The provided static param value is %s" sample.MySampleFieldName | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
IF EXIST "%ProgramFiles(x86)%" ( | ||
"%ProgramFiles(x86)%\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" -r:bin\debug\$assemblyname$.dll Test.fsx | ||
) ELSE ( | ||
"%ProgramFiles%\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" -r:bin\debug\$assemblyname$.dll Test.fsx | ||
) | ||
|
||
IF EXIST "%ProgramFiles(x86)%" ( | ||
"%ProgramFiles(x86)%\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" -r:bin\debug\$assemblyname$.dll Test.fsx | ||
) ELSE ( | ||
"%ProgramFiles%\Microsoft SDKs\F#\3.0\Framework\v4.0\fsc.exe" -r:bin\debug\$assemblyname$.dll Test.fsx | ||
) | ||
|
||
pause |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="TestInt1" value="123" /> | ||
</appSettings> | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<configuration> | ||
<appSettings> | ||
<add key="TestInt1" value="123" /> | ||
</appSettings> | ||
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
module $rootnamespace$ | ||
|
||
open FSharpx | ||
|
||
type settings = AppSettingsTyped< "Test.config" > | ||
|
||
printfn "TestInt1 Value is %i" settings.TestInt1 | ||
module $rootnamespace$ | ||
|
||
open FSharpx | ||
|
||
type settings = AppSettingsTyped< "Test.config" > | ||
|
||
printfn "TestInt1 Value is %i" settings.TestInt1 |
Oops, something went wrong.