change the readonly property as =>
This commit is contained in:
parent
ec19297623
commit
74f41bdd47
|
@ -52,7 +52,7 @@ namespace Microsoft.OpenApi.OData.Edm
|
|||
/// <summary>
|
||||
/// Gets the path kind.
|
||||
/// </summary>
|
||||
public ODataPathKind Kind
|
||||
public virtual ODataPathKind Kind
|
||||
{
|
||||
get
|
||||
{
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class EntityPathItemHandler : EntitySetPathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.Entity;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.Entity;
|
||||
|
||||
/// <inheritdoc/>
|
||||
protected override void SetOperations(OpenApiPathItem item)
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class EntitySetPathItemHandler : PathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.EntitySet;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.EntitySet;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the entity set.
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class NavigationPropertyPathItemHandler : PathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.NavigationProperty;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.NavigationProperty;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the navigation property.
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class OperationImportPathItemHandler : PathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.OperationImport;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.OperationImport;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the operation import.
|
||||
|
|
|
@ -19,7 +19,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class OperationPathItemHandler : PathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.Operation;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.Operation;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the Edm operation.
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
{
|
||||
private IDictionary<ODataPathKind, IPathItemHandler> _handlers = new Dictionary<ODataPathKind, IPathItemHandler>
|
||||
{
|
||||
// Entity
|
||||
// EntitySet
|
||||
{ ODataPathKind.EntitySet, new EntitySetPathItemHandler() },
|
||||
|
||||
// Entity
|
||||
|
|
|
@ -16,7 +16,7 @@ namespace Microsoft.OpenApi.OData.PathItem
|
|||
internal class SingletonPathItemHandler : PathItemHandler
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
protected override ODataPathKind HandleKind { get; } = ODataPathKind.Singleton;
|
||||
protected override ODataPathKind HandleKind => ODataPathKind.Singleton;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the singleton.
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace Microsoft.OpenApi.OData.PathItem.Tests
|
|||
[InlineData(ODataPathKind.NavigationProperty, typeof(NavigationPropertyPathItemHandler))]
|
||||
[InlineData(ODataPathKind.Operation, typeof(OperationPathItemHandler))]
|
||||
[InlineData(ODataPathKind.OperationImport, typeof(OperationImportPathItemHandler))]
|
||||
[InlineData(ODataPathKind.Unknown, null)]
|
||||
public void GetHandlerReturnsCorrectHandlerType(ODataPathKind pathKind, Type handlerType)
|
||||
{
|
||||
// Arrange
|
||||
|
|
Loading…
Reference in a new issue