Skip to content

Commit e6655cc

Browse files
committed
Update fields to be readonly
1 parent c6168af commit e6655cc

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Microsoft.OpenApi.Readers/V2/OpenApiV2VersionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public OpenApiV2VersionService(OpenApiDiagnostic diagnostic)
3131
Diagnostic = diagnostic;
3232
}
3333

34-
private Dictionary<Type, Func<ParseNode, OpenApiDocument, object>> _loaders = new()
34+
private readonly Dictionary<Type, Func<ParseNode, OpenApiDocument, object>> _loaders = new()
3535
{
3636
[typeof(OpenApiAny)] = OpenApiV2Deserializer.LoadAny,
3737
[typeof(OpenApiContact)] = OpenApiV2Deserializer.LoadContact,

src/Microsoft.OpenApi.Readers/V3/OpenApiV3VersionService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public OpenApiV3VersionService(OpenApiDiagnostic diagnostic)
3434
Diagnostic = diagnostic;
3535
}
3636

37-
private Dictionary<Type, Func<ParseNode, OpenApiDocument, object>> _loaders = new()
37+
private readonly Dictionary<Type, Func<ParseNode, OpenApiDocument, object>> _loaders = new()
3838
{
3939
[typeof(OpenApiAny)] = OpenApiV3Deserializer.LoadAny,
4040
[typeof(OpenApiCallback)] = OpenApiV3Deserializer.LoadCallback,

src/Microsoft.OpenApi/Services/HostDocumentResolver.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Microsoft.OpenApi.Services
88
{
99
internal class HostDocumentResolver : OpenApiVisitorBase
1010
{
11-
private OpenApiDocument _currentDocument;
11+
private readonly OpenApiDocument _currentDocument;
1212

1313
public HostDocumentResolver(OpenApiDocument currentDocument)
1414
{

0 commit comments

Comments
 (0)