Skip to content

Commit 6930541

Browse files
Erik Bylundkirre-bylund
authored andcommitted
fix: Convert to LF line endings
1 parent 9839668 commit 6930541

File tree

2 files changed

+60
-60
lines changed

2 files changed

+60
-60
lines changed

Runtime/Client/LootLockerServerRequest.cs

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using LootLocker.LootLockerEnums;
55
#if LOOTLOCKER_USE_NEWTONSOFTJSON
66
using Newtonsoft.Json;
7-
using Newtonsoft.Json.Serialization;
7+
using Newtonsoft.Json.Serialization;
88
#else
99
using LLlibs.ZeroDepJson;
1010
#endif
@@ -58,16 +58,16 @@ public static bool TryDeserializeObject<T>(string json, out T output)
5858
}
5959

6060
public static bool TryDeserializeObject<T>(string json, JsonSerializerSettings options, out T output)
61-
{
62-
try
63-
{
64-
output = JsonConvert.DeserializeObject<T>(json, options ?? LootLockerJsonSettings.Default);
65-
return true;
66-
}
67-
catch (Exception)
68-
{
69-
output = default(T);
70-
return false;
61+
{
62+
try
63+
{
64+
output = JsonConvert.DeserializeObject<T>(json, options ?? LootLockerJsonSettings.Default);
65+
return true;
66+
}
67+
catch (Exception)
68+
{
69+
output = default(T);
70+
return false;
7171
}
7272
}
7373
#else //LOOTLOCKER_USE_NEWTONSOFTJSON
@@ -97,15 +97,15 @@ public static bool TryDeserializeObject<T>(string json, out T output)
9797
}
9898

9999
public static bool TryDeserializeObject<T>(string json, JsonOptions options, out T output)
100-
{
101-
try
102-
{
103-
output = Json.Deserialize<T>(json, options ?? LootLockerJsonSettings.Default);
104-
return true;
105-
} catch (Exception)
106-
{
107-
output = default(T);
108-
return false;
100+
{
101+
try
102+
{
103+
output = Json.Deserialize<T>(json, options ?? LootLockerJsonSettings.Default);
104+
return true;
105+
} catch (Exception)
106+
{
107+
output = default(T);
108+
return false;
109109
}
110110
}
111111
#endif //LOOTLOCKER_USE_NEWTONSOFTJSON
@@ -307,50 +307,50 @@ public class LootLockerPaginationResponse<TKey>
307307
public TKey previous_cursor { get; set; }
308308
}
309309

310-
public class LootLockerExtendedPaginationError
311-
{
312-
/// <summary>
313-
/// Which field in the pagination that this error relates to
310+
public class LootLockerExtendedPaginationError
311+
{
312+
/// <summary>
313+
/// Which field in the pagination that this error relates to
314314
/// </summary>
315315
public string field { get; set; }
316-
/// <summary>
317-
/// The error message in question
318-
/// </summary>
319-
public string message { get; set; }
316+
/// <summary>
317+
/// The error message in question
318+
/// </summary>
319+
public string message { get; set; }
320320
}
321321

322322
public class LootLockerExtendedPagination
323323
{
324-
/// <summary>
325-
/// How many entries in total exists in the paginated list
324+
/// <summary>
325+
/// How many entries in total exists in the paginated list
326326
/// </summary>
327327
public int total { get; set; }
328-
/// <summary>
329-
/// How many entries (counting from the beginning of the paginated list) from the first entry that the current page starts at
328+
/// <summary>
329+
/// How many entries (counting from the beginning of the paginated list) from the first entry that the current page starts at
330330
/// </summary>
331331
public int offset { get; set; }
332-
/// <summary>
333-
/// Number of entries on each page
332+
/// <summary>
333+
/// Number of entries on each page
334334
/// </summary>
335335
public int per_page { get; set; }
336-
/// <summary>
337-
/// The page index to use for fetching the last page of entries
336+
/// <summary>
337+
/// The page index to use for fetching the last page of entries
338338
/// </summary>
339339
public int last_page { get; set; }
340-
/// <summary>
341-
/// The page index used for fetching this page of entries
340+
/// <summary>
341+
/// The page index used for fetching this page of entries
342342
/// </summary>
343343
public int current_page { get; set; }
344-
/// <summary>
345-
/// The page index to use for fetching the page of entries immediately succeeding this page of entries
344+
/// <summary>
345+
/// The page index to use for fetching the page of entries immediately succeeding this page of entries
346346
/// </summary>
347347
public int? next_page { get; set; }
348-
/// <summary>
349-
/// The page index to use for fetching the page of entries immediately preceding this page of entries
348+
/// <summary>
349+
/// The page index to use for fetching the page of entries immediately preceding this page of entries
350350
/// </summary>
351351
public int? prev_page { get; set; }
352-
/// <summary>
353-
/// List of pagination errors (if any). These are errors specifically related to the pagination of the entry set.
352+
/// <summary>
353+
/// List of pagination errors (if any). These are errors specifically related to the pagination of the entry set.
354354
/// </summary>
355355
public LootLockerExtendedPaginationError[] errors { get; set; }
356356
}

Runtime/Game/Requests/MetadataRequests.cs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
using LootLocker.Requests;
33
using System;
44

5-
#if LOOTLOCKER_USE_NEWTONSOFTJSON
5+
#if LOOTLOCKER_USE_NEWTONSOFTJSON
66
using Newtonsoft.Json.Linq;
77
#else
88
using System.Collections.Generic;
@@ -133,25 +133,25 @@ public bool TryGetValueAsBool(out bool output)
133133
output = false;
134134
return false;
135135
}
136-
}
137-
136+
}
137+
138138
/// <summary>
139139
/// Get the value as the specified type. Returns true if value could be parsed in which case output contains the parsed object, returns false if parsing failed which can happen if the value is not a valid json object string convertible to the specified object.
140140
///</summary>
141141
public bool TryGetValueAsType<T>(out T output)
142142
{
143143
return LootLockerJson.TryDeserializeObject<T>(LootLockerJson.SerializeObject(value), out output);
144-
}
145-
146-
#if LOOTLOCKER_USE_NEWTONSOFTJSON
144+
}
145+
146+
#if LOOTLOCKER_USE_NEWTONSOFTJSON
147147
/// <summary>
148148
/// Get the value as a Json Object. Returns true if value could be parsed in which case output contains the value in Json Object format, returns false if parsing failed which can happen if the value is not a valid json object string.
149149
///</summary>
150150
public bool TryGetValueAsJson(out JObject output)
151151
{
152152
return TryGetValueAsType(out output);
153-
}
154-
153+
}
154+
155155
/// <summary>
156156
/// Get the value as a Json Array. Returns true if value could be parsed in which case output contains the value in Json Array format, returns false if parsing failed which can happen if the value is not a valid json array string.
157157
///</summary>
@@ -161,7 +161,7 @@ public bool TryGetValueAsJsonArray(out JArray output)
161161
return output != null;
162162
}
163163
#else
164-
164+
165165
/// <summary>
166166
/// Get the value as a Json Object (a dictionary of string keys to object values). Returns true if value could be parsed in which case output contains the value in Json Object format, returns false if parsing failed which can happen if the value is not a valid json object string.
167167
///</summary>
@@ -194,7 +194,7 @@ public bool TryGetValueAsBase64(out LootLockerMetadataBase64Value output)
194194
//==================================================
195195
// Response Definitions
196196
//==================================================
197-
/// <summary>
197+
/// <summary>
198198
/// </summary>
199199
public class LootLockerListMetadataResponse : LootLockerResponse
200200
{
@@ -206,9 +206,9 @@ public class LootLockerListMetadataResponse : LootLockerResponse
206206
/// Pagination data for this set of metadata entries
207207
/// </summary>
208208
public LootLockerExtendedPagination pagination { get; set; }
209-
};
210-
211-
/// <summary>
209+
};
210+
211+
/// <summary>
212212
/// </summary>
213213
public class LootLockerGetMetadataResponse : LootLockerResponse
214214
{
@@ -243,10 +243,10 @@ public static void ListMetadata(LootLockerMetadataSources Source, string SourceI
243243
}
244244
if (ignoreFiles) { queryParams += $"ignore_files=true"; } else { queryParams += $"ignore_files=false"; }
245245

246-
if (!string.IsNullOrEmpty(queryParams))
246+
if (!string.IsNullOrEmpty(queryParams))
247247
{
248-
queryParams = $"?{queryParams}";
249-
formattedEndpoint += queryParams;
248+
queryParams = $"?{queryParams}";
249+
formattedEndpoint += queryParams;
250250
}
251251

252252
LootLockerServerRequest.CallAPI(formattedEndpoint, LootLockerEndPoints.listMetadata.httpMethod, onComplete:

0 commit comments

Comments
 (0)