Skip to content

Commit 14ac092

Browse files
committed
General cleanup from editorconfig warnings
1 parent 8b5682e commit 14ac092

File tree

5 files changed

+13
-13
lines changed

5 files changed

+13
-13
lines changed

src/Exceptionless.Api/Controllers/AuthController.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ public async Task<IHttpActionResult> LoginAsync(LoginModel model) {
154154
[Route("signup")]
155155
[ResponseType(typeof(TokenResult))]
156156
public async Task<IHttpActionResult> SignupAsync(SignupModel model) {
157-
var valid = await IsAccountCreationEnabledAsync(model?.InviteToken);
157+
bool valid = await IsAccountCreationEnabledAsync(model?.InviteToken);
158158
if (!valid)
159159
return BadRequest("Account Creation is currently disabled.");
160160

@@ -220,7 +220,7 @@ public async Task<IHttpActionResult> SignupAsync(SignupModel model) {
220220
try {
221221
user = await _userRepository.AddAsync(user, true);
222222
} catch (ValidationException ex) {
223-
var errors = String.Join(", ", ex.Errors);
223+
string errors = String.Join(", ", ex.Errors);
224224
_logger.Error().Critical().Message("Signup failed for \"{0}\": {1}", email, errors).Tag("Signup").Identity(user.EmailAddress).Property("User", user).SetActionContext(ActionContext).Write();
225225
return BadRequest(errors);
226226
} catch (Exception ex) {

src/Exceptionless.Core/Extensions/PersistentEventExtensions.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public static void CopyDataToIndex(this PersistentEvent ev, params string[] keys
3636
} else if (dataType == typeof(DateTime) || dataType == typeof(DateTimeOffset)) {
3737
ev.Idx[field + "-d"] = ev.Data[key];
3838
} else if (dataType == typeof(string)) {
39-
var input = (string)ev.Data[key];
39+
string input = (string)ev.Data[key];
4040
if (String.IsNullOrEmpty(input) || input.Length >= 1000)
4141
continue;
4242

@@ -48,8 +48,8 @@ public static void CopyDataToIndex(this PersistentEvent ev, params string[] keys
4848

4949
bool value;
5050
DateTimeOffset dtoValue;
51-
Decimal decValue;
52-
Double dblValue;
51+
decimal decValue;
52+
double dblValue;
5353
if (Boolean.TryParse(input, out value))
5454
ev.Idx[field + "-b"] = value;
5555
else if (DateTimeOffset.TryParse(input, out dtoValue))
@@ -217,13 +217,13 @@ public static IEnumerable<string> GetIpAddresses(this PersistentEvent ev) {
217217

218218
var ri = ev.GetRequestInfo();
219219
if (!String.IsNullOrEmpty(ri?.ClientIpAddress)) {
220-
foreach (var ip in ri.ClientIpAddress.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
220+
foreach (string ip in ri.ClientIpAddress.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
221221
yield return ip.Trim();
222222
}
223223

224224
var ei = ev.GetEnvironmentInfo();
225225
if (!String.IsNullOrEmpty(ei?.IpAddress)) {
226-
foreach (var ip in ei.IpAddress.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
226+
foreach (string ip in ei.IpAddress.Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries))
227227
yield return ip.Trim();
228228
}
229229
}

src/Exceptionless.Core/Repositories/EventRepository.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ public Task<FindResults<PersistentEvent>> GetByReferenceIdAsync(string projectId
136136
}
137137

138138
public async Task<PreviousAndNextEventIdResult> GetPreviousAndNextEventIdsAsync(PersistentEvent ev, IExceptionlessSystemFilterQuery systemFilter, string userFilter, DateTime? utcStart, DateTime? utcEnd) {
139-
var previous = await GetPreviousEventIdAsync(ev, systemFilter, userFilter, utcStart, utcEnd).AnyContext();
140-
var next = await GetNextEventIdAsync(ev, systemFilter, userFilter, utcStart, utcEnd).AnyContext();
139+
string previous = await GetPreviousEventIdAsync(ev, systemFilter, userFilter, utcStart, utcEnd).AnyContext();
140+
string next = await GetNextEventIdAsync(ev, systemFilter, userFilter, utcStart, utcEnd).AnyContext();
141141

142142
return new PreviousAndNextEventIdResult {
143143
Previous = previous,
@@ -187,7 +187,7 @@ private async Task<string> GetPreviousEventIdAsync(PersistentEvent ev, IExceptio
187187
.OrderBy(t => t.Date.UtcTicks).ThenBy(t => t.Id)
188188
.ToList();
189189

190-
var index = unionResults.FindIndex(t => t.Id == ev.Id);
190+
int index = unionResults.FindIndex(t => t.Id == ev.Id);
191191
return index == 0 ? null : unionResults[index - 1].Id;
192192
}
193193

@@ -232,7 +232,7 @@ private async Task<string> GetNextEventIdAsync(PersistentEvent ev, IExceptionles
232232
.OrderBy(t => t.Date.Ticks).ThenBy(t => t.Id)
233233
.ToList();
234234

235-
var index = unionResults.FindIndex(t => t.Id == ev.Id);
235+
int index = unionResults.FindIndex(t => t.Id == ev.Id);
236236
return index == unionResults.Count - 1 ? null : unionResults[index + 1].Id;
237237
}
238238

tests/Exceptionless.Api.Tests/Search/EventIndexTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ public async Task GetByCustomDataAsync(string filter, int count) {
447447

448448
private async Task CreateEventsAsync() {
449449
var parserPluginManager = GetService<EventParserPluginManager>();
450-
foreach (var file in Directory.GetFiles(@"..\..\Search\Data\", "event*.json", SearchOption.AllDirectories)) {
450+
foreach (string file in Directory.GetFiles(@"..\..\Search\Data\", "event*.json", SearchOption.AllDirectories)) {
451451
if (file.EndsWith("summary.json"))
452452
continue;
453453

tests/Exceptionless.Api.Tests/Search/StackIndexTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public async Task GetByDescriptionAsync(string filter, int count) {
174174

175175
private async Task CreateDataAsync() {
176176
var serializer = GetService<JsonSerializer>();
177-
foreach (var file in Directory.GetFiles(@"..\..\Search\Data\", "stack*.json", SearchOption.AllDirectories)) {
177+
foreach (string file in Directory.GetFiles(@"..\..\Search\Data\", "stack*.json", SearchOption.AllDirectories)) {
178178
if (file.EndsWith("summary.json"))
179179
continue;
180180

0 commit comments

Comments
 (0)