mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-06 20:48:40 +00:00
Compare commits
3 Commits
WoofWare.M
...
add-bit-of
Author | SHA1 | Date | |
---|---|---|---|
|
3189143473 | ||
|
21dfa77850 | ||
|
217ef138f6 |
@@ -2,6 +2,28 @@ 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 =
|
||||||
(*
|
(*
|
||||||
|
@@ -1,23 +0,0 @@
|
|||||||
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,7 +31,6 @@
|
|||||||
<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