summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI.Web/Framework')
-rw-r--r--src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs2
-rw-r--r--src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs10
-rw-r--r--src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs2
-rw-r--r--src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs4
-rw-r--r--src/SMAPI.Web/Framework/LogParsing/LogParser.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs6
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs2
-rw-r--r--src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs2
9 files changed, 16 insertions, 16 deletions
diff --git a/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs b/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
index 5dc0feb6..864aa215 100644
--- a/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
+++ b/src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs
@@ -36,7 +36,7 @@ namespace StardewModdingAPI.Web.Framework
}
/// <summary>Called early in the filter pipeline to confirm request is authorized.</summary>
- /// <param name="context">The authorisation filter context.</param>
+ /// <param name="context">The authorization filter context.</param>
public void OnAuthorization(AuthorizationFilterContext context)
{
IFeatureCollection features = context.HttpContext.Features;
diff --git a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
index 4258cc85..2e7804a7 100644
--- a/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
+++ b/src/SMAPI.Web/Framework/Caching/Mods/ModCacheRepository.cs
@@ -40,7 +40,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
public bool TryGetMod(ModRepositoryKey site, string id, out CachedMod mod, bool markRequested = true)
{
// get mod
- id = this.NormaliseId(id);
+ id = this.NormalizeId(id);
mod = this.Mods.Find(entry => entry.ID == id && entry.Site == site).FirstOrDefault();
if (mod == null)
return false;
@@ -62,7 +62,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
/// <param name="cachedMod">The stored mod record.</param>
public void SaveMod(ModRepositoryKey site, string id, ModInfoModel mod, out CachedMod cachedMod)
{
- id = this.NormaliseId(id);
+ id = this.NormalizeId(id);
cachedMod = this.SaveMod(new CachedMod(site, id, mod));
}
@@ -83,7 +83,7 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
/// <param name="mod">The mod data.</param>
public CachedMod SaveMod(CachedMod mod)
{
- string id = this.NormaliseId(mod.ID);
+ string id = this.NormalizeId(mod.ID);
this.Mods.ReplaceOne(
entry => entry.ID == id && entry.Site == mod.Site,
@@ -94,9 +94,9 @@ namespace StardewModdingAPI.Web.Framework.Caching.Mods
return mod;
}
- /// <summary>Normalise a mod ID for case-insensitive search.</summary>
+ /// <summary>Normalize a mod ID for case-insensitive search.</summary>
/// <param name="id">The mod ID.</param>
- public string NormaliseId(string id)
+ public string NormalizeId(string id)
{
return id.Trim().ToLower();
}
diff --git a/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs b/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
index ad95a975..6a103e37 100644
--- a/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
+++ b/src/SMAPI.Web/Framework/Caching/UtcDateTimeOffsetSerializer.cs
@@ -5,7 +5,7 @@ using MongoDB.Bson.Serialization.Serializers;
namespace StardewModdingAPI.Web.Framework.Caching
{
- /// <summary>Serialises <see cref="DateTimeOffset"/> to a UTC date field instead of the default array.</summary>
+ /// <summary>Serializes <see cref="DateTimeOffset"/> to a UTC date field instead of the default array.</summary>
public class UtcDateTimeOffsetSerializer : StructSerializerBase<DateTimeOffset>
{
/*********
diff --git a/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs b/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
index 9471d5fe..385c0c91 100644
--- a/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
+++ b/src/SMAPI.Web/Framework/JobDashboardAuthorizationFilter.cs
@@ -2,7 +2,7 @@ using Hangfire.Dashboard;
namespace StardewModdingAPI.Web.Framework
{
- /// <summary>Authorises requests to access the Hangfire job dashboard.</summary>
+ /// <summary>Authorizes requests to access the Hangfire job dashboard.</summary>
internal class JobDashboardAuthorizationFilter : IDashboardAuthorizationFilter
{
/*********
@@ -15,7 +15,7 @@ namespace StardewModdingAPI.Web.Framework
/*********
** Public methods
*********/
- /// <summary>Authorise a request.</summary>
+ /// <summary>Authorize a request.</summary>
/// <param name="context">The dashboard context.</param>
public bool Authorize(DashboardContext context)
{
diff --git a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
index 595e6b49..66a3687f 100644
--- a/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
+++ b/src/SMAPI.Web/Framework/LogParsing/LogParser.cs
@@ -221,7 +221,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
}
}
- // finalise log
+ // finalize log
gameMod.Version = log.GameVersion;
log.Mods = new[] { gameMod, smapiMod }.Concat(mods.Values.OrderBy(p => p.Name)).ToArray();
return log;
diff --git a/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
index 94256005..f9f9f47d 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/BaseRepository.cs
@@ -34,9 +34,9 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
this.VendorKey = vendorKey;
}
- /// <summary>Normalise a version string.</summary>
- /// <param name="version">The version to normalise.</param>
- protected string NormaliseVersion(string version)
+ /// <summary>Normalize a version string.</summary>
+ /// <param name="version">The version to normalize.</param>
+ protected string NormalizeVersion(string version)
{
if (string.IsNullOrWhiteSpace(version))
return null;
diff --git a/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
index c14fb45d..0945735a 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/ChucklefishRepository.cs
@@ -39,7 +39,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
{
var mod = await this.Client.GetModAsync(realID);
return mod != null
- ? new ModInfoModel(name: mod.Name, version: this.NormaliseVersion(mod.Version), url: mod.Url)
+ ? new ModInfoModel(name: mod.Name, version: this.NormalizeVersion(mod.Version), url: mod.Url)
: new ModInfoModel().SetError(RemoteModStatus.DoesNotExist, "Found no Chucklefish mod with this ID.");
}
catch (Exception ex)
diff --git a/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
index e06a2497..c62cb73f 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/GitHubRepository.cs
@@ -65,7 +65,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
}
// return data
- return result.SetVersions(version: this.NormaliseVersion(latest.Tag), previewVersion: this.NormaliseVersion(preview?.Tag));
+ return result.SetVersions(version: this.NormalizeVersion(latest.Tag), previewVersion: this.NormalizeVersion(preview?.Tag));
}
catch (Exception ex)
{
diff --git a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
index b4791f56..9551258c 100644
--- a/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
+++ b/src/SMAPI.Web/Framework/ModRepositories/NexusRepository.cs
@@ -48,7 +48,7 @@ namespace StardewModdingAPI.Web.Framework.ModRepositories
return new ModInfoModel().SetError(remoteStatus, mod.Error);
}
- return new ModInfoModel(name: mod.Name, version: this.NormaliseVersion(mod.Version), previewVersion: mod.LatestFileVersion?.ToString(), url: mod.Url);
+ return new ModInfoModel(name: mod.Name, version: this.NormalizeVersion(mod.Version), previewVersion: mod.LatestFileVersion?.ToString(), url: mod.Url);
}
catch (Exception ex)
{