Skip to content

Commit a05f570

Browse files
committed
Removal of C#8 features to get it to work with Unity 2019
1 parent a8d8f09 commit a05f570

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

Runtime/Game/LootLockerGameServerAPI.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -72,17 +72,17 @@ protected override void RefreshTokenAndCompleteCall(LootLockerServerRequest cach
7272
});
7373
}
7474

75-
void CompleteCall(LootLockerServerRequest cacheServerRequest, Action<LootLockerResponse> OnServerResponse, LootLockerSessionResponse response)
75+
void CompleteCall(LootLockerServerRequest newcacheServerRequest, Action<LootLockerResponse> newOnServerResponse, LootLockerSessionResponse response)
7676
{
7777
if (response.success)
7878
{
7979
Dictionary<string, string> headers = new Dictionary<string, string>();
8080
headers.Add("x-session-token", LootLockerConfig.current.token);
81-
cacheServerRequest.extraHeaders = headers;
82-
if (cacheServerRequest.retryCount < 4)
81+
newcacheServerRequest.extraHeaders = headers;
82+
if (newcacheServerRequest.retryCount < 4)
8383
{
84-
SendRequest(cacheServerRequest, OnServerResponse);
85-
cacheServerRequest.retryCount++;
84+
SendRequest(newcacheServerRequest, newOnServerResponse);
85+
newcacheServerRequest.retryCount++;
8686
}
8787
else
8888
{
@@ -91,7 +91,7 @@ void CompleteCall(LootLockerServerRequest cacheServerRequest, Action<LootLockerR
9191
res.statusCode = 401;
9292
res.Error = "Token Expired";
9393
res.hasError = true;
94-
OnServerResponse?.Invoke(res);
94+
newOnServerResponse?.Invoke(res);
9595
}
9696
}
9797
else
@@ -101,7 +101,7 @@ void CompleteCall(LootLockerServerRequest cacheServerRequest, Action<LootLockerR
101101
res.statusCode = 401;
102102
res.Error = "Token Expired";
103103
res.hasError = true;
104-
OnServerResponse?.Invoke(res);
104+
newOnServerResponse?.Invoke(res);
105105
}
106106
}
107107
}

Runtime/Game/Requests/WhiteLabelRequest.cs

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@ public class LootLockerWhiteLabelSignupResponse : LootLockerResponse
3535
public int GameID { get; set; }
3636
public string Email { get; set; }
3737
public string CreatedAt { get; set; }
38-
#nullable enable
39-
public string? UpdatedAt { get; set; }
40-
#nullable enable
41-
public string? DeletedAt { get; set; }
42-
#nullable enable
43-
public string? ValidatedAt { get; set; }
38+
39+
public string UpdatedAt { get; set; }
40+
41+
public string DeletedAt { get; set; }
42+
43+
public string ValidatedAt { get; set; }
4444
}
4545

4646
public class LootLockerWhiteLabelLoginResponse : LootLockerWhiteLabelSignupResponse
4747
{
48-
public string? SessionToken { get; set; }
48+
public string SessionToken { get; set; }
4949
}
5050
}
5151

@@ -70,7 +70,7 @@ public static void WhiteLabelLogin(LootLockerWhiteLabelUserRequest input, Action
7070

7171
LootLockerServerRequest.CallDomainAuthAPI(endPoint.endPoint, endPoint.httpMethod, json, ((serverResponse) =>
7272
{
73-
LootLockerWhiteLabelLoginResponse? response = new LootLockerWhiteLabelLoginResponse();
73+
LootLockerWhiteLabelLoginResponse response = new LootLockerWhiteLabelLoginResponse();
7474
if (string.IsNullOrEmpty(serverResponse.Error) && serverResponse.text != null)
7575
{
7676
DefaultContractResolver contractResolver = new DefaultContractResolver
@@ -115,7 +115,7 @@ public static void WhiteLabelVerifySession(LootLockerWhiteLabelVerifySessionRequ
115115

116116
LootLockerServerRequest.CallDomainAuthAPI(endPoint.endPoint, endPoint.httpMethod, json, ((serverResponse) =>
117117
{
118-
LootLockerWhiteLabelVerifySessionResponse? response = new LootLockerWhiteLabelVerifySessionResponse();
118+
LootLockerWhiteLabelVerifySessionResponse response = new LootLockerWhiteLabelVerifySessionResponse();
119119
if (string.IsNullOrEmpty(serverResponse.Error) && serverResponse.text != null)
120120
{
121121
DefaultContractResolver contractResolver = new DefaultContractResolver
@@ -159,7 +159,7 @@ public static void WhiteLabelSignUp(LootLockerWhiteLabelUserRequest input, Actio
159159

160160
LootLockerServerRequest.CallDomainAuthAPI(endPoint.endPoint, endPoint.httpMethod, json, ((serverResponse) =>
161161
{
162-
LootLockerWhiteLabelSignupResponse? response = new LootLockerWhiteLabelSignupResponse();
162+
LootLockerWhiteLabelSignupResponse response = new LootLockerWhiteLabelSignupResponse();
163163
if (string.IsNullOrEmpty(serverResponse.Error) && serverResponse.text != null)
164164
{
165165
DefaultContractResolver contractResolver = new DefaultContractResolver
@@ -195,7 +195,7 @@ public static void WhiteLabelRequestPasswordReset(string email, Action<LootLocke
195195
var json = JsonConvert.SerializeObject(new { email });
196196
LootLockerServerRequest.CallDomainAuthAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) =>
197197
{
198-
LootLockerResponse? response = new LootLockerResponse
198+
LootLockerResponse response = new LootLockerResponse
199199
{
200200
text = serverResponse.text,
201201
success = serverResponse.success,
@@ -214,7 +214,7 @@ public static void WhiteLabelRequestAccountVerification(int userID, Action<LootL
214214
var json = JsonConvert.SerializeObject(new { user_id = userID });
215215
LootLockerServerRequest.CallDomainAuthAPI(endPoint.endPoint, endPoint.httpMethod, json, (serverResponse) =>
216216
{
217-
LootLockerResponse? response = new LootLockerResponse
217+
LootLockerResponse response = new LootLockerResponse
218218
{
219219
text = serverResponse.text,
220220
success = serverResponse.success,

0 commit comments

Comments
 (0)