Skip to content

Commit ee6fae2

Browse files
committed
chore: linting
Signed-off-by: Vincent Biret <[email protected]>
1 parent a182f44 commit ee6fae2

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

Diff for: src/Microsoft.OpenApi/IsExternalInit.cs

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//TODO remove this if we ever remove the netstandard2.0 target
2+
#if !NET5_0_OR_GREATER
3+
namespace System.Runtime.CompilerServices {
4+
using System.ComponentModel;
5+
/// <summary>
6+
/// Reserved to be used by the compiler for tracking metadata.
7+
/// This class should not be used by developers in source code.
8+
/// </summary>
9+
[EditorBrowsable(EditorBrowsableState.Never)]
10+
internal static class IsExternalInit {
11+
}
12+
}
13+
#endif

Diff for: src/Microsoft.OpenApi/Models/OpenApiReference.cs

+3-16
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,6 @@
77
using Microsoft.OpenApi.Models.Interfaces;
88
using Microsoft.OpenApi.Writers;
99

10-
#if !NET5_0_OR_GREATER
11-
namespace System.Runtime.CompilerServices {
12-
using System.ComponentModel;
13-
/// <summary>
14-
/// Reserved to be used by the compiler for tracking metadata.
15-
/// This class should not be used by developers in source code.
16-
/// </summary>
17-
[EditorBrowsable(EditorBrowsableState.Never)]
18-
internal static class IsExternalInit {
19-
}
20-
}
21-
#endif
22-
2310
namespace Microsoft.OpenApi.Models
2411
{
2512
/// <summary>
@@ -78,11 +65,11 @@ public class OpenApiReference : IOpenApiSerializable, IOpenApiDescribedElement,
7865
/// </summary>
7966
public bool IsFragment { get; init; }
8067

81-
private OpenApiDocument openApiDocument;
68+
private OpenApiDocument hostDocument;
8269
/// <summary>
8370
/// The OpenApiDocument that is hosting the OpenApiReference instance. This is used to enable dereferencing the reference.
8471
/// </summary>
85-
public OpenApiDocument HostDocument { get => openApiDocument; init => openApiDocument = value; }
72+
public OpenApiDocument HostDocument { get => hostDocument; init => hostDocument = value; }
8673

8774
/// <summary>
8875
/// Gets the full reference string for v3.0.
@@ -301,7 +288,7 @@ private string GetReferenceTypeNameAsV2(ReferenceType type)
301288
internal void EnsureHostDocumentIsSet(OpenApiDocument currentDocument)
302289
{
303290
Utils.CheckArgumentNull(currentDocument);
304-
openApiDocument ??= currentDocument;
291+
hostDocument ??= currentDocument;
305292
}
306293
}
307294
}

0 commit comments

Comments
 (0)