Skip to content

Commit 3cd0940

Browse files
authored
Merge pull request #331 from jberzy/ws-cleanup
whitespace cleanup
2 parents 920b7ae + 76fed50 commit 3cd0940

74 files changed

Lines changed: 1196 additions & 1234 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

main.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/FSharp.Data.GraphQL.Client.DesignTime/ProvidedTypesHelper.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ module internal Provider =
718718
| IntrospectionFile path ->
719719
System.IO.File.ReadAllText path
720720
let schema = Serialization.deserializeSchema schemaJson
721-
721+
722722
let schemaProvidedTypes = getSchemaProvidedTypes(schema, uploadInputTypeName, explicitOptionalParameters)
723723
let typeWrapper = ProvidedTypeDefinition("Types", None, isSealed = true)
724724
typeWrapper.AddMembers(schemaProvidedTypes |> Seq.map (fun kvp -> kvp.Value) |> List.ofSeq)

src/FSharp.Data.GraphQL.Client/Extensions.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ open System.Security.Cryptography
1313
module internal Extensions =
1414
type String with
1515
/// Returns the input string with the first character in upper case.
16-
member this.FirstCharUpper() =
16+
member this.FirstCharUpper() =
1717
this.Substring(0, 1).ToUpperInvariant() + this.Substring(1)
1818

1919
/// Returns the input string with the first character in lower case.

src/FSharp.Data.GraphQL.Client/GraphQLClient.fs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,23 +59,23 @@ module GraphQLClient =
5959
let sendRequestAsync (connection : GraphQLClientConnection) (request : GraphQLRequest) =
6060
async {
6161
let invoker = connection.Invoker
62-
let variables =
62+
let variables =
6363
match request.Variables with
6464
| null | [||] -> JsonValue.Null
6565
| _ -> Map.ofArray request.Variables |> Serialization.toJsonValue
6666
let operationName =
6767
match request.OperationName with
6868
| Some x -> JsonValue.String x
6969
| None -> JsonValue.Null
70-
let requestJson =
70+
let requestJson =
7171
[| "operationName", operationName
7272
"query", JsonValue.String request.Query
7373
"variables", variables |]
7474
|> JsonValue.Record
7575
let content = new StringContent(requestJson.ToString(), Encoding.UTF8, "application/json")
7676
return! postAsync invoker request.ServerUrl request.HttpHeaders content
7777
}
78-
78+
7979
/// Sends a request to a GraphQL server.
8080
let sendRequest client request =
8181
sendRequestAsync client request
@@ -108,7 +108,7 @@ module GraphQLClient =
108108
}
109109

110110
/// Executes an introspection schema request to a GraphQL server.
111-
let sendIntrospectionRequest client serverUrl httpHeaders =
111+
let sendIntrospectionRequest client serverUrl httpHeaders =
112112
sendIntrospectionRequestAsync client serverUrl httpHeaders
113113
|> Async.RunSynchronously
114114

@@ -118,25 +118,25 @@ module GraphQLClient =
118118
let invoker = connection.Invoker
119119
let boundary = "----GraphQLProviderBoundary" + (Guid.NewGuid().ToString("N"))
120120
let content = new MultipartContent("form-data", boundary)
121-
let files =
121+
let files =
122122
let rec tryMapFileVariable (name: string, value : obj) =
123123
match value with
124124
| null | :? string -> None
125125
| :? Upload as x -> Some [|name, x|]
126-
| OptionValue x ->
126+
| OptionValue x ->
127127
x |> Option.bind (fun x -> tryMapFileVariable (name, x))
128128
| :? IDictionary<string, obj> as x ->
129129
x |> Seq.collect (fun kvp -> tryMapFileVariable (name + "." + (kvp.Key.FirstCharLower()), kvp.Value) |> Option.defaultValue [||])
130130
|> Array.ofSeq
131131
|> Some
132-
| EnumerableValue x ->
132+
| EnumerableValue x ->
133133
x |> Array.mapi (fun ix x -> tryMapFileVariable (name + "." + (ix.ToString()), x))
134134
|> Array.collect (Option.defaultValue [||])
135135
|> Some
136136
| _ -> None
137137
request.Variables |> Array.collect (tryMapFileVariable >> (Option.defaultValue [||]))
138-
let operationContent =
139-
let variables =
138+
let operationContent =
139+
let variables =
140140
match request.Variables with
141141
| null | [||] -> JsonValue.Null
142142
| _ -> request.Variables |> Map.ofArray |> Serialization.toJsonValue

src/FSharp.Data.GraphQL.Client/GraphQLClientConnection.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ type GraphQLClientConnection(invoker : HttpMessageInvoker, ownsInvoker : bool) =
2929

3030
/// The System.Net.Http.HttpMessageInvoker used by this connection.
3131
member __.Invoker = invoker
32-
32+
3333
interface IDisposable with
3434
member __.Dispose() = if ownsInvoker then invoker.Dispose()

src/FSharp.Data.GraphQL.Client/GraphQLProviderRuntimeContext.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type GraphQLProviderRuntimeContext =
1515
/// Gets the URL of the server that this context refers to.
1616
{ ServerUrl : string
1717
/// Gets the HTTP headers used for calls to the server that this context refers to.
18-
HttpHeaders : seq<string * string>
18+
HttpHeaders : seq<string * string>
1919
/// Gets the connection component used to make calls to the server.
2020
Connection : GraphQLClientConnection }
2121
interface IDisposable with

src/FSharp.Data.GraphQL.Client/JsonValue.fs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ type JsonValue =
3838
| Record of properties:(string * JsonValue)[]
3939
| Array of elements:JsonValue[]
4040
| Boolean of bool
41-
| Null
41+
| Null
4242

4343
/// <exclude />
4444
[<EditorBrowsableAttribute(EditorBrowsableState.Never)>]
@@ -70,11 +70,11 @@ type JsonValue =
7070
JsonValue.JsonStringEncodeTo w s
7171
w.Write "\""
7272
| Record properties ->
73-
w.Write "{"
73+
w.Write "{"
7474
for i = 0 to properties.Length - 1 do
7575
let k,v = properties.[i]
7676
if i > 0 then w.Write ","
77-
newLine indentation 2
77+
newLine indentation 2
7878
w.Write "\""
7979
JsonValue.JsonStringEncodeTo w k
8080
w.Write propSep
@@ -90,17 +90,17 @@ type JsonValue =
9090
if elements.Length > 0 then
9191
newLine indentation 0
9292
w.Write "]"
93-
serialize 0 x
93+
serialize 0 x
9494

9595
static member internal JsonStringEncodeTo (w:TextWriter) (value:string) =
9696
if String.IsNullOrEmpty value then ()
97-
else
97+
else
9898
for i = 0 to value.Length - 1 do
9999
let c = value.[i]
100100
let ci = int c
101101
if ci >= 0 && ci <= 7 || ci = 11 || ci >= 14 && ci <= 31 then
102102
w.Write("\\u{0:x4}", ci) |> ignore
103-
else
103+
else
104104
match c with
105105
| '\b' -> w.Write "\\b"
106106
| '\t' -> w.Write "\\t"
@@ -133,7 +133,7 @@ type private JsonParser(jsonText:string) =
133133
let throw() =
134134
let msg =
135135
sprintf
136-
"Invalid JSON starting at character %d, snippet = \n----\n%s\n-----\njson = \n------\n%s\n-------"
136+
"Invalid JSON starting at character %d, snippet = \n----\n%s\n-----\njson = \n------\n%s\n-------"
137137
i (jsonText.[(max 0 (i-10))..(min (jsonText.Length-1) (i+10))]) (if jsonText.Length > 1000 then jsonText.Substring(0, 1000) else jsonText)
138138
failwith msg
139139
let ensure cond =
@@ -194,7 +194,7 @@ type private JsonParser(jsonText:string) =
194194
let unicodeChar (s:string) =
195195
if s.Length <> 8 then failwith "unicodeChar";
196196
if s.[0..1] <> "00" then failwith "unicodeChar";
197-
UnicodeHelper.getUnicodeSurrogatePair <| System.UInt32.Parse(s, NumberStyles.HexNumber)
197+
UnicodeHelper.getUnicodeSurrogatePair <| System.UInt32.Parse(s, NumberStyles.HexNumber)
198198
let lead, trail = unicodeChar (s.Substring(i+2, 8))
199199
buf.Append(lead) |> ignore
200200
buf.Append(trail) |> ignore

src/FSharp.Data.GraphQL.Client/Locations.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ type StringLocation =
2121
/// <param name="folderPath">An optional folder path. Provide it when the value parameter is a file without its path.</param>
2222
static member Create(value : string, ?folderPath : string) =
2323
try
24-
let file =
24+
let file =
2525
match folderPath with
2626
| Some folderPath -> System.IO.Path.Combine(folderPath, value)
2727
| None -> value
@@ -50,7 +50,7 @@ type IntrospectionLocation =
5050
| (true, _) -> Uri value
5151
| _ -> failwithf "Could not determine location of introspection. The introspection should be a valid GraphQL server URL, or a introspection JSON file on the path of the project or script."
5252
try
53-
let file =
53+
let file =
5454
match folderPath with
5555
| Some folderPath -> System.IO.Path.Combine(folderPath, value)
5656
| None -> value

src/FSharp.Data.GraphQL.Client/MimeTypes.fs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ let private dictBuilder() : IReadOnlyDictionary<string, string> =
4141
".air", "application/vnd.adobe.air-application-installer-package+zip"
4242
".amc", "application/mpeg"
4343
".anx", "application/annodex"
44-
".apk", "application/vnd.android.package-archive"
44+
".apk", "application/vnd.android.package-archive"
4545
".application", "application/x-ms-application"
4646
".art", "image/x-jg"
4747
".asa", "application/xml"
@@ -130,7 +130,7 @@ let private dictBuilder() : IReadOnlyDictionary<string, string> =
130130
".dwf", "drawing/x-dwf"
131131
".dwg", "application/acad"
132132
".dwp", "application/octet-stream"
133-
".dxf", "application/x-dxf"
133+
".dxf", "application/x-dxf"
134134
".dxr", "application/x-director"
135135
".eml", "message/rfc822"
136136
".emz", "application/octet-stream"
@@ -413,7 +413,7 @@ let private dictBuilder() : IReadOnlyDictionary<string, string> =
413413
".rqy", "text/x-ms-rqy"
414414
".rtf", "application/rtf"
415415
".rtx", "text/richtext"
416-
".rvt", "application/octet-stream"
416+
".rvt", "application/octet-stream"
417417
".ruleset", "application/xml"
418418
".s", "text/plain"
419419
".safariextz", "application/x-safari-safariextz"
@@ -435,7 +435,7 @@ let private dictBuilder() : IReadOnlyDictionary<string, string> =
435435
".sit", "application/x-stuffit"
436436
".sitemap", "application/xml"
437437
".skin", "application/xml"
438-
".skp", "application/x-koan"
438+
".skp", "application/x-koan"
439439
".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"
440440
".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"
441441
".slk", "application/vnd.ms-excel"
@@ -593,7 +593,7 @@ let private dictBuilder() : IReadOnlyDictionary<string, string> =
593593
".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"
594594
".xlw", "application/vnd.ms-excel"
595595
".xml", "text/xml"
596-
".xmp", "application/octet-stream"
596+
".xmp", "application/octet-stream"
597597
".xmta", "application/xml"
598598
".xof", "x-world/x-vrml"
599599
".XOML", "text/plain"

src/FSharp.Data.GraphQL.Client/ReflectionPatterns.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ module ReflectionPatterns =
2121
typeof<byte>
2222
typeof<sbyte> |]
2323

24-
let isOption (t : Type) =
24+
let isOption (t : Type) =
2525
t.IsGenericType && t.GetGenericTypeDefinition() = typedefof<_ option>
2626

2727
let isMap (t : Type) =

0 commit comments

Comments
 (0)