mirror of
https://github.com/Smaug123/WoofWare.Myriad
synced 2025-10-11 06:58:42 +00:00
Some fixes to nullability (#365)
This commit is contained in:
@@ -48,7 +48,16 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
return jsonNode.AsArray () |> Seq.map (fun elt -> Gym.jsonParse elt) |> List.ofSeq
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
jsonNode.AsArray ()
|
||||
|> Seq.cast<System.Text.Json.Nodes.JsonNode>
|
||||
|> Seq.map (fun elt -> Gym.jsonParse elt)
|
||||
|> List.ofSeq
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
|
||||
@@ -82,6 +91,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return GymAttendance.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -116,6 +130,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return GymAttendance.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -146,6 +165,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return Member.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -179,6 +203,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return Gym.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -209,6 +238,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return MemberActivityDto.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -239,6 +273,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return UriThing.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -294,6 +333,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
match jsonNode with
|
||||
| null -> None
|
||||
@@ -346,6 +390,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return Sessions.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -387,6 +436,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return Sessions.jsonParse jsonNode
|
||||
}
|
||||
|> (fun a -> Async.StartAsTask (a, ?cancellationToken = ct))
|
||||
@@ -878,6 +932,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
new RestEase.Response<_> (
|
||||
responseString,
|
||||
@@ -914,6 +973,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
new RestEase.Response<_> (
|
||||
responseString,
|
||||
@@ -950,6 +1014,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
new RestEase.Response<_> (
|
||||
responseString,
|
||||
@@ -986,6 +1055,11 @@ module PureGymApi =
|
||||
System.Text.Json.Nodes.JsonNode.ParseAsync (responseStream, cancellationToken = ct)
|
||||
|> Async.AwaitTask
|
||||
|
||||
let jsonNode =
|
||||
match jsonNode with
|
||||
| null -> raise (System.ArgumentNullException ())
|
||||
| v -> v
|
||||
|
||||
return
|
||||
new RestEase.Response<_> (
|
||||
responseString,
|
||||
|
Reference in New Issue
Block a user