Files
WoofWare.Whippet/WoofWare.Whippet.App/RuntimeConfigGen.fs
Patrick Stevens da609db2ce
Some checks are pending
.NET / build (Debug) (push) Waiting to run
.NET / build (Release) (push) Waiting to run
.NET / analyzers (push) Waiting to run
.NET / check-dotnet-format (push) Waiting to run
.NET / check-nix-format (push) Waiting to run
.NET / Check links (push) Waiting to run
.NET / Check flake (push) Waiting to run
.NET / nuget-pack (push) Waiting to run
.NET / expected-pack (push) Blocked by required conditions
.NET / check-accurate-generations (push) Waiting to run
.NET / all-required-checks-complete (push) Blocked by required conditions
.NET / nuget-publish (push) Blocked by required conditions
.NET / nuget-publish-fantomas (push) Blocked by required conditions
.NET / nuget-publish-json-plugin (push) Blocked by required conditions
.NET / nuget-publish-json-attrs (push) Blocked by required conditions
.NET / nuget-publish-argparser-plugin (push) Blocked by required conditions
.NET / nuget-publish-argparser-attrs (push) Blocked by required conditions
First release (#10)
2024-10-07 13:35:43 +01:00

104 lines
3.4 KiB
Forth

namespace WoofWare.Whippet
(* File originally generated by Myriad. *)
/// Module containing JSON parsing methods for the FrameworkDescription type
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module FrameworkDescription =
/// Parse from a JSON node.
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : FrameworkDescription =
let arg_1 =
(match node.["version"] with
| null ->
raise (
System.Collections.Generic.KeyNotFoundException (
sprintf "Required key '%s' not found on JSON object" ("version")
)
)
| v -> v)
.AsValue()
.GetValue<System.String> ()
let arg_0 =
(match node.["name"] with
| null ->
raise (
System.Collections.Generic.KeyNotFoundException (
sprintf "Required key '%s' not found on JSON object" ("name")
)
)
| v -> v)
.AsValue()
.GetValue<System.String> ()
{
Name = arg_0
Version = arg_1
}
namespace WoofWare.Whippet
/// Module containing JSON parsing methods for the RuntimeOptions type
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module RuntimeOptions =
/// Parse from a JSON node.
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : RuntimeOptions =
let arg_3 =
match node.["rollForward"] with
| null -> None
| v -> v.AsValue().GetValue<System.String> () |> Some
let arg_2 =
match node.["frameworks"] with
| null -> None
| v ->
v.AsArray ()
|> Seq.map (fun elt -> FrameworkDescription.jsonParse elt)
|> List.ofSeq
|> Some
let arg_1 =
match node.["framework"] with
| null -> None
| v -> FrameworkDescription.jsonParse v |> Some
let arg_0 =
(match node.["tfm"] with
| null ->
raise (
System.Collections.Generic.KeyNotFoundException (
sprintf "Required key '%s' not found on JSON object" ("tfm")
)
)
| v -> v)
.AsValue()
.GetValue<System.String> ()
{
Tfm = arg_0
Framework = arg_1
Frameworks = arg_2
RollForward = arg_3
}
namespace WoofWare.Whippet
/// Module containing JSON parsing methods for the RuntimeConfig type
[<RequireQualifiedAccess ; CompilationRepresentation(CompilationRepresentationFlags.ModuleSuffix)>]
module RuntimeConfig =
/// Parse from a JSON node.
let jsonParse (node : System.Text.Json.Nodes.JsonNode) : RuntimeConfig =
let arg_0 =
RuntimeOptions.jsonParse (
match node.["runtimeOptions"] with
| null ->
raise (
System.Collections.Generic.KeyNotFoundException (
sprintf "Required key '%s' not found on JSON object" ("runtimeOptions")
)
)
| v -> v
)
{
RuntimeOptions = arg_0
}