change the readonly property as =>

This commit is contained in:
Sam Xu 2018-09-20 10:06:29 -07:00
parent ec19297623
commit 74f41bdd47
9 changed files with 9 additions and 8 deletions

View file

@ -52,7 +52,7 @@ namespace Microsoft.OpenApi.OData.Edm
/// <summary>
/// Gets the path kind.
/// </summary>
public ODataPathKind Kind
public virtual ODataPathKind Kind
{
get
{

View file

@ -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)

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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.

View file

@ -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

View file

@ -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.

View file

@ -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