1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
|
namespace Microsoft.FSharp.Build
open System
open Microsoft.Build.Framework
open Microsoft.Build.Utilities
type FsSrGen() =
inherit ToolTask()
let mutable inputFile : string = null
let mutable toolPath : string = null
let mutable outputFsFile : string = null
let mutable outputResxFile : string = null
[<Required>]
member this.InputFile
with get () = inputFile
and set (s) = inputFile <- s
[<Required>]
[<Output>]
member this.OutputFsFile
with get () = outputFsFile
and set (s) = outputFsFile <- s
[<Required>]
[<Output>]
member this.OutputResxFile
with get () = outputResxFile
and set (s) = outputResxFile <- s
// For targeting other versions
member this.ToolPath
with get () = toolPath
and set (s) = toolPath <- s
// ToolTask methods
override this.ToolName = "fssrgen.exe"
override this.GenerateFullPathToTool() =
System.IO.Path.Combine(toolPath, this.ToolExe)
override this.GenerateCommandLineCommands() =
let builder = new CommandLineBuilder()
builder.AppendSwitchIfNotNull(" ", inputFile)
builder.AppendSwitchIfNotNull(" ", outputFsFile)
builder.AppendSwitchIfNotNull(" ", outputResxFile)
let args = builder.ToString()
args
|