diff --git a/Lazy.Captcha.Core/CaptchaOptions.cs b/Lazy.Captcha.Core/CaptchaOptions.cs
index fd93a852671819558af8f673eeb118aad20035d7..0d67953a14a85ab27ce12df2ce728612f0caf157 100644
--- a/Lazy.Captcha.Core/CaptchaOptions.cs
+++ b/Lazy.Captcha.Core/CaptchaOptions.cs
@@ -52,7 +52,7 @@ namespace Lazy.Captcha.Core
///
/// 存储键前缀
///
- public virtual string StoreageKeyPrefix { get; set; }
+ public virtual string StorageKeyPrefix { get; set; }
///
/// 图片选项
diff --git a/Lazy.Captcha.Core/CaptchaService.cs b/Lazy.Captcha.Core/CaptchaService.cs
index 607d73d50395a56d5dc5ee0d09cab5bf742defa7..7701ead1175e7b3c870efd3f705d9a0e194a6e09 100644
--- a/Lazy.Captcha.Core/CaptchaService.cs
+++ b/Lazy.Captcha.Core/CaptchaService.cs
@@ -29,7 +29,7 @@ namespace Lazy.Captcha.Core
public virtual CaptchaData Generate(string captchaId, int? expirySeconds = null)
{
var _captchaCodeGenerator = GetCodeGenerator();
- var _captchaImageGenerator = GetImmageGenerator();
+ var _captchaImageGenerator = GetImageGenerator();
var (renderText, code) = _captchaCodeGenerator.Generate(CaptchaOptions.CodeLength);
var image = _captchaImageGenerator.Generate(renderText, CaptchaOptions.ImageOption);
@@ -39,7 +39,7 @@ namespace Lazy.Captcha.Core
return new CaptchaData(captchaId, code, image);
}
- protected virtual ICaptchaImageGenerator GetImmageGenerator()
+ protected virtual ICaptchaImageGenerator GetImageGenerator()
{
return new DefaultCaptchaImageGenerator();
}
diff --git a/Lazy.Captcha.Core/CaptchaServiceBuilder.cs b/Lazy.Captcha.Core/CaptchaServiceBuilder.cs
index 82b610a2dc17484e4a76582ae9a8161987d96190..32a0ad2ee99316845f1ee7f9e88d26dacb904beb 100644
--- a/Lazy.Captcha.Core/CaptchaServiceBuilder.cs
+++ b/Lazy.Captcha.Core/CaptchaServiceBuilder.cs
@@ -97,11 +97,11 @@ namespace Lazy.Captcha.Core
///
/// 存储键前缀
///
- ///
+ ///
///
- public CaptchaServiceBuilder StoreageKeyPrefix(string storeageKeyPrefix)
+ public CaptchaServiceBuilder StorageKeyPrefix(string storageKeyPrefix)
{
- CaptchaOptions.StoreageKeyPrefix = storeageKeyPrefix;
+ CaptchaOptions.StorageKeyPrefix = storageKeyPrefix;
return this;
}
diff --git a/Lazy.Captcha.Core/CaptchaServiceCollectionExtensions.cs b/Lazy.Captcha.Core/CaptchaServiceCollectionExtensions.cs
index b164e63d4c9f37f33dfe9fe871c371a2eaa22d46..24d444d1c23ebaa15bfc274def0bf098cb736a16 100644
--- a/Lazy.Captcha.Core/CaptchaServiceCollectionExtensions.cs
+++ b/Lazy.Captcha.Core/CaptchaServiceCollectionExtensions.cs
@@ -46,10 +46,10 @@ namespace Microsoft.Extensions.DependencyInjection
}
}
- var foregroudColors = configuration?.GetSection("CaptchaOptions:ImageOption:ForegroundColors")?.Value;
- if (!string.IsNullOrWhiteSpace(foregroudColors))
+ var foregroundColors = configuration?.GetSection("CaptchaOptions:ImageOption:ForegroundColors")?.Value;
+ if (!string.IsNullOrWhiteSpace(foregroundColors))
{
- var colors = foregroudColors.Split(',').ToList().Where(e => !string.IsNullOrEmpty(e));
+ var colors = foregroundColors.Split(',').ToList().Where(e => !string.IsNullOrEmpty(e));
foreach (var item in colors)
{
if (SKColor.TryParse(item, out var color))
diff --git a/Lazy.Captcha.Core/Storage/DefaultStorage.cs b/Lazy.Captcha.Core/Storage/DefaultStorage.cs
index f93d0f7bddee62bbe2b69410c2dd0a637e5362eb..32a19aa3a5937add6e9cb68e6ef13f0e1a286561 100644
--- a/Lazy.Captcha.Core/Storage/DefaultStorage.cs
+++ b/Lazy.Captcha.Core/Storage/DefaultStorage.cs
@@ -18,7 +18,7 @@ namespace Lazy.Captcha.Core.Storeage
private string WrapKey(string key)
{
- return $"{this._options.CurrentValue.StoreageKeyPrefix}{key}";
+ return $"{this._options.CurrentValue.StorageKeyPrefix}{key}";
}
public string Get(string key)
diff --git a/Lazy.Captcha.Core/Storage/MemeoryStorage.cs b/Lazy.Captcha.Core/Storage/MemeoryStorage.cs
index 6c84cb704d0e04078bae05ca2e8545a8122c63ca..ed0ca51cbafb3940235dbe5546969f6f93743a8c 100644
--- a/Lazy.Captcha.Core/Storage/MemeoryStorage.cs
+++ b/Lazy.Captcha.Core/Storage/MemeoryStorage.cs
@@ -8,7 +8,7 @@ namespace Lazy.Captcha.Core.Storage
public class MemeoryStorage : IStorage
{
private MemoryCache Cache;
- public string StoreageKeyPrefix { get; set; } = string.Empty;
+ public string StorageKeyPrefix { get; set; } = string.Empty;
public MemeoryStorage()
{
@@ -17,7 +17,7 @@ namespace Lazy.Captcha.Core.Storage
private string WrapKey(string key)
{
- return $"{StoreageKeyPrefix}{key}";
+ return $"{StorageKeyPrefix}{key}";
}
public string Get(string key)
diff --git a/Sample.NetCore/Program.cs b/Sample.NetCore/Program.cs
index c39af57599a5012de53fda599d83bf291241befa..a1145ea605361b1bdc571b8a4245bd69d798bc81 100644
--- a/Sample.NetCore/Program.cs
+++ b/Sample.NetCore/Program.cs
@@ -42,7 +42,7 @@ builder.Services.AddCaptcha(builder.Configuration, options =>
// option.CodeLength = 6; // ֤볤, ҪCaptchaTypeú. Ϊʽʱȴĸ
// option.ExpirySeconds = 30; // ֤ʱ
// option.IgnoreCase = true; // ȽʱǷԴСд
-// option.StoreageKeyPrefix = ""; // 洢ǰ
+// option.StorageKeyPrefix = ""; // 洢ǰ
// option.ImageOption.Animation = true; // Ƿö
// option.ImageOption.FrameDelay = 30; // ÿ֡ӳ,Animation=trueʱЧ, Ĭ30
diff --git a/Sample.NetCore/appsettings.json b/Sample.NetCore/appsettings.json
index 0abe4c1f19779d2ed396c0f92502a6571f2ea25d..126d27078aa5d624f0773ad1d03bf16a83bbe0a9 100644
--- a/Sample.NetCore/appsettings.json
+++ b/Sample.NetCore/appsettings.json
@@ -7,7 +7,7 @@
"CodeLength": 2,
"ExpirySeconds": 60,
"IgnoreCase": true,
- "StoreageKeyPrefix": "",
+ "StorageKeyPrefix": "",
"ImageOption": {
"Animation": false,
"BackgroundColor": null,
diff --git a/Sample.Winfrom/MainForm.cs b/Sample.Winfrom/MainForm.cs
index fea40ab408f60c1a191d25c08a10a71daa0e49d3..74e41af976ecbc87bcb14dcfc7ad089d9386118c 100644
--- a/Sample.Winfrom/MainForm.cs
+++ b/Sample.Winfrom/MainForm.cs
@@ -101,7 +101,7 @@ namespace Sample.Winfrom
CodeLength = (int)this.Length_Nud.Value,
ExpirySeconds = 60,
IgnoreCase = true,
- StoreageKeyPrefix = "",
+ StorageKeyPrefix = "",
ImageOption = new CaptchaImageGeneratorOptionJsonModel
{
Animation = this.Gif_Cbx.Checked,
diff --git a/Sample.Winfrom/Models/CaptchaOptionsJsonModel.cs b/Sample.Winfrom/Models/CaptchaOptionsJsonModel.cs
index b682592a4ece28f9bd3db72f1c945d618423688e..af331589abdbf56bb695fe11733b2ea185b333db 100644
--- a/Sample.Winfrom/Models/CaptchaOptionsJsonModel.cs
+++ b/Sample.Winfrom/Models/CaptchaOptionsJsonModel.cs
@@ -34,7 +34,7 @@ namespace Sample.Winfrom.Models
///
/// 存储键前缀
///
- public string StoreageKeyPrefix { get; set; }
+ public string StorageKeyPrefix { get; set; }
///
/// 图片选项