Skip to content

Commit 4aca88f

Browse files
committed
修改参数名拼写错误
1 parent 80bf60e commit 4aca88f

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

WebApiClientCore/HttpContents/JsonPatchContent.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,12 @@ public JsonPatchContent()
2525
/// <summary>
2626
/// utf8的JsonPatch内容
2727
/// </summary>
28-
/// <param name="oprations">patch操作项</param>
28+
/// <param name="operations">patch操作项</param>
2929
/// <param name="jsonSerializerOptions">json序列化选项</param>
30-
public JsonPatchContent(IEnumerable<object> oprations, JsonSerializerOptions? jsonSerializerOptions)
30+
public JsonPatchContent(IEnumerable<object> operations, JsonSerializerOptions? jsonSerializerOptions)
3131
: base(MediaType)
3232
{
33-
JsonBufferSerializer.Serialize(this, oprations, jsonSerializerOptions);
33+
JsonBufferSerializer.Serialize(this, operations, jsonSerializerOptions);
3434
}
3535
}
3636
}

WebApiClientCore/Parameters/JsonPatchDocument.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public class JsonPatchDocument : IApiParameter
1717
/// <summary>
1818
/// 操作列表
1919
/// </summary>
20-
private readonly List<object> oprations = new();
20+
private readonly List<object> operations = new();
2121

2222
/// <summary>
2323
/// Add操作
@@ -31,7 +31,7 @@ public void Add(string path, object? value)
3131
{
3232
throw new ArgumentNullException(nameof(path));
3333
}
34-
this.oprations.Add(new { op = "add", path, value });
34+
this.operations.Add(new { op = "add", path, value });
3535
}
3636

3737
/// <summary>
@@ -45,7 +45,7 @@ public void Remove(string path)
4545
{
4646
throw new ArgumentNullException(nameof(path));
4747
}
48-
this.oprations.Add(new { op = "remove", path });
48+
this.operations.Add(new { op = "remove", path });
4949
}
5050

5151
/// <summary>
@@ -60,7 +60,7 @@ public void Replace(string path, object? value)
6060
{
6161
throw new ArgumentNullException(nameof(path));
6262
}
63-
this.oprations.Add(new { op = "replace", path, value });
63+
this.operations.Add(new { op = "replace", path, value });
6464
}
6565

6666
/// <summary>
@@ -76,7 +76,7 @@ public Task OnRequestAsync(ApiParameterContext context)
7676
}
7777

7878
var options = context.HttpContext.HttpApiOptions.JsonSerializeOptions;
79-
context.HttpContext.RequestMessage.Content = new JsonPatchContent(this.oprations, options);
79+
context.HttpContext.RequestMessage.Content = new JsonPatchContent(this.operations, options);
8080

8181
return Task.CompletedTask;
8282
}
@@ -95,7 +95,7 @@ private class DebugView
9595
/// 查看的内容
9696
/// </summary>
9797
[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
98-
public List<object> Oprations => this.target.oprations;
98+
public List<object> Oprations => this.target.operations;
9999

100100
/// <summary>
101101
/// 调试视图

0 commit comments

Comments
 (0)