Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<AssemblyOriginatorKeyFile>$(MSBuildThisFileDirectory)restier.snk</AssemblyOriginatorKeyFile>
<StrongNamePublicKey>PublicKey=0024000004800000940000000602000000240000525341310004000001000100f1fcc0061e7ed7476808f86fdecd6a9585915f329fc6312d08331c971da86230330e42ed8ffbd528c523fa023d92c3db1123b5d044b3aad9e04fd3877ffca8e4ba836a740ec3074f0fcbef770ff14d2fa1b5a8403ab16f398ac14998bd011c35505b6bc555326037a7ab7dcca118000a19a5475377358e9dea38df76452b01c9</StrongNamePublicKey>

<LangVersion>11</LangVersion>
<LangVersion>12</LangVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.Restier.AspNet.Shared/Extensions/Extensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
using Microsoft.OData.Edm;
using Microsoft.OData.Edm.Vocabularies;
using Microsoft.OData.Edm.Vocabularies.V1;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.Restier.AspNetCore.Model;
#else
using Microsoft.Restier.AspNet.Model;
#endif
using Microsoft.Restier.Core;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore
#else
namespace Microsoft.Restier.AspNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Restier.Core.Model;
using Microsoft.Restier.Core.Query;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.Restier.AspNetCore.Model;
#else
using Microsoft.Restier.AspNet.Model;
Expand Down Expand Up @@ -51,7 +51,7 @@ public static RestierApiBuilder AddRestierApi<TApi>(this RestierApiBuilder build
builder.Apis.Add(typeof(TApi), (serviceCollection) =>
{

//RWM: Add the API as the specifc API type first, then if an ApiBase instance is requested from the container,
//RWM: Add the API as the specific API type first, then if an ApiBase instance is requested from the container,
// get the existing instance.
serviceCollection
.AddScoped(typeof(TApi), typeof(TApi))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.AspNet.OData.Query;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.OData;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.Restier.AspNetCore;
using Microsoft.Restier.AspNetCore.Formatter;
using Microsoft.Restier.AspNetCore.Model;
Expand All @@ -29,7 +29,7 @@ namespace Microsoft.Extensions.DependencyInjection
/// <summary>
/// A set of <see cref="IServiceCollection"/> extension methods to help register required Restier services for a given Route.
/// </summary>
public static partial class RestierApiServiceCollectionExtensions
public static partial class Restier_IServiceCollectionExtensions
{

#region Internal Members
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.OData.Edm;
using System;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
#if !NETCOREAPP3_1_OR_GREATER
#if !NET6_0_OR_GREATER
using System.Net.Http;
#endif
using Microsoft.AspNet.OData.Formatter;
using Microsoft.AspNet.OData.Formatter.Deserialization;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#endif
using Microsoft.OData.Edm;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down Expand Up @@ -43,7 +43,7 @@ internal static object ConvertValue(
Type expectedReturnType,
IEdmTypeReference propertyType,
IEdmModel model,
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
HttpRequest request,
#else
HttpRequestMessage request,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.OData;
using Microsoft.OData.Edm;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
// Licensed under the MIT License. See License.txt in the project root for license information.

using System;
#if !NETCOREAPP3_1_OR_GREATER
#if !NET6_0_OR_GREATER
using System.Net.Http;
#endif
using Microsoft.AspNet.OData;
using Microsoft.AspNet.OData.Formatter.Serialization;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#endif
using Microsoft.OData;
using Microsoft.OData.Edm;


#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down Expand Up @@ -68,7 +68,7 @@ public DefaultRestierSerializerProvider(IServiceProvider rootContainer)
/// <returns>The serializer instance.</returns>
public override ODataSerializer GetODataPayloadSerializer(
Type type,
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
HttpRequest request)
#else
HttpRequestMessage request)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.AspNet.OData.Formatter.Serialization;
using Microsoft.OData;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.AspNet.OData.Formatter.Serialization;
using Microsoft.OData;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.OData;
using Microsoft.OData.Edm;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using Microsoft.AspNet.OData.Formatter.Serialization;
using Microsoft.OData;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
using System.Threading.Tasks;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Collections.Generic;
using System.Threading.Tasks;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Formatter
#else
namespace Microsoft.Restier.AspNet.Formatter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Restier.AspNet.Shared/Model/EdmHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using Microsoft.AspNet.OData;
using Microsoft.OData.Edm;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.Restier.AspNet.Shared/Model/OperationType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore
#else
namespace Microsoft.Restier.AspNet
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.OData.Edm;
using Microsoft.Restier.Core.Model;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down Expand Up @@ -77,7 +77,7 @@ public IEdmModel GetModel(ModelContext context)
continue;
}

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
if (pair.Value is null)
{
throw new InvalidOperationException($"The entity '{pair.Key}' does not have a key specified. Entities tagged with the [Keyless] attribute " +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
using Microsoft.Restier.Core.Model;
using Microsoft.Restier.Core.Query;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Restier.Core;
using Microsoft.Restier.Core.Model;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
using Microsoft.Restier.Core.Model;
using EdmPathExpression = Microsoft.OData.Edm.EdmPathExpression;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Model
#else
namespace Microsoft.Restier.AspNet.Model
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@

using System;
using System.Collections;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.AspNetCore.Http;
#else
using System.Net.Http;
#endif
using Microsoft.Restier.Core;
using Microsoft.Restier.Core.Operation;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Operation
#else
namespace Microsoft.Restier.AspNet.Operation
Expand Down Expand Up @@ -54,7 +54,7 @@ public RestierOperationContext(
/// <summary>
/// Gets or sets the Request.
/// </summary>
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
public HttpRequest Request { get; set; }
#else
public HttpRequestMessage Request { get; set; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
using System.Threading.Tasks;
using Microsoft.AspNet.OData.Extensions;
using Microsoft.OData.Edm;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.Restier.AspNetCore.Formatter;
using Microsoft.Restier.AspNetCore.Model;
using AspNetResources = Microsoft.Restier.AspNetCore.Resources;
Expand All @@ -26,7 +26,7 @@
using Microsoft.Restier.Core;
using Microsoft.Restier.Core.Operation;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Operation
#else
namespace Microsoft.Restier.AspNet.Operation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
using System.Threading.Tasks;
using Microsoft.OData.Edm;
using Microsoft.OData.UriParser;
#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
using Microsoft.Restier.AspNetCore.Model;
using AspNetResources = Microsoft.Restier.AspNetCore.Resources;
#else
Expand All @@ -19,7 +19,7 @@
using Microsoft.Restier.Core;
using ODataPath = Microsoft.AspNet.OData.Routing.ODataPath;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Query
#else
namespace Microsoft.Restier.AspNet.Query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
using Microsoft.Restier.Core;
using Microsoft.Restier.Core.Query;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Query
#else
namespace Microsoft.Restier.AspNet.Query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

using System;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore.Query
#else
namespace Microsoft.Restier.AspNet.Query
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Microsoft.OData;
using Microsoft.OData.Edm;

#if NETCOREAPP3_1_OR_GREATER
#if NET6_0_OR_GREATER
namespace Microsoft.Restier.AspNetCore
#else
namespace Microsoft.Restier.AspNet
Expand Down
Loading