mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-08 05:28:39 +00:00
Compare commits
1 Commits
add-bit-of
...
WoofWare.M
Author | SHA1 | Date | |
---|---|---|---|
|
5319a33b7b |
@@ -2,28 +2,6 @@ namespace WoofWare.Myriad.Plugins
|
|||||||
|
|
||||||
open System.Collections.Generic
|
open System.Collections.Generic
|
||||||
|
|
||||||
type internal DesiredGenerator =
|
|
||||||
| InterfaceMock of isInternal : bool option
|
|
||||||
| JsonParse of extensionMethod : bool option
|
|
||||||
| JsonSerialize of extensionMethod : bool option
|
|
||||||
| HttpClient of extensionMethod : bool option
|
|
||||||
|
|
||||||
static member Parse (s : string) =
|
|
||||||
match s with
|
|
||||||
| "GenerateMock" -> DesiredGenerator.InterfaceMock None
|
|
||||||
| "GenerateMock(true)" -> DesiredGenerator.InterfaceMock (Some true)
|
|
||||||
| "GenerateMock(false)" -> DesiredGenerator.InterfaceMock (Some false)
|
|
||||||
| "JsonParse" -> DesiredGenerator.JsonParse None
|
|
||||||
| "JsonParse(true)" -> DesiredGenerator.JsonParse (Some true)
|
|
||||||
| "JsonParse(false)" -> DesiredGenerator.JsonParse (Some false)
|
|
||||||
| "JsonSerialize" -> DesiredGenerator.JsonSerialize None
|
|
||||||
| "JsonSerialize(true)" -> DesiredGenerator.JsonSerialize (Some true)
|
|
||||||
| "JsonSerialize(false)" -> DesiredGenerator.JsonSerialize (Some false)
|
|
||||||
| "HttpClient" -> DesiredGenerator.HttpClient None
|
|
||||||
| "HttpClient(true)" -> DesiredGenerator.HttpClient (Some true)
|
|
||||||
| "HttpClient(false)" -> DesiredGenerator.HttpClient (Some false)
|
|
||||||
| _ -> failwith $"Failed to parse as a generator specification: %s{s}"
|
|
||||||
|
|
||||||
[<RequireQualifiedAccess>]
|
[<RequireQualifiedAccess>]
|
||||||
module internal MyriadParamParser =
|
module internal MyriadParamParser =
|
||||||
(*
|
(*
|
||||||
|
23
WoofWare.Myriad.Plugins/Parameters.fs
Normal file
23
WoofWare.Myriad.Plugins/Parameters.fs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
namespace WoofWare.Myriad.Plugins
|
||||||
|
|
||||||
|
type internal DesiredGenerator =
|
||||||
|
| InterfaceMock of isInternal : bool option
|
||||||
|
| JsonParse of extensionMethod : bool option
|
||||||
|
| JsonSerialize of extensionMethod : bool option
|
||||||
|
| HttpClient of extensionMethod : bool option
|
||||||
|
|
||||||
|
static member Parse (s : string) =
|
||||||
|
match s with
|
||||||
|
| "GenerateMock" -> DesiredGenerator.InterfaceMock None
|
||||||
|
| "GenerateMock(true)" -> DesiredGenerator.InterfaceMock (Some true)
|
||||||
|
| "GenerateMock(false)" -> DesiredGenerator.InterfaceMock (Some false)
|
||||||
|
| "JsonParse" -> DesiredGenerator.JsonParse None
|
||||||
|
| "JsonParse(true)" -> DesiredGenerator.JsonParse (Some true)
|
||||||
|
| "JsonParse(false)" -> DesiredGenerator.JsonParse (Some false)
|
||||||
|
| "JsonSerialize" -> DesiredGenerator.JsonSerialize None
|
||||||
|
| "JsonSerialize(true)" -> DesiredGenerator.JsonSerialize (Some true)
|
||||||
|
| "JsonSerialize(false)" -> DesiredGenerator.JsonSerialize (Some false)
|
||||||
|
| "HttpClient" -> DesiredGenerator.HttpClient None
|
||||||
|
| "HttpClient(true)" -> DesiredGenerator.HttpClient (Some true)
|
||||||
|
| "HttpClient(false)" -> DesiredGenerator.HttpClient (Some false)
|
||||||
|
| _ -> failwith $"Failed to parse as a generator specification: %s{s}"
|
@@ -31,6 +31,7 @@
|
|||||||
<Compile Include="Text.fs" />
|
<Compile Include="Text.fs" />
|
||||||
<Compile Include="Measure.fs" />
|
<Compile Include="Measure.fs" />
|
||||||
<Compile Include="AstHelper.fs" />
|
<Compile Include="AstHelper.fs" />
|
||||||
|
<Compile Include="Parameters.fs" />
|
||||||
<Compile Include="RemoveOptionsGenerator.fs"/>
|
<Compile Include="RemoveOptionsGenerator.fs"/>
|
||||||
<Compile Include="MyriadParamParser.fs" />
|
<Compile Include="MyriadParamParser.fs" />
|
||||||
<Compile Include="InterfaceMockGenerator.fs"/>
|
<Compile Include="InterfaceMockGenerator.fs"/>
|
||||||
|
Reference in New Issue
Block a user