Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/aspnetwebstack.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Runtime.sln46
-rw-r--r--src/Common/CommonWebApiResources.Designer.cs (renamed from src/System.Web.Http.Common/Properties/SRResources.Designer.cs)16
-rw-r--r--src/Common/CommonWebApiResources.resx (renamed from src/System.Web.Http.Common/Properties/SRResources.resx)2
-rw-r--r--src/Common/Error.cs (renamed from src/System.Web.Http.Common/Error.cs)62
-rw-r--r--src/Common/HttpMethodHelper.cs (renamed from src/System.Web.Http.Common/HttpMethodHelper.cs)6
-rw-r--r--src/Common/TaskHelpers.cs (renamed from src/System.Web.Http.Common/TaskHelpers.cs)0
-rw-r--r--src/Common/TaskHelpersExtensions.cs (renamed from src/System.Web.Http.Common/TaskHelpersExtensions.cs)0
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/DbContextExtensions.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/DbDataController.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/Metadata/DbMetadataProviderAttribute.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesMetadataProviderAttribute.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesTypeDescriptionContext.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/Metadata/MetadataWorkspaceUtilities.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/Microsoft.Web.Http.Data.EntityFramework.csproj22
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextExtensions.cs2
-rw-r--r--src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextUtilities.cs2
-rw-r--r--src/Microsoft.Web.Http.Data/ChangeSet.cs2
-rw-r--r--src/Microsoft.Web.Http.Data/DataController.cs1
-rw-r--r--src/Microsoft.Web.Http.Data/DataControllerDescription.cs1
-rw-r--r--src/Microsoft.Web.Http.Data/Metadata/DataControllerTypeDescriptionProvider.cs2
-rw-r--r--src/Microsoft.Web.Http.Data/Metadata/MetadataProvider.cs2
-rw-r--r--src/Microsoft.Web.Http.Data/Metadata/MetadataProviderAttribute.cs2
-rw-r--r--src/Microsoft.Web.Http.Data/Microsoft.Web.Http.Data.csproj30
-rw-r--r--src/Microsoft.Web.Http.Data/QueryFilterAttribute.cs1
-rw-r--r--src/Microsoft.Web.Http.Data/ValidationResultInfo.cs2
-rw-r--r--src/System.Net.Http.Formatting/HttpMessageContent.cs3
-rw-r--r--src/System.Net.Http.Formatting/HttpRequestMessageExtensions.cs (renamed from src/System.Web.Http.Common/HttpRequestMessageCommonExtensions.cs)10
-rw-r--r--src/System.Net.Http.Formatting/Internal/TaskExtensions.cs547
-rw-r--r--src/System.Net.Http.Formatting/Internal/TaskHelpers.cs384
-rw-r--r--src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs2
-rw-r--r--src/System.Net.Http.Formatting/Properties/Resources.Designer.cs9
-rw-r--r--src/System.Net.Http.Formatting/Properties/Resources.resx4
-rw-r--r--src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj27
-rw-r--r--src/System.Web.Http.Common/GlobalSuppressions.cs5
-rw-r--r--src/System.Web.Http.Common/Properties/AssemblyInfo.cs16
-rw-r--r--src/System.Web.Http.Common/System.Web.Http.Common.csproj93
-rw-r--r--src/System.Web.Http.Common/packages.config4
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpBinding.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpBindingSecurityModeHelper.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpMessage.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpMessageEncoderFactory.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingBindingElement.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingRequestContext.cs1
-rw-r--r--src/System.Web.Http.SelfHost/Channels/HttpMessageExtensions.cs1
-rw-r--r--src/System.Web.Http.SelfHost/HttpSelfHostConfiguration.cs1
-rw-r--r--src/System.Web.Http.SelfHost/HttpSelfHostServer.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/Channels/AsyncResult.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferManagerOutputStream.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferedOutputStream.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/Channels/InternalBufferManager.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/Channels/LayeredChannelListener.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/HostNameComparisonModeHelper.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/HttpTransportSecurityExtensionMethods.cs1
-rw-r--r--src/System.Web.Http.SelfHost/ServiceModel/TransferModeHelper.cs1
-rw-r--r--src/System.Web.Http.SelfHost/System.Web.Http.SelfHost.csproj33
-rw-r--r--src/System.Web.Http.WebHost/HttpControllerHandler.cs1
-rw-r--r--src/System.Web.Http.WebHost/RouteCollectionExtensions.cs1
-rw-r--r--src/System.Web.Http.WebHost/Routing/HostedHttpRoute.cs1
-rw-r--r--src/System.Web.Http.WebHost/Routing/HostedHttpRouteCollection.cs1
-rw-r--r--src/System.Web.Http.WebHost/Routing/HostedHttpRouteData.cs1
-rw-r--r--src/System.Web.Http.WebHost/Routing/HostedHttpVirtualPathData.cs3
-rw-r--r--src/System.Web.Http.WebHost/Routing/HttpRouteDataExtensions.cs3
-rw-r--r--src/System.Web.Http.WebHost/Routing/HttpRouteExtensions.cs3
-rw-r--r--src/System.Web.Http.WebHost/System.Web.Http.WebHost.csproj31
-rw-r--r--src/System.Web.Http.WebHost/TaskWrapperAsyncResult.cs1
-rw-r--r--src/System.Web.Http/AcceptVerbsAttribute.cs1
-rw-r--r--src/System.Web.Http/ApiController.cs1
-rw-r--r--src/System.Web.Http/AuthorizeAttribute.cs1
-rw-r--r--src/System.Web.Http/Controllers/ApiControllerActionInvoker.cs1
-rw-r--r--src/System.Web.Http/Controllers/ApiControllerActionSelector.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpActionContext.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpActionContextExtensions.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpActionDescriptor.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpControllerContext.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpControllerDescriptor.cs1
-rw-r--r--src/System.Web.Http/Controllers/HttpParameterDescriptor.cs1
-rw-r--r--src/System.Web.Http/Controllers/ReflectedHttpActionDescriptor.cs1
-rw-r--r--src/System.Web.Http/Controllers/ReflectedHttpParameterDescriptor.cs1
-rw-r--r--src/System.Web.Http/DependencyResolverExtensions.cs1
-rw-r--r--src/System.Web.Http/Description/ApiExplorer.cs1
-rw-r--r--src/System.Web.Http/DictionaryExtensions.cs1
-rw-r--r--src/System.Web.Http/Dispatcher/DefaultHttpControllerActivator.cs1
-rw-r--r--src/System.Web.Http/Dispatcher/DefaultHttpControllerFactory.cs1
-rw-r--r--src/System.Web.Http/Dispatcher/HttpControllerDispatcher.cs1
-rw-r--r--src/System.Web.Http/Dispatcher/HttpControllerTypeCache.cs1
-rw-r--r--src/System.Web.Http/Dispatcher/HttpControllerTypeCacheUtil.cs1
-rw-r--r--src/System.Web.Http/Filters/ActionDescriptorFilterProvider.cs1
-rw-r--r--src/System.Web.Http/Filters/ActionFilterAttribute.cs1
-rw-r--r--src/System.Web.Http/Filters/AuthorizationFilterAttribute.cs1
-rw-r--r--src/System.Web.Http/Filters/ConfigurationFilterProvider.cs1
-rw-r--r--src/System.Web.Http/Filters/EnumerableEvaluatorFilter.cs1
-rw-r--r--src/System.Web.Http/Filters/EnumerableEvaluatorFilterProvider.cs1
-rw-r--r--src/System.Web.Http/Filters/ExceptionFilterAttribute.cs1
-rw-r--r--src/System.Web.Http/Filters/FilterInfo.cs4
-rw-r--r--src/System.Web.Http/Filters/HttpActionExecutedContext.cs1
-rw-r--r--src/System.Web.Http/Filters/HttpFilterCollection.cs1
-rw-r--r--src/System.Web.Http/Filters/QueryCompositionFilterAttribute.cs1
-rw-r--r--src/System.Web.Http/Hosting/HttpPipelineFactory.cs1
-rw-r--r--src/System.Web.Http/HttpConfiguration.cs1
-rw-r--r--src/System.Web.Http/HttpRequestMessageExtensions.cs1
-rw-r--r--src/System.Web.Http/HttpResponseException.cs1
-rw-r--r--src/System.Web.Http/HttpResponseMessageExtensions.cs1
-rw-r--r--src/System.Web.Http/HttpRouteCollection.cs1
-rw-r--r--src/System.Web.Http/HttpRouteCollectionExtensions.cs1
-rw-r--r--src/System.Web.Http/HttpServer.cs1
-rw-r--r--src/System.Web.Http/Internal/HttpActionContextExtensions.cs3
-rw-r--r--src/System.Web.Http/Internal/MemberInfoExtensions.cs1
-rw-r--r--src/System.Web.Http/Internal/ParameterInfoExtensions.cs1
-rw-r--r--src/System.Web.Http/Internal/TypeHelper.cs1
-rw-r--r--src/System.Web.Http/Metadata/ModelMetadata.cs1
-rw-r--r--src/System.Web.Http/Metadata/Providers/AssociatedMetadataProvider.cs1
-rw-r--r--src/System.Web.Http/Metadata/Providers/CachedDataAnnotationsModelMetadata.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/ComplexModelDto.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/ComplexModelDtoResult.cs3
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/CompositeModelBinder.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/CompositeModelBinderProvider.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/GenericModelBinderProvider.cs3
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/MutableObjectModelBinder.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/Binders/SimpleModelBinderProvider.cs3
-rw-r--r--src/System.Web.Http/ModelBinding/DefaultActionValueBinder.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ErrorParameterBinding.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/FormDataCollectionExtensions.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/FormatterParameterBinding.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/HttpParameterBinding.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelBinderAttribute.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelBinderConfig.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelBinderParameterBinding.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelBindingContext.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelBindingHelper.cs1
-rw-r--r--src/System.Web.Http/ModelBinding/ModelError.cs4
-rw-r--r--src/System.Web.Http/ModelBinding/ModelStateDictionary.cs1
-rw-r--r--src/System.Web.Http/Query/DynamicQueryable.cs1
-rw-r--r--src/System.Web.Http/Query/ODataQueryDeserializer.cs1
-rw-r--r--src/System.Web.Http/Query/QueryValidator.cs1
-rw-r--r--src/System.Web.Http/Query/ServiceQueryPart.cs3
-rw-r--r--src/System.Web.Http/ResultLimitAttribute.cs1
-rw-r--r--src/System.Web.Http/RouteParameter.cs (renamed from src/System.Web.Http.Common/RouteParameter.cs)0
-rw-r--r--src/System.Web.Http/Routing/HttpMethodConstraint.cs1
-rw-r--r--src/System.Web.Http/Routing/HttpRoute.cs1
-rw-r--r--src/System.Web.Http/Routing/HttpRouteData.cs1
-rw-r--r--src/System.Web.Http/Routing/HttpRouteParser.cs1
-rw-r--r--src/System.Web.Http/Routing/HttpRouteValueDictionary.cs1
-rw-r--r--src/System.Web.Http/Routing/HttpVirtualPathData.cs4
-rw-r--r--src/System.Web.Http/Routing/UrlHelper.cs1
-rw-r--r--src/System.Web.Http/Services/DefaultServiceResolver.cs1
-rw-r--r--src/System.Web.Http/Services/DependencyResolver.cs1
-rw-r--r--src/System.Web.Http/System.Web.Http.csproj32
-rw-r--r--src/System.Web.Http/Tracing/FormattingUtilities.cs1
-rw-r--r--src/System.Web.Http/Tracing/ITraceWriterExtensions.cs30
-rw-r--r--src/System.Web.Http/Tracing/Tracers/ActionFilterAttributeTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/BufferedMediaTypeFormatterTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/ContentNegotiatorTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/FormatterParameterBindingTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpActionBindingTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpActionDescriptorTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpActionInvokerTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpActionSelectorTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpControllerFactoryTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/HttpParameterBindingTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/MediaTypeFormatterTracer.cs1
-rw-r--r--src/System.Web.Http/Tracing/Tracers/RequestMessageHandlerTracer.cs1
-rw-r--r--src/System.Web.Http/Validation/DefaultBodyModelValidator.cs1
-rw-r--r--src/System.Web.Http/Validation/ModelStateFormatterLogger.cs1
-rw-r--r--src/System.Web.Http/Validation/ModelValidatedEventArgs.cs3
-rw-r--r--src/System.Web.Http/Validation/ModelValidatingEventArgs.cs1
-rw-r--r--src/System.Web.Http/Validation/ModelValidationNode.cs1
-rw-r--r--src/System.Web.Http/Validation/ModelValidationRequiredMemberSelector.cs1
-rw-r--r--src/System.Web.Http/Validation/ModelValidator.cs1
-rw-r--r--src/System.Web.Http/Validation/Providers/AssociatedValidatorProvider.cs1
-rw-r--r--src/System.Web.Http/Validation/Providers/ClientDataTypeModelValidatorProvider.cs1
-rw-r--r--src/System.Web.Http/Validation/Providers/DataAnnotationsModelValidatorProvider.cs1
-rw-r--r--src/System.Web.Http/Validation/Validators/DataAnnotationsModelValidator.cs1
-rw-r--r--src/System.Web.Http/Validation/Validators/RequiredMemberModelValidator.cs1
-rw-r--r--src/System.Web.Http/Validation/Validators/ValidatableObjectAdapter.cs1
-rw-r--r--src/System.Web.Http/ValueProviders/Providers/CompositeValueProvider.cs1
-rw-r--r--src/System.Web.Http/ValueProviders/Providers/NameValueCollectionValueProvider.cs1
-rw-r--r--src/System.Web.Http/ValueProviders/ValueProviderAttribute.cs1
-rw-r--r--src/System.Web.Http/ValueProviders/ValueProviderResult.cs1
-rw-r--r--src/System.Web.Mvc/System.Web.Mvc.csproj8
-rw-r--r--test/System.Net.Http.Formatting.Test.Unit/HttpClientExtensionsTest.cs2
-rw-r--r--test/System.Net.Http.Formatting.Test.Unit/HttpRequestMessageCommonExtensionsTest.cs (renamed from test/System.Web.Http.Common.Test/HttpRequestMessageCommonExtensionsTest.cs)14
-rw-r--r--test/System.Net.Http.Formatting.Test.Unit/System.Net.Http.Formatting.Test.Unit.csproj1
-rw-r--r--test/System.Web.Http.Common.Test/System.Web.Http.Common.Test.csproj82
-rw-r--r--test/System.Web.Http.Common.Test/packages.config7
-rw-r--r--test/System.Web.Http.Integration.Test/Controllers/CustomControllerFactoryTest.cs1
-rw-r--r--test/System.Web.Http.Integration.Test/Controllers/Helpers/ApiControllerHelper.cs1
-rw-r--r--test/System.Web.Http.Integration.Test/ModelBinding/ModelBindingTests.cs1
-rw-r--r--test/System.Web.Http.Integration.Test/System.Web.Http.Integration.Test.csproj4
-rw-r--r--test/System.Web.Http.Test/Common/ErrorTests.cs (renamed from test/System.Web.Http.Common.Test/ErrorTests.cs)2
-rw-r--r--test/System.Web.Http.Test/Common/TaskHelpersExtensionsTest.cs (renamed from test/System.Web.Http.Common.Test/TaskHelpersExtensionsTest.cs)0
-rw-r--r--test/System.Web.Http.Test/Common/TaskHelpersTest.cs (renamed from test/System.Web.Http.Common.Test/TaskHelpersTest.cs)0
-rw-r--r--test/System.Web.Http.Test/System.Web.Http.Test.csproj7
192 files changed, 258 insertions, 1478 deletions
diff --git a/Runtime.sln b/Runtime.sln
index dc7b795c..8eead3b4 100644
--- a/Runtime.sln
+++ b/Runtime.sln
@@ -67,12 +67,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Json.Test.Integratio
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Net.Http.Formatting.Test.Integration", "test\System.Net.Http.Formatting.Test.Integration\System.Net.Http.Formatting.Test.Integration.csproj", "{6C18CC83-1E4C-42D2-B93E-55D6C363850C}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.Common", "src\System.Web.Http.Common\System.Web.Http.Common.csproj", "{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.SelfHost", "src\System.Web.Http.SelfHost\System.Web.Http.SelfHost.csproj", "{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.Common.Test", "test\System.Web.Http.Common.Test\System.Web.Http.Common.Test.csproj", "{7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}"
-EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Web.Http.WebHost", "src\System.Web.Http.WebHost\System.Web.Http.WebHost.csproj", "{A0187BC2-8325-4BB2-8697-7F955CF4173E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Microsoft.Web.Http.Data", "src\Microsoft.Web.Http.Data\Microsoft.Web.Http.Data.csproj", "{ACE91549-D86E-4EB6-8C2A-5FF51386BB68}"
@@ -736,26 +732,6 @@ Global
{6C18CC83-1E4C-42D2-B93E-55D6C363850C}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{6C18CC83-1E4C-42D2-B93E-55D6C363850C}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{6C18CC83-1E4C-42D2-B93E-55D6C363850C}.Release|x86.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCov|Any CPU.ActiveCfg = CodeCoverage|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCov|Any CPU.Build.0 = CodeCoverage|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCov|Mixed Platforms.ActiveCfg = CodeCoverage|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCov|Mixed Platforms.Build.0 = CodeCoverage|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCov|x86.ActiveCfg = CodeCoverage|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCoverage|Any CPU.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCoverage|Any CPU.Build.0 = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCoverage|Mixed Platforms.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCoverage|Mixed Platforms.Build.0 = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.CodeCoverage|x86.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Debug|x86.ActiveCfg = Debug|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Release|Any CPU.Build.0 = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}.Release|x86.ActiveCfg = Release|Any CPU
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.CodeCov|Any CPU.ActiveCfg = CodeCoverage|Any CPU
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.CodeCov|Any CPU.Build.0 = CodeCoverage|Any CPU
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.CodeCov|Mixed Platforms.ActiveCfg = CodeCoverage|Any CPU
@@ -776,26 +752,6 @@ Global
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}.Release|x86.ActiveCfg = Release|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCov|Any CPU.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCov|Any CPU.Build.0 = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCov|Mixed Platforms.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCov|Mixed Platforms.Build.0 = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCov|x86.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCoverage|Any CPU.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCoverage|Any CPU.Build.0 = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCoverage|Mixed Platforms.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCoverage|Mixed Platforms.Build.0 = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.CodeCoverage|x86.ActiveCfg = CodeCoverage|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Debug|x86.ActiveCfg = Debug|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Release|Any CPU.Build.0 = Release|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Release|Mixed Platforms.Build.0 = Release|Any CPU
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}.Release|x86.ActiveCfg = Release|Any CPU
{A0187BC2-8325-4BB2-8697-7F955CF4173E}.CodeCov|Any CPU.ActiveCfg = CodeCoverage|Any CPU
{A0187BC2-8325-4BB2-8697-7F955CF4173E}.CodeCov|Any CPU.Build.0 = CodeCoverage|Any CPU
{A0187BC2-8325-4BB2-8697-7F955CF4173E}.CodeCov|Mixed Platforms.ActiveCfg = CodeCoverage|Any CPU
@@ -1055,7 +1011,6 @@ Global
{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
{F0441BE9-BDC0-4629-BE5A-8765FFAA2481} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
{668E9021-CE84-49D9-98FB-DF125A9FCDB0} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
- {03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
{A0187BC2-8325-4BB2-8697-7F955CF4173E} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
{ACE91549-D86E-4EB6-8C2A-5FF51386BB68} = {A9836F9E-6DB3-4D9F-ADCA-CF42D8C8BA93}
@@ -1080,7 +1035,6 @@ Global
{7AF77741-9158-4D5F-8782-8F21FADF025F} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
{A7B1264E-BCE5-42A8-8B5E-001A5360B128} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
{6C18CC83-1E4C-42D2-B93E-55D6C363850C} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
- {7FB5C0C0-5223-4C79-A8DA-D2A0F264A478} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
{81876811-6C36-492A-9609-F0E85990FBC9} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
{3267DFC6-B34D-4011-BC0F-D3B56AF6F608} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
{EA62944F-BD25-4730-9405-9BE8FF5BEACD} = {C40883CD-366D-4534-8B58-3EA0D13136DF}
diff --git a/src/System.Web.Http.Common/Properties/SRResources.Designer.cs b/src/Common/CommonWebApiResources.Designer.cs
index aa80e9ba..7432aca3 100644
--- a/src/System.Web.Http.Common/Properties/SRResources.Designer.cs
+++ b/src/Common/CommonWebApiResources.Designer.cs
@@ -8,8 +8,9 @@
// </auto-generated>
//------------------------------------------------------------------------------
-namespace System.Web.Http.Common.Properties {
+namespace System.Web.Http.Properties {
using System;
+ using System.Linq;
/// <summary>
@@ -22,14 +23,14 @@ namespace System.Web.Http.Common.Properties {
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class SRResources {
+ internal class CommonWebApiResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal SRResources() {
+ internal CommonWebApiResources() {
}
/// <summary>
@@ -39,7 +40,14 @@ namespace System.Web.Http.Common.Properties {
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("System.Web.Http.Common.Properties.SRResources", typeof(SRResources).Assembly);
+ // Find the CommonResources.resources file's full resource name in this assembly
+ string commonResourcesName = global::System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceNames().Where(s => s.EndsWith("CommonWebApiResources.resources", StringComparison.OrdinalIgnoreCase)).Single();
+
+ // Trim off the ".resources"
+ commonResourcesName = commonResourcesName.Substring(0, commonResourcesName.Length - 10);
+
+ // Load the resource manager
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager(commonResourcesName, typeof(CommonWebApiResources).Assembly);
resourceMan = temp;
}
return resourceMan;
diff --git a/src/System.Web.Http.Common/Properties/SRResources.resx b/src/Common/CommonWebApiResources.resx
index 56bafe7c..150cd726 100644
--- a/src/System.Web.Http.Common/Properties/SRResources.resx
+++ b/src/Common/CommonWebApiResources.resx
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
diff --git a/src/System.Web.Http.Common/Error.cs b/src/Common/Error.cs
index 1fdbbafc..1d01295b 100644
--- a/src/System.Web.Http.Common/Error.cs
+++ b/src/Common/Error.cs
@@ -2,15 +2,15 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
-using System.Web.Http.Common.Properties;
+using System.Web.Http.Properties;
-namespace System.Web.Http.Common
+namespace System.Web.Http
{
/// <summary>
/// Utility class for creating and unwrapping <see cref="Exception"/> instances.
/// </summary>
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Error", Justification = "This usage is okay.")]
- public static class Error
+ internal static class Error
{
/// <summary>
/// Formats the specified resource string using <see cref="M:CultureInfo.CurrentCulture"/>.
@@ -19,7 +19,7 @@ namespace System.Web.Http.Common
/// <param name="args">An object array that contains zero or more objects to format.</param>
/// <returns>The formatted string.</returns>
[SuppressMessage("Microsoft.Naming", "CA1719:ParameterNamesShouldNotMatchMemberNames", MessageId = "0#", Justification = "Standard String.Format pattern and names.")]
- public static string Format(string format, params object[] args)
+ internal static string Format(string format, params object[] args)
{
return String.Format(CultureInfo.CurrentCulture, format, args);
}
@@ -30,7 +30,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException Argument(string messageFormat, params object[] messageArgs)
+ internal static ArgumentException Argument(string messageFormat, params object[] messageArgs)
{
return new ArgumentException(Error.Format(messageFormat, messageArgs));
}
@@ -42,7 +42,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException Argument(string parameterName, string messageFormat, params object[] messageArgs)
+ internal static ArgumentException Argument(string parameterName, string messageFormat, params object[] messageArgs)
{
return new ArgumentException(Error.Format(messageFormat, messageArgs), parameterName);
}
@@ -53,9 +53,9 @@ namespace System.Web.Http.Common
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException ArgumentUriNotHttpOrHttpsScheme(string parameterName, Uri actualValue)
+ internal static ArgumentException ArgumentUriNotHttpOrHttpsScheme(string parameterName, Uri actualValue)
{
- return new ArgumentException(Error.Format(SRResources.ArgumentInvalidHttpUriScheme, actualValue, Uri.UriSchemeHttp, Uri.UriSchemeHttps), parameterName);
+ return new ArgumentException(Error.Format(CommonWebApiResources.ArgumentInvalidHttpUriScheme, actualValue, Uri.UriSchemeHttp, Uri.UriSchemeHttps), parameterName);
}
/// <summary>
@@ -64,9 +64,9 @@ namespace System.Web.Http.Common
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException ArgumentUriNotAbsolute(string parameterName, Uri actualValue)
+ internal static ArgumentException ArgumentUriNotAbsolute(string parameterName, Uri actualValue)
{
- return new ArgumentException(Error.Format(SRResources.ArgumentInvalidAbsoluteUri, actualValue), parameterName);
+ return new ArgumentException(Error.Format(CommonWebApiResources.ArgumentInvalidAbsoluteUri, actualValue), parameterName);
}
/// <summary>
@@ -76,9 +76,9 @@ namespace System.Web.Http.Common
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException ArgumentUriHasQueryOrFragment(string parameterName, Uri actualValue)
+ internal static ArgumentException ArgumentUriHasQueryOrFragment(string parameterName, Uri actualValue)
{
- return new ArgumentException(Error.Format(SRResources.ArgumentUriHasQueryOrFragment, actualValue), parameterName);
+ return new ArgumentException(Error.Format(CommonWebApiResources.ArgumentUriHasQueryOrFragment, actualValue), parameterName);
}
/// <summary>
@@ -86,7 +86,7 @@ namespace System.Web.Http.Common
/// </summary>
/// <returns>The logged <see cref="Exception"/>.</returns>
[SuppressMessage("Microsoft.Usage", "CA2208:InstantiateArgumentExceptionsCorrectly", Justification = "The purpose of this API is to return an error for properties")]
- public static ArgumentNullException PropertyNull()
+ internal static ArgumentNullException PropertyNull()
{
return new ArgumentNullException("value");
}
@@ -96,7 +96,7 @@ namespace System.Web.Http.Common
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentNullException ArgumentNull(string parameterName)
+ internal static ArgumentNullException ArgumentNull(string parameterName)
{
return new ArgumentNullException(parameterName);
}
@@ -108,7 +108,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentNullException ArgumentNull(string parameterName, string messageFormat, params object[] messageArgs)
+ internal static ArgumentNullException ArgumentNull(string parameterName, string messageFormat, params object[] messageArgs)
{
return new ArgumentNullException(parameterName, Error.Format(messageFormat, messageArgs));
}
@@ -118,9 +118,9 @@ namespace System.Web.Http.Common
/// </summary>
/// <param name="parameterName">The name of the parameter that caused the current exception.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentException ArgumentNullOrEmpty(string parameterName)
+ internal static ArgumentException ArgumentNullOrEmpty(string parameterName)
{
- return Error.Argument(parameterName, SRResources.ArgumentNullOrEmpty, parameterName);
+ return Error.Argument(parameterName, CommonWebApiResources.ArgumentNullOrEmpty, parameterName);
}
/// <summary>
@@ -131,7 +131,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentOutOfRangeException ArgumentOutOfRange(string parameterName, object actualValue, string messageFormat, params object[] messageArgs)
+ internal static ArgumentOutOfRangeException ArgumentOutOfRange(string parameterName, object actualValue, string messageFormat, params object[] messageArgs)
{
return new ArgumentOutOfRangeException(parameterName, actualValue, Error.Format(messageFormat, messageArgs));
}
@@ -143,9 +143,9 @@ namespace System.Web.Http.Common
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <param name="minValue">The minimum size of the argument.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentOutOfRangeException ArgumentGreaterThanOrEqualTo(string parameterName, object actualValue, object minValue)
+ internal static ArgumentOutOfRangeException ArgumentGreaterThanOrEqualTo(string parameterName, object actualValue, object minValue)
{
- return new ArgumentOutOfRangeException(parameterName, actualValue, Error.Format(SRResources.ArgumentMustBeGreaterThanOrEqualTo, minValue));
+ return new ArgumentOutOfRangeException(parameterName, actualValue, Error.Format(CommonWebApiResources.ArgumentMustBeGreaterThanOrEqualTo, minValue));
}
/// <summary>
@@ -155,16 +155,16 @@ namespace System.Web.Http.Common
/// <param name="actualValue">The value of the argument that causes this exception.</param>
/// <param name="maxValue">The maximum size of the argument.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ArgumentOutOfRangeException ArgumentMustBeLessThanOrEqualTo(string parameterName, object actualValue, object maxValue)
+ internal static ArgumentOutOfRangeException ArgumentMustBeLessThanOrEqualTo(string parameterName, object actualValue, object maxValue)
{
- return new ArgumentOutOfRangeException(parameterName, actualValue, Error.Format(SRResources.ArgumentMustBeLessThanOrEqualTo, maxValue));
+ return new ArgumentOutOfRangeException(parameterName, actualValue, Error.Format(CommonWebApiResources.ArgumentMustBeLessThanOrEqualTo, maxValue));
}
/// <summary>
/// Creates an <see cref="KeyNotFoundException"/> with a message saying that the key was not found.
/// </summary>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static KeyNotFoundException KeyNotFound()
+ internal static KeyNotFoundException KeyNotFound()
{
return new KeyNotFoundException();
}
@@ -175,7 +175,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static KeyNotFoundException KeyNotFound(string messageFormat, params object[] messageArgs)
+ internal static KeyNotFoundException KeyNotFound(string messageFormat, params object[] messageArgs)
{
return new KeyNotFoundException(Error.Format(messageFormat, messageArgs));
}
@@ -186,7 +186,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static ObjectDisposedException ObjectDisposed(string messageFormat, params object[] messageArgs)
+ internal static ObjectDisposedException ObjectDisposed(string messageFormat, params object[] messageArgs)
{
// Pass in null, not disposedObject.GetType().FullName as per the above guideline
return new ObjectDisposedException(null, Error.Format(messageFormat, messageArgs));
@@ -196,7 +196,7 @@ namespace System.Web.Http.Common
/// Creates an <see cref="OperationCanceledException"/> initialized with the provided parameters.
/// </summary>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static OperationCanceledException OperationCanceled()
+ internal static OperationCanceledException OperationCanceled()
{
return new OperationCanceledException();
}
@@ -207,7 +207,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static OperationCanceledException OperationCanceled(string messageFormat, params object[] messageArgs)
+ internal static OperationCanceledException OperationCanceled(string messageFormat, params object[] messageArgs)
{
return new OperationCanceledException(Error.Format(messageFormat, messageArgs));
}
@@ -219,7 +219,7 @@ namespace System.Web.Http.Common
/// <param name="invalidValue">The value of the argument that failed.</param>
/// <param name="enumClass">A <see cref="Type"/> that represents the enumeration class with the valid values.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static InvalidEnumArgumentException InvalidEnumArgument(string parameterName, int invalidValue, Type enumClass)
+ internal static InvalidEnumArgumentException InvalidEnumArgument(string parameterName, int invalidValue, Type enumClass)
{
return new InvalidEnumArgumentException(parameterName, invalidValue, enumClass);
}
@@ -230,7 +230,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static InvalidOperationException InvalidOperation(string messageFormat, params object[] messageArgs)
+ internal static InvalidOperationException InvalidOperation(string messageFormat, params object[] messageArgs)
{
return new InvalidOperationException(Error.Format(messageFormat, messageArgs));
}
@@ -242,7 +242,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static InvalidOperationException InvalidOperation(Exception innerException, string messageFormat, params object[] messageArgs)
+ internal static InvalidOperationException InvalidOperation(Exception innerException, string messageFormat, params object[] messageArgs)
{
return new InvalidOperationException(Error.Format(messageFormat, messageArgs), innerException);
}
@@ -253,7 +253,7 @@ namespace System.Web.Http.Common
/// <param name="messageFormat">A composite format string explaining the reason for the exception.</param>
/// <param name="messageArgs">An object array that contains zero or more objects to format.</param>
/// <returns>The logged <see cref="Exception"/>.</returns>
- public static NotSupportedException NotSupported(string messageFormat, params object[] messageArgs)
+ internal static NotSupportedException NotSupported(string messageFormat, params object[] messageArgs)
{
return new NotSupportedException(Error.Format(messageFormat, messageArgs));
}
diff --git a/src/System.Web.Http.Common/HttpMethodHelper.cs b/src/Common/HttpMethodHelper.cs
index 0fdc4d28..e0d47d9b 100644
--- a/src/System.Web.Http.Common/HttpMethodHelper.cs
+++ b/src/Common/HttpMethodHelper.cs
@@ -1,18 +1,18 @@
using System.Net.Http;
-namespace System.Web.Http.Common
+namespace System.Web.Http
{
/// <summary>
/// Various helper methods for the static members of <see cref="HttpMethod"/>.
/// </summary>
- public static class HttpMethodHelper
+ internal static class HttpMethodHelper
{
/// <summary>
/// Gets the static <see cref="HttpMethod"/> instance for any given HTTP method name.
/// </summary>
/// <param name="method">The HTTP request method.</param>
/// <returns>An existing static <see cref="HttpMethod"/> or a new instance if the method was not found.</returns>
- public static HttpMethod GetHttpMethod(string method)
+ internal static HttpMethod GetHttpMethod(string method)
{
if (String.IsNullOrEmpty(method))
{
diff --git a/src/System.Web.Http.Common/TaskHelpers.cs b/src/Common/TaskHelpers.cs
index 66dccc2a..66dccc2a 100644
--- a/src/System.Web.Http.Common/TaskHelpers.cs
+++ b/src/Common/TaskHelpers.cs
diff --git a/src/System.Web.Http.Common/TaskHelpersExtensions.cs b/src/Common/TaskHelpersExtensions.cs
index b19df30d..b19df30d 100644
--- a/src/System.Web.Http.Common/TaskHelpersExtensions.cs
+++ b/src/Common/TaskHelpersExtensions.cs
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/DbContextExtensions.cs b/src/Microsoft.Web.Http.Data.EntityFramework/DbContextExtensions.cs
index 0825cc0a..55a4a46a 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/DbContextExtensions.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/DbContextExtensions.cs
@@ -3,7 +3,7 @@ using System.Data;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Objects;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.EntityFramework
{
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/DbDataController.cs b/src/Microsoft.Web.Http.Data.EntityFramework/DbDataController.cs
index 4f3ead5c..1bb05208 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/DbDataController.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/DbDataController.cs
@@ -6,7 +6,7 @@ using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Objects;
using System.Linq;
-using System.Web.Http.Common;
+using System.Web.Http;
using System.Web.Http.Controllers;
using Microsoft.Web.Http.Data.EntityFramework.Metadata;
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/DbMetadataProviderAttribute.cs b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/DbMetadataProviderAttribute.cs
index 8228a1d2..89df23a8 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/DbMetadataProviderAttribute.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/DbMetadataProviderAttribute.cs
@@ -1,6 +1,6 @@
using System;
using System.Data.Entity;
-using System.Web.Http.Common;
+using System.Web.Http;
using Microsoft.Web.Http.Data.Metadata;
namespace Microsoft.Web.Http.Data.EntityFramework.Metadata
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesMetadataProviderAttribute.cs b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesMetadataProviderAttribute.cs
index 336b1cfb..2222021c 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesMetadataProviderAttribute.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesMetadataProviderAttribute.cs
@@ -1,6 +1,6 @@
using System;
using System.Data.Objects;
-using System.Web.Http.Common;
+using System.Web.Http;
using Microsoft.Web.Http.Data.Metadata;
namespace Microsoft.Web.Http.Data.EntityFramework.Metadata
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesTypeDescriptionContext.cs b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesTypeDescriptionContext.cs
index 209221fd..4258300f 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesTypeDescriptionContext.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/LinqToEntitiesTypeDescriptionContext.cs
@@ -4,7 +4,7 @@ using System.ComponentModel.DataAnnotations;
using System.Data.Metadata.Edm;
using System.Globalization;
using System.Linq;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.EntityFramework.Metadata
{
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/MetadataWorkspaceUtilities.cs b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/MetadataWorkspaceUtilities.cs
index 05e5aa40..970eb25d 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/MetadataWorkspaceUtilities.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/Metadata/MetadataWorkspaceUtilities.cs
@@ -6,7 +6,7 @@ using System.Data.Objects;
using System.Globalization;
using System.Linq;
using System.Reflection;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.EntityFramework.Metadata
{
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/Microsoft.Web.Http.Data.EntityFramework.csproj b/src/Microsoft.Web.Http.Data.EntityFramework/Microsoft.Web.Http.Data.EntityFramework.csproj
index 498b403b..12016f56 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/Microsoft.Web.Http.Data.EntityFramework.csproj
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/Microsoft.Web.Http.Data.EntityFramework.csproj
@@ -66,6 +66,9 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
+ </Compile>
<Compile Include="DbContextExtensions.cs" />
<Compile Include="DbDataController.cs" />
<Compile Include="GlobalSuppressions.cs" />
@@ -100,10 +103,6 @@
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
<Name>System.Net.Http.Formatting</Name>
</ProjectReference>
- <ProjectReference Include="..\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\Microsoft.Web.Http.Data\Microsoft.Web.Http.Data.csproj">
<Project>{ACE91549-D86E-4EB6-8C2A-5FF51386BB68}</Project>
<Name>Microsoft.Web.Http.Data</Name>
@@ -114,6 +113,21 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextExtensions.cs b/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextExtensions.cs
index 7b76d99b..aff101ab 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextExtensions.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextExtensions.cs
@@ -1,7 +1,7 @@
using System.ComponentModel;
using System.Data;
using System.Data.Objects;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.EntityFramework
{
diff --git a/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextUtilities.cs b/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextUtilities.cs
index 47a75494..8ebe2b8a 100644
--- a/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextUtilities.cs
+++ b/src/Microsoft.Web.Http.Data.EntityFramework/ObjectContextUtilities.cs
@@ -5,7 +5,7 @@ using System.Data;
using System.Data.Metadata.Edm;
using System.Data.Objects;
using System.Linq;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.EntityFramework
{
diff --git a/src/Microsoft.Web.Http.Data/ChangeSet.cs b/src/Microsoft.Web.Http.Data/ChangeSet.cs
index d6f4d83e..1f724eb7 100644
--- a/src/Microsoft.Web.Http.Data/ChangeSet.cs
+++ b/src/Microsoft.Web.Http.Data/ChangeSet.cs
@@ -7,7 +7,7 @@ using System.ComponentModel.DataAnnotations;
using System.Globalization;
using System.Linq;
using System.Reflection;
-using System.Web.Http.Common;
+using System.Web.Http;
using System.Web.Http.Controllers;
namespace Microsoft.Web.Http.Data
diff --git a/src/Microsoft.Web.Http.Data/DataController.cs b/src/Microsoft.Web.Http.Data/DataController.cs
index 88d3bf50..56215195 100644
--- a/src/Microsoft.Web.Http.Data/DataController.cs
+++ b/src/Microsoft.Web.Http.Data/DataController.cs
@@ -10,7 +10,6 @@ using System.Reflection;
using System.Threading;
using System.Threading.Tasks;
using System.Web.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace Microsoft.Web.Http.Data
diff --git a/src/Microsoft.Web.Http.Data/DataControllerDescription.cs b/src/Microsoft.Web.Http.Data/DataControllerDescription.cs
index e18e69ec..c5703e29 100644
--- a/src/Microsoft.Web.Http.Data/DataControllerDescription.cs
+++ b/src/Microsoft.Web.Http.Data/DataControllerDescription.cs
@@ -7,7 +7,6 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Web.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using Microsoft.Web.Http.Data.Metadata;
diff --git a/src/Microsoft.Web.Http.Data/Metadata/DataControllerTypeDescriptionProvider.cs b/src/Microsoft.Web.Http.Data/Metadata/DataControllerTypeDescriptionProvider.cs
index a36dd9e7..a406e729 100644
--- a/src/Microsoft.Web.Http.Data/Metadata/DataControllerTypeDescriptionProvider.cs
+++ b/src/Microsoft.Web.Http.Data/Metadata/DataControllerTypeDescriptionProvider.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.Metadata
{
diff --git a/src/Microsoft.Web.Http.Data/Metadata/MetadataProvider.cs b/src/Microsoft.Web.Http.Data/Metadata/MetadataProvider.cs
index b9d47104..800f5809 100644
--- a/src/Microsoft.Web.Http.Data/Metadata/MetadataProvider.cs
+++ b/src/Microsoft.Web.Http.Data/Metadata/MetadataProvider.cs
@@ -1,6 +1,6 @@
using System;
using System.ComponentModel;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.Metadata
{
diff --git a/src/Microsoft.Web.Http.Data/Metadata/MetadataProviderAttribute.cs b/src/Microsoft.Web.Http.Data/Metadata/MetadataProviderAttribute.cs
index aed944a7..7d30b889 100644
--- a/src/Microsoft.Web.Http.Data/Metadata/MetadataProviderAttribute.cs
+++ b/src/Microsoft.Web.Http.Data/Metadata/MetadataProviderAttribute.cs
@@ -1,5 +1,5 @@
using System;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data.Metadata
{
diff --git a/src/Microsoft.Web.Http.Data/Microsoft.Web.Http.Data.csproj b/src/Microsoft.Web.Http.Data/Microsoft.Web.Http.Data.csproj
index 173e0632..4bd6d8ba 100644
--- a/src/Microsoft.Web.Http.Data/Microsoft.Web.Http.Data.csproj
+++ b/src/Microsoft.Web.Http.Data/Microsoft.Web.Http.Data.csproj
@@ -68,11 +68,14 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
- <Compile Include="..\System.Web.Http.Common\TaskHelpers.cs">
- <Link>TaskUtility\TaskHelpers.cs</Link>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
</Compile>
- <Compile Include="..\System.Web.Http.Common\TaskHelpersExtensions.cs">
- <Link>TaskUtility\TaskHelpersExtensions.cs</Link>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
</Compile>
<Compile Include="ChangeOperation.cs" />
<Compile Include="ChangeSet.cs" />
@@ -113,10 +116,6 @@
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
<Name>System.Net.Http.Formatting</Name>
</ProjectReference>
- <ProjectReference Include="..\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\System.Web.Http\System.Web.Http.csproj">
<Project>{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440}</Project>
<Name>System.Web.Http</Name>
@@ -126,6 +125,21 @@
<CodeAnalysisDictionary Include="..\CodeAnalysisDictionary.xml" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Resource.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resource.Designer.cs</LastGenOutput>
diff --git a/src/Microsoft.Web.Http.Data/QueryFilterAttribute.cs b/src/Microsoft.Web.Http.Data/QueryFilterAttribute.cs
index a064e9f9..25206c63 100644
--- a/src/Microsoft.Web.Http.Data/QueryFilterAttribute.cs
+++ b/src/Microsoft.Web.Http.Data/QueryFilterAttribute.cs
@@ -4,7 +4,6 @@ using System.Linq.Expressions;
using System.Net.Http;
using System.Reflection;
using System.Web.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
diff --git a/src/Microsoft.Web.Http.Data/ValidationResultInfo.cs b/src/Microsoft.Web.Http.Data/ValidationResultInfo.cs
index 9faede0a..cf38131d 100644
--- a/src/Microsoft.Web.Http.Data/ValidationResultInfo.cs
+++ b/src/Microsoft.Web.Http.Data/ValidationResultInfo.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
-using System.Web.Http.Common;
+using System.Web.Http;
namespace Microsoft.Web.Http.Data
{
diff --git a/src/System.Net.Http.Formatting/HttpMessageContent.cs b/src/System.Net.Http.Formatting/HttpMessageContent.cs
index 23bd8c27..200ea2a9 100644
--- a/src/System.Net.Http.Formatting/HttpMessageContent.cs
+++ b/src/System.Net.Http.Formatting/HttpMessageContent.cs
@@ -3,7 +3,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.IO;
using System.Net.Http.Headers;
-using System.Net.Http.Internal;
using System.Text;
using System.Threading.Tasks;
@@ -260,7 +259,7 @@ namespace System.Net.Http
// exceptions so that the task finalizer doesn't tear down our app domain.
if (_streamTask != null && _streamTask.IsValueCreated && _streamTask.Value != null)
{
- _streamTask.Value.Catch(ex => TaskHelpers.Completed());
+ _streamTask.Value.Catch(info => info.Handled());
_streamTask = null;
}
diff --git a/src/System.Web.Http.Common/HttpRequestMessageCommonExtensions.cs b/src/System.Net.Http.Formatting/HttpRequestMessageExtensions.cs
index 436c7212..49703a4e 100644
--- a/src/System.Web.Http.Common/HttpRequestMessageCommonExtensions.cs
+++ b/src/System.Net.Http.Formatting/HttpRequestMessageExtensions.cs
@@ -1,16 +1,14 @@
-using System.ComponentModel;
+using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
-using System.Net;
-using System.Net.Http;
-using System.Web.Http.Common;
+using System.Web.Http;
-namespace System.Web.Http
+namespace System.Net.Http
{
/// <summary>
/// Provides extension methods for the <see cref="HttpRequestMessage"/> class.
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
- public static class HttpRequestMessageCommonExtensions
+ public static class HttpRequestMessageExtensions
{
/// <summary>
/// Creates an <see cref="HttpResponseMessage"/> wired up to the associated <see cref="HttpRequestMessage"/>.
diff --git a/src/System.Net.Http.Formatting/Internal/TaskExtensions.cs b/src/System.Net.Http.Formatting/Internal/TaskExtensions.cs
deleted file mode 100644
index 041e04e8..00000000
--- a/src/System.Net.Http.Formatting/Internal/TaskExtensions.cs
+++ /dev/null
@@ -1,547 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-using System.Linq.Expressions;
-using System.Reflection;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Http.Internal
-{
- // TODO, DevDiv 336175, This is copied from System.Web.Http.Common, remove this copy once the issue is addressed.
- internal static class TaskExtensions
- {
- private static Task<AsyncVoid> _defaultCompleted = TaskHelpers.FromResult<AsyncVoid>(default(AsyncVoid));
- private static readonly Action<Task> _rethrowWithNoStackLossDelegate = GetRethrowWithNoStackLossDelegate();
-
- /// <summary>
- /// Calls the given continuation, after the given task completes, if it ends in a faulted state.
- /// Will not be called if the task did not fault (meaning, it will not be called if the task ran
- /// to completion or was canceled). Intended to roughly emulate C# 5's support for "try/catch" in
- /// async methods. Note that this method allows you to return a Task, so that you can either return
- /// a completed Task (indicating that you swallowed the exception) or a faulted task (indicating that
- /// that the exception should be propagated). In C#, you cannot normally use await within a catch
- /// block, so returning a real async task should never be done from Catch().
- /// </summary>
- internal static Task Catch(this Task task, Func<Exception, Task> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.CatchImpl(ex => continuation(ex).ToTask<AsyncVoid>(), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task completes, if it ends in a faulted state.
- /// Will not be called if the task did not fault (meaning, it will not be called if the task ran
- /// to completion or was canceled). Intended to roughly emulate C# 5's support for "try/catch" in
- /// async methods. Note that this method allows you to return a Task, so that you can either return
- /// a completed Task (indicating that you swallowed the exception) or a faulted task (indicating that
- /// that the exception should be propagated). In C#, you cannot normally use await within a catch
- /// block, so returning a real async task should never be done from Catch().
- /// </summary>
- internal static Task<TResult> Catch<TResult>(this Task<TResult> task, Func<Exception, Task<TResult>> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.CatchImpl(continuation, cancellationToken);
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- private static Task<TResult> CatchImpl<TResult>(this Task task, Func<Exception, Task<TResult>> continuation, CancellationToken cancellationToken)
- {
- // Stay on the same thread if we can
- if (task.IsCanceled || cancellationToken.IsCancellationRequested)
- {
- return TaskHelpers.Canceled<TResult>();
- }
- if (task.IsFaulted)
- {
- try
- {
- Task<TResult> resultTask = continuation(task.Exception.GetBaseException());
- if (resultTask == null)
- {
- throw new InvalidOperationException(System.Net.Http.Properties.Resources.TaskExtensions_Catch_CannotReturnNull);
- }
-
- return resultTask;
- }
- catch (Exception ex)
- {
- return TaskHelpers.FromError<TResult>(ex);
- }
- }
- if (task.Status == TaskStatus.RanToCompletion)
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- tcs.TrySetFromTask(task);
- return tcs.Task;
- }
-
- SynchronizationContext syncContext = SynchronizationContext.Current;
-
- return task.ContinueWith(innerTask =>
- {
- TaskCompletionSource<Task<TResult>> tcs = new TaskCompletionSource<Task<TResult>>();
-
- if (innerTask.IsFaulted)
- {
- if (syncContext != null)
- {
- syncContext.Post(state =>
- {
- try
- {
- Task<TResult> resultTask = continuation(innerTask.Exception.GetBaseException());
- if (resultTask == null)
- {
- throw new InvalidOperationException(System.Net.Http.Properties.Resources.TaskExtensions_Catch_CannotReturnNull);
- }
-
- tcs.TrySetResult(resultTask);
- }
- catch (Exception ex)
- {
- tcs.TrySetException(ex);
- }
- }, state: null);
- }
- else
- {
- Task<TResult> resultTask = continuation(innerTask.Exception.GetBaseException());
- if (resultTask == null)
- {
- throw new InvalidOperationException(System.Net.Http.Properties.Resources.TaskExtensions_Catch_CannotReturnNull);
- }
-
- tcs.TrySetResult(resultTask);
- }
- }
- else
- {
- tcs.TrySetFromTask(innerTask);
- }
-
- return tcs.Task.FastUnwrap();
- }, cancellationToken).FastUnwrap();
- }
-
- /// <summary>
- /// Upon completion of the task, copies its result into the given task completion source, regardless of the
- /// completion state. This causes the original task to be fully observed, and the task that is returned by
- /// this method will always successfully run to completion, regardless of the original task state.
- /// Since this method consumes a task with no return value, you must provide the return value to be used
- /// when the inner task ran to successful completion.
- /// </summary>
- internal static Task CopyResultToCompletionSource<TResult>(this Task task, TaskCompletionSource<TResult> tcs, TResult completionResult)
- {
- return task.CopyResultToCompletionSourceImpl(tcs, innerTask => completionResult);
- }
-
- /// <summary>
- /// Upon completion of the task, copies its result into the given task completion source, regardless of the
- /// completion state. This causes the original task to be fully observed, and the task that is returned by
- /// this method will always successfully run to completion, regardless of the original task state.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task CopyResultToCompletionSource<TResult>(this Task<TResult> task, TaskCompletionSource<TResult> tcs)
- {
- return task.CopyResultToCompletionSourceImpl(tcs, innerTask => innerTask.Result);
- }
-
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- private static Task CopyResultToCompletionSourceImpl<TTask, TResult>(this TTask task, TaskCompletionSource<TResult> tcs, Func<TTask, TResult> resultThunk)
- where TTask : Task
- {
- if (task.IsCompleted)
- {
- switch (task.Status)
- {
- case TaskStatus.Canceled:
- case TaskStatus.Faulted:
- TaskHelpers.TrySetFromTask(tcs, task);
- break;
-
- case TaskStatus.RanToCompletion:
- tcs.TrySetResult(resultThunk(task));
- break;
- }
-
- return TaskHelpers.Completed();
- }
-
- return task.ContinueWith(innerTask =>
- {
- switch (innerTask.Status)
- {
- case TaskStatus.Canceled:
- case TaskStatus.Faulted:
- TaskHelpers.TrySetFromTask(tcs, innerTask);
- break;
-
- case TaskStatus.RanToCompletion:
- tcs.TrySetResult(resultThunk(task));
- break;
- }
- }, TaskContinuationOptions.ExecuteSynchronously);
- }
-
- /// <summary>
- /// A version of task.Unwrap that is optimized to prevent unnecessarily capturing the
- /// execution context when the antecedent task is already completed.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4000:DoNotUseProblematicTaskTypes", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task FastUnwrap(this Task<Task> task)
- {
- Task innerTask = task.Status == TaskStatus.RanToCompletion ? task.Result : null;
- return innerTask ?? task.Unwrap();
- }
-
- /// <summary>
- /// A version of task.Unwrap that is optimized to prevent unnecessarily capturing the
- /// execution context when the antecedent task is already completed.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4000:DoNotUseProblematicTaskTypes", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task<TResult> FastUnwrap<TResult>(this Task<Task<TResult>> task)
- {
- Task<TResult> innerTask = task.Status == TaskStatus.RanToCompletion ? task.Result : null;
- return innerTask ?? task.Unwrap();
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, regardless of the state
- /// the task ended in. Intended to roughly emulate C# 5's support for "finally" in async methods.
- /// </summary>
- internal static Task Finally(this Task task, Action continuation)
- {
- return task.FinallyImpl<AsyncVoid>(continuation);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, regardless of the state
- /// the task ended in. Intended to roughly emulate C# 5's support for "finally" in async methods.
- /// </summary>
- internal static Task<TResult> Finally<TResult>(this Task<TResult> task, Action continuation)
- {
- return task.FinallyImpl<TResult>(continuation);
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- private static Task<TResult> FinallyImpl<TResult>(this Task task, Action continuation)
- {
- // Stay on the same thread if we can
- if (task.IsCompleted)
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- try
- {
- continuation();
- tcs.TrySetFromTask(task);
- }
- catch (Exception ex)
- {
- tcs.TrySetException(ex);
- }
- return tcs.Task;
- }
-
- SynchronizationContext syncContext = SynchronizationContext.Current;
-
- return task.ContinueWith(innerTask =>
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- if (syncContext != null)
- {
- syncContext.Post(state =>
- {
- try
- {
- continuation();
- tcs.TrySetFromTask(innerTask);
- }
- catch (Exception ex)
- {
- tcs.SetException(ex);
- }
- }, state: null);
- }
- else
- {
- continuation();
- tcs.TrySetFromTask(innerTask);
- }
-
- return tcs.Task;
- }).FastUnwrap();
- }
-
- [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes", Justification = "This general exception is not intended to be seen by the user")]
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "This general exception is not intended to be seen by the user")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- private static Action<Task> GetRethrowWithNoStackLossDelegate()
- {
- MethodInfo getAwaiterMethod = typeof(Task).GetMethod("GetAwaiter", Type.EmptyTypes);
- if (getAwaiterMethod != null)
- {
- // .NET 4.5 - dump the same code the 'await' keyword would have dumped
- // >> task.GetAwaiter().GetResult()
- // No-ops if the task completed successfully, else throws the originating exception complete with the correct call stack.
- var taskParameter = Expression.Parameter(typeof(Task));
- var getAwaiterCall = Expression.Call(taskParameter, getAwaiterMethod);
- var getResultCall = Expression.Call(getAwaiterCall, "GetResult", Type.EmptyTypes);
- var lambda = Expression.Lambda<Action<Task>>(getResultCall, taskParameter);
- return lambda.Compile();
- }
- else
- {
- Func<Exception, Exception> prepForRemoting = null;
-
- try
- {
- if (AppDomain.CurrentDomain.IsFullyTrusted)
- {
- // .NET 4 - do the same thing Lazy<T> does by calling Exception.PrepForRemoting
- // This is an internal method in mscorlib.dll, so pass a test Exception to it to make sure we can call it.
- var exceptionParameter = Expression.Parameter(typeof(Exception));
- var prepForRemotingCall = Expression.Call(exceptionParameter, "PrepForRemoting", Type.EmptyTypes);
- var lambda = Expression.Lambda<Func<Exception, Exception>>(prepForRemotingCall, exceptionParameter);
- var func = lambda.Compile();
- func(new Exception()); // make sure the method call succeeds before assigning the 'prepForRemoting' local variable
- prepForRemoting = func;
- }
- }
- catch
- {
- } // If delegate creation fails (medium trust) we will simply throw the base exception.
-
- return task =>
- {
- try
- {
- task.Wait();
- }
- catch (AggregateException ex)
- {
- Exception baseException = ex.GetBaseException();
- if (prepForRemoting != null)
- {
- baseException = prepForRemoting(baseException);
- }
- throw baseException;
- }
- };
- }
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault).
- /// </summary>
- internal static Task Then(this Task task, Action continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => ToAsyncVoidTask(continuation), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault).
- /// </summary>
- internal static Task<TOuterResult> Then<TOuterResult>(this Task task, Func<TOuterResult> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => TaskHelpers.FromResult(continuation()), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault).
- /// </summary>
- internal static Task<TOuterResult> Then<TOuterResult>(this Task task, Func<Task<TOuterResult>> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => continuation(), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault). The continuation is provided with the
- /// result of the task as its sole parameter.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task Then<TInnerResult>(this Task<TInnerResult> task, Action<TInnerResult> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => ToAsyncVoidTask(() => continuation(t.Result)), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault). The continuation is provided with the
- /// result of the task as its sole parameter.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task<TOuterResult> Then<TInnerResult, TOuterResult>(this Task<TInnerResult> task, Func<TInnerResult, TOuterResult> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => TaskHelpers.FromResult(continuation(t.Result)), cancellationToken);
- }
-
- /// <summary>
- /// Calls the given continuation, after the given task has completed, if the task successfully ran
- /// to completion (i.e., was not cancelled and did not fault). The continuation is provided with the
- /// result of the task as its sole parameter.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task<TOuterResult> Then<TInnerResult, TOuterResult>(this Task<TInnerResult> task, Func<TInnerResult, Task<TOuterResult>> continuation, CancellationToken cancellationToken = default(CancellationToken))
- {
- return task.ThenImpl(t => continuation(t.Result), cancellationToken);
- }
-
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- private static Task<TOuterResult> ThenImpl<TTask, TOuterResult>(this TTask task, Func<TTask, Task<TOuterResult>> continuation, CancellationToken cancellationToken)
- where TTask : Task
- {
- // Stay on the same thread if we can
- if (task.IsCanceled || cancellationToken.IsCancellationRequested)
- {
- return TaskHelpers.Canceled<TOuterResult>();
- }
- if (task.IsFaulted)
- {
- return TaskHelpers.FromErrors<TOuterResult>(task.Exception.InnerExceptions);
- }
- if (task.Status == TaskStatus.RanToCompletion)
- {
- try
- {
- return continuation(task);
- }
- catch (Exception ex)
- {
- return TaskHelpers.FromError<TOuterResult>(ex);
- }
- }
-
- SynchronizationContext syncContext = SynchronizationContext.Current;
-
- return task.ContinueWith(innerTask =>
- {
- if (innerTask.IsFaulted)
- {
- return TaskHelpers.FromErrors<TOuterResult>(innerTask.Exception.InnerExceptions);
- }
- if (innerTask.IsCanceled)
- {
- return TaskHelpers.Canceled<TOuterResult>();
- }
-
- TaskCompletionSource<Task<TOuterResult>> tcs = new TaskCompletionSource<Task<TOuterResult>>();
- if (syncContext != null)
- {
- syncContext.Post(state =>
- {
- try
- {
- tcs.TrySetResult(continuation(task));
- }
- catch (Exception ex)
- {
- tcs.TrySetException(ex);
- }
- }, state: null);
- }
- else
- {
- tcs.TrySetResult(continuation(task));
- }
- return tcs.Task.FastUnwrap();
- }, cancellationToken).FastUnwrap();
- }
-
- /// <summary>
- /// Throws the first faulting exception for a task which is faulted. It attempts to preserve the original
- /// stack trace when throwing the exception (which should always work in 4.5, and should also work in 4.0
- /// when running in full trust). Note: It is the caller's responsibility not to pass incomplete tasks to
- /// this method, because it does degenerate into a call to the equivalent of .Wait() on the task when it
- /// hasn't yet completed.
- /// </summary>
- internal static void ThrowIfFaulted(this Task task)
- {
- _rethrowWithNoStackLossDelegate(task);
- }
-
- /// <summary>
- /// Adapts any action into a Task (returning AsyncVoid, so that it's usable with Task{T} extension methods).
- /// </summary>
- private static Task<AsyncVoid> ToAsyncVoidTask(Action action)
- {
- return TaskHelpers.RunSynchronously<AsyncVoid>(() =>
- {
- action();
- return _defaultCompleted;
- });
- }
-
- /// <summary>
- /// Changes the return value of a task to the given result, if the task ends in the RanToCompletion state.
- /// This potentially imposes an extra ContinueWith to convert a non-completed task, so use this with caution.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static Task<TResult> ToTask<TResult>(this Task task, CancellationToken cancellationToken = default(CancellationToken), TResult result = default(TResult))
- {
- if (task == null)
- {
- return null;
- }
-
- // Stay on the same thread if we can
- if (task.IsCanceled || cancellationToken.IsCancellationRequested)
- {
- return TaskHelpers.Canceled<TResult>();
- }
- if (task.IsFaulted)
- {
- return TaskHelpers.FromErrors<TResult>(task.Exception.InnerExceptions);
- }
- if (task.Status == TaskStatus.RanToCompletion)
- {
- return TaskHelpers.FromResult(result);
- }
-
- return task.ContinueWith(innerTask =>
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
-
- if (task.Status == TaskStatus.RanToCompletion)
- {
- tcs.TrySetResult(result);
- }
- else
- {
- tcs.TrySetFromTask(innerTask);
- }
-
- return tcs.Task;
- }, TaskContinuationOptions.ExecuteSynchronously).FastUnwrap();
- }
-
- /// <summary>
- /// Attempts to get the result value for the given task. If the task ran to completion, then
- /// it will return true and set the result value; otherwise, it will return false.
- /// </summary>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "The usages here are deemed safe, and provide the implementations that this rule relies upon.")]
- internal static bool TryGetResult<TResult>(this Task<TResult> task, out TResult result)
- {
- if (task.Status == TaskStatus.RanToCompletion)
- {
- result = task.Result;
- return true;
- }
-
- result = default(TResult);
- return false;
- }
-
- /// <summary>
- /// Used as the T in a "conversion" of a Task into a Task{T}.
- /// </summary>
- private struct AsyncVoid
- {
- }
- }
-}
diff --git a/src/System.Net.Http.Formatting/Internal/TaskHelpers.cs b/src/System.Net.Http.Formatting/Internal/TaskHelpers.cs
deleted file mode 100644
index ed94de52..00000000
--- a/src/System.Net.Http.Formatting/Internal/TaskHelpers.cs
+++ /dev/null
@@ -1,384 +0,0 @@
-using System.Collections.Generic;
-using System.Diagnostics.CodeAnalysis;
-using System.Diagnostics.Contracts;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Net.Http.Internal
-{
- // TODO, DevDiv 336175, This is copied from System.Web.Http.Common, remove this copy once the issue is addressed.
-
- /// <summary>
- /// Helpers for safely using Task libraries.
- /// </summary>
- internal static class TaskHelpers
- {
- private static Task _defaultCompleted = FromResult<AsyncVoid>(default(AsyncVoid));
-
- /// <summary>
- /// Returns a canceled Task. The task is completed, IsCanceled = True, IsFaulted = False.
- /// </summary>
- internal static Task Canceled()
- {
- return CancelCache<AsyncVoid>.Canceled;
- }
-
- /// <summary>
- /// Returns a canceled Task of the given type. The task is completed, IsCanceled = True, IsFaulted = False.
- /// </summary>
- internal static Task<TResult> Canceled<TResult>()
- {
- return CancelCache<TResult>.Canceled;
- }
-
- /// <summary>
- /// Returns a completed task that has no result.
- /// </summary>
- internal static Task Completed()
- {
- return _defaultCompleted;
- }
-
- /// <summary>
- /// Returns an error task. The task is Completed, IsCanceled = False, IsFaulted = True
- /// </summary>
- internal static Task FromError(Exception exception)
- {
- return FromError<AsyncVoid>(exception);
- }
-
- /// <summary>
- /// Returns an error task of the given type. The task is Completed, IsCanceled = False, IsFaulted = True
- /// </summary>
- /// <typeparam name="TResult"></typeparam>
- internal static Task<TResult> FromError<TResult>(Exception exception)
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- tcs.SetException(exception);
- return tcs.Task;
- }
-
- /// <summary>
- /// Returns an error task of the given type. The task is Completed, IsCanceled = False, IsFaulted = True
- /// </summary>
- internal static Task FromErrors(IEnumerable<Exception> exceptions)
- {
- return FromErrors<AsyncVoid>(exceptions);
- }
-
- /// <summary>
- /// Returns an error task of the given type. The task is Completed, IsCanceled = False, IsFaulted = True
- /// </summary>
- internal static Task<TResult> FromErrors<TResult>(IEnumerable<Exception> exceptions)
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- tcs.SetException(exceptions);
- return tcs.Task;
- }
-
- /// <summary>
- /// Returns a successful completed task with the given result.
- /// </summary>
- internal static Task<TResult> FromResult<TResult>(TResult result)
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- tcs.SetResult(result);
- return tcs.Task;
- }
-
- /// <summary>
- /// Return a task that runs all the tasks inside the iterator sequentially. It stops as soon
- /// as one of the tasks fails or cancels, or after all the tasks have run succesfully.
- /// </summary>
- /// <param name="asyncIterator">collection of tasks to wait on</param>
- /// <param name="cancellationToken">cancellation token</param>
- /// <returns>a task that signals completed when all the incoming tasks are finished.</returns>
- internal static Task Iterate(IEnumerable<Task> asyncIterator, CancellationToken cancellationToken = default(CancellationToken))
- {
- return Iterate(WrapIterator(asyncIterator), cancellationToken);
- }
-
- /// <summary>
- /// Return a task that runs all the tasks inside the iterator sequentially and collects the results.
- /// It stops as soon as one of the tasks fails or cancels, or after all the tasks have run succesfully.
- /// </summary>
- /// <param name="asyncIterator">collection of tasks to wait on</param>
- /// <param name="cancellationToken">cancellation token</param>
- /// <returns>A task that, upon successful completion, returns the list of results.</returns>
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "This usage is known to be safe.")]
- internal static Task<IEnumerable<TResult>> Iterate<TResult>(IEnumerable<Task<TResult>> asyncIterator, CancellationToken cancellationToken = default(CancellationToken))
- {
- Contract.Assert(asyncIterator != null);
-
- List<TResult> results = new List<TResult>();
- IEnumerator<Task<TResult>> enumerator = asyncIterator.GetEnumerator();
- TaskCompletionSource<IEnumerable<TResult>> tcs = new TaskCompletionSource<IEnumerable<TResult>>();
- Action recursiveBody = null;
-
- recursiveBody = () =>
- {
- try
- {
- if (cancellationToken.IsCancellationRequested)
- {
- tcs.TrySetCanceled();
- }
- else if (enumerator.MoveNext())
- {
- enumerator.Current.ContinueWith(previous =>
- {
- switch (previous.Status)
- {
- case TaskStatus.Faulted:
- case TaskStatus.Canceled:
- tcs.TrySetFromTask(previous);
- break;
-
- default:
- results.Add(previous.Result);
- recursiveBody();
- break;
- }
- });
- }
- else
- {
- tcs.TrySetResult(results);
- }
- }
- catch (Exception e)
- {
- tcs.TrySetException(e);
- }
- };
-
- recursiveBody();
- return tcs.Task.Finally(enumerator.Dispose);
- }
-
- /// <summary>
- /// Replacement for Task.Factory.StartNew when the code can run synchronously.
- /// We run the code immediately and avoid the thread switch.
- /// This is used to help synchronous code implement task interfaces.
- /// </summary>
- /// <param name="action">action to run synchronouslyt</param>
- /// <param name="token">cancellation token. This is only checked before we run the task, and if cancelled, we immediately return a cancelled task.</param>
- /// <returns>a task who result is the result from Func()</returns>
- /// <remarks>
- /// Avoid calling Task.Factory.StartNew.
- /// This avoids gotchas with StartNew:
- /// - ensures cancellation token is checked (StartNew doesn't check cancellation tokens).
- /// - Keeps on the same thread.
- /// - Avoids switching synchronization contexts.
- /// Also take in a lambda so that we can wrap in a try catch and honor task failure semantics.
- /// </remarks>
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- public static Task RunSynchronously(Action action, CancellationToken token = default(CancellationToken))
- {
- if (token.IsCancellationRequested)
- {
- return Canceled();
- }
-
- try
- {
- action();
- return Completed();
- }
- catch (Exception e)
- {
- return FromError(e);
- }
- }
-
- /// <summary>
- /// Replacement for Task.Factory.StartNew when the code can run synchronously.
- /// We run the code immediately and avoid the thread switch.
- /// This is used to help synchronous code implement task interfaces.
- /// </summary>
- /// <typeparam name="TResult">type of result that task will return.</typeparam>
- /// <param name="func">function to run synchronously and produce result</param>
- /// <param name="cancellationToken">cancellation token. This is only checked before we run the task, and if cancelled, we immediately return a cancelled task.</param>
- /// <returns>a task who result is the result from Func()</returns>
- /// <remarks>
- /// Avoid calling Task.Factory.StartNew.
- /// This avoids gotchas with StartNew:
- /// - ensures cancellation token is checked (StartNew doesn't check cancellation tokens).
- /// - Keeps on the same thread.
- /// - Avoids switching synchronization contexts.
- /// Also take in a lambda so that we can wrap in a try catch and honor task failure semantics.
- /// </remarks>
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- internal static Task<TResult> RunSynchronously<TResult>(Func<TResult> func, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (cancellationToken.IsCancellationRequested)
- {
- return Canceled<TResult>();
- }
-
- try
- {
- return FromResult(func());
- }
- catch (Exception e)
- {
- return FromError<TResult>(e);
- }
- }
-
- /// <summary>
- /// Overload of RunSynchronously that avoids a call to Unwrap().
- /// This overload is useful when func() starts doing some synchronous work and then hits IO and
- /// needs to create a task to finish the work.
- /// </summary>
- /// <typeparam name="TResult">type of result that Task will return</typeparam>
- /// <param name="func">function that returns a task</param>
- /// <param name="cancellationToken">cancellation token. This is only checked before we run the task, and if cancelled, we immediately return a cancelled task.</param>
- /// <returns>a task, created by running func().</returns>
- [SuppressMessage("Microsoft.Design", "CA1031:DoNotCatchGeneralExceptionTypes", Justification = "The caught exception type is reflected into a faulted task.")]
- internal static Task<TResult> RunSynchronously<TResult>(Func<Task<TResult>> func, CancellationToken cancellationToken = default(CancellationToken))
- {
- if (cancellationToken.IsCancellationRequested)
- {
- return Canceled<TResult>();
- }
-
- try
- {
- return func();
- }
- catch (Exception e)
- {
- return FromError<TResult>(e);
- }
- }
-
- /// <summary>
- /// Update the completion source if the task failed (cancelled or faulted). No change to completion source if the task succeeded.
- /// </summary>
- /// <typeparam name="TResult">result type of completion source</typeparam>
- /// <param name="tcs">completion source to update</param>
- /// <param name="source">task to update from.</param>
- /// <returns>true on success</returns>
- internal static bool SetIfTaskFailed<TResult>(this TaskCompletionSource<TResult> tcs, Task source)
- {
- switch (source.Status)
- {
- case TaskStatus.Canceled:
- case TaskStatus.Faulted:
- return tcs.TrySetFromTask(source);
- }
-
- return false;
- }
-
- /// <summary>
- /// Set a completion source from the given Task.
- /// </summary>
- /// <typeparam name="TResult">result type for completion source.</typeparam>
- /// <param name="tcs">completion source to set</param>
- /// <param name="source">Task to get values from.</param>
- /// <returns>true if this successfully sets the completion source.</returns>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "This is a known safe usage of Task.Result, since it only occurs when we know the task's state to be completed.")]
- internal static bool TrySetFromTask<TResult>(this TaskCompletionSource<TResult> tcs, Task source)
- {
- if (source.Status == TaskStatus.Canceled)
- {
- return tcs.TrySetCanceled();
- }
-
- if (source.Status == TaskStatus.Faulted)
- {
- return tcs.TrySetException(source.Exception.InnerExceptions);
- }
-
- if (source.Status == TaskStatus.RanToCompletion)
- {
- Task<TResult> taskOfResult = source as Task<TResult>;
- return tcs.TrySetResult(taskOfResult == null ? default(TResult) : taskOfResult.Result);
- }
-
- return false;
- }
-
- /// <summary>
- /// Set a completion source from the given Task. If the task ran to completion and the result type doesn't match
- /// the type of the completion source, then a default value will be used. This is useful for converting Task into
- /// Task{AsyncVoid}, but it can also accidentally be used to introduce data loss (by passing the wrong
- /// task type), so please execute this method with care.
- /// </summary>
- /// <typeparam name="TResult">result type for completion source.</typeparam>
- /// <param name="tcs">completion source to set</param>
- /// <param name="source">Task to get values from.</param>
- /// <returns>true if this successfully sets the completion source.</returns>
- [SuppressMessage("Microsoft.WebAPI", "CR4001:DoNotCallProblematicMethodsOnTask", Justification = "This is a known safe usage of Task.Result, since it only occurs when we know the task's state to be completed.")]
- internal static bool TrySetFromTask<TResult>(this TaskCompletionSource<Task<TResult>> tcs, Task source)
- {
- if (source.Status == TaskStatus.Canceled)
- {
- return tcs.TrySetCanceled();
- }
-
- if (source.Status == TaskStatus.Faulted)
- {
- return tcs.TrySetException(source.Exception.InnerExceptions);
- }
-
- if (source.Status == TaskStatus.RanToCompletion)
- {
- // Sometimes the source task is Task<Task<TResult>>, and sometimes it's Task<TResult>.
- // The latter usually happens when we're in the middle of a sync-block postback where
- // the continuation is a function which returns Task<TResult> rather than just TResult,
- // but the originating task was itself just Task<TResult>. An example of this can be
- // found in TaskExtensions.CatchImpl().
- Task<Task<TResult>> taskOfTaskOfResult = source as Task<Task<TResult>>;
- if (taskOfTaskOfResult != null)
- {
- return tcs.TrySetResult(taskOfTaskOfResult.Result);
- }
-
- Task<TResult> taskOfResult = source as Task<TResult>;
- if (taskOfResult != null)
- {
- return tcs.TrySetResult(taskOfResult);
- }
-
- return tcs.TrySetResult(TaskHelpers.FromResult(default(TResult)));
- }
-
- return false;
- }
-
- private static IEnumerable<Task<AsyncVoid>> WrapIterator(IEnumerable<Task> tasks)
- {
- foreach (Task task in tasks)
- {
- yield return task.ToTask<AsyncVoid>();
- }
- }
-
- /// <summary>
- /// Used as the T in a "conversion" of a Task into a Task{T}
- /// </summary>
- private struct AsyncVoid
- {
- }
-
- /// <summary>
- /// This class is a convenient cache for per-type cancelled tasks
- /// </summary>
- /// <typeparam name="TResult"></typeparam>
- private static class CancelCache<TResult>
- {
- public static readonly Task<TResult> Canceled = GetCancelledTask();
-
- private static Task<TResult> GetCancelledTask()
- {
- TaskCompletionSource<TResult> tcs = new TaskCompletionSource<TResult>();
- tcs.SetCanceled();
- return tcs.Task;
- }
- }
- }
-}
diff --git a/src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs b/src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs
index b8332890..e9ef2042 100644
--- a/src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs
+++ b/src/System.Net.Http.Formatting/Properties/AssemblyInfo.cs
@@ -12,5 +12,3 @@ using System.Runtime.InteropServices;
[assembly: InternalsVisibleTo("System.Net.Http.Formatting.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Net.Http.Formatting.Test.Integration, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
[assembly: InternalsVisibleTo("System.Net.Http.Formatting.OData.Test.Unit, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-/* TODO: Remove */
-[assembly: InternalsVisibleTo("System.Web.Http, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
diff --git a/src/System.Net.Http.Formatting/Properties/Resources.Designer.cs b/src/System.Net.Http.Formatting/Properties/Resources.Designer.cs
index 2debde1a..eb2aac74 100644
--- a/src/System.Net.Http.Formatting/Properties/Resources.Designer.cs
+++ b/src/System.Net.Http.Formatting/Properties/Resources.Designer.cs
@@ -502,15 +502,6 @@ namespace System.Net.Http.Properties {
}
/// <summary>
- /// Looks up a localized string similar to The return value from a Catch() lambda cannot return null..
- /// </summary>
- internal static string TaskExtensions_Catch_CannotReturnNull {
- get {
- return ResourceManager.GetString("TaskExtensions_Catch_CannotReturnNull", resourceCulture);
- }
- }
-
- /// <summary>
/// Looks up a localized string similar to &apos;undefined&apos;.
/// </summary>
internal static string UndefinedMediaType {
diff --git a/src/System.Net.Http.Formatting/Properties/Resources.resx b/src/System.Net.Http.Formatting/Properties/Resources.resx
index f563fc64..501aaba9 100644
--- a/src/System.Net.Http.Formatting/Properties/Resources.resx
+++ b/src/System.Net.Http.Formatting/Properties/Resources.resx
@@ -228,10 +228,6 @@
<data name="UnsupportedIndent" xml:space="preserve">
<value>Indentation is not supported by '{0}'.</value>
</data>
- <data name="TaskExtensions_Catch_CannotReturnNull" xml:space="preserve">
- <value>The return value from a Catch() lambda cannot return null.</value>
- <comment>TaskExtensions_Catch_CannotReturnNull description</comment>
- </data>
<data name="MediaTypeFormatterCannotRead" xml:space="preserve">
<value>The media type formatter of type '{0}' does not support reading since it does not implement the ReadFromStreamAsync method.</value>
</data>
diff --git a/src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj b/src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj
index fcd5e705..bbe0511e 100644
--- a/src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj
+++ b/src/System.Net.Http.Formatting/System.Net.Http.Formatting.csproj
@@ -66,6 +66,15 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
+ </Compile>
<Compile Include="..\RS.cs">
<Link>RS.cs</Link>
</Compile>
@@ -82,6 +91,7 @@
<Compile Include="Formatting\IFormatterLogger.cs" />
<Compile Include="Formatting\IRequiredMemberSelector.cs" />
<Compile Include="HttpClientExtensions.cs" />
+ <Compile Include="HttpRequestMessageExtensions.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
@@ -141,10 +151,23 @@
<Compile Include="MultipartMemoryStreamProvider.cs" />
<Compile Include="ObjectContent.cs" />
<Compile Include="Formatting\Parsers\ParserState.cs" />
- <Compile Include="Internal\TaskHelpers.cs" />
<Compile Include="UriExtensions.cs" />
<Compile Include="Internal\UriQueryUtility.cs" />
- <Compile Include="Internal\TaskExtensions.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
diff --git a/src/System.Web.Http.Common/GlobalSuppressions.cs b/src/System.Web.Http.Common/GlobalSuppressions.cs
deleted file mode 100644
index 6b0d4e59..00000000
--- a/src/System.Web.Http.Common/GlobalSuppressions.cs
+++ /dev/null
@@ -1,5 +0,0 @@
-using System.Diagnostics.CodeAnalysis;
-
-[assembly: SuppressMessage("Microsoft.Design", "CA2210:AssembliesShouldHaveValidStrongNames", Justification = "Will be signed")]
-[assembly: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Web.Http")]
-[assembly: SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "System.Web.Http.Common")]
diff --git a/src/System.Web.Http.Common/Properties/AssemblyInfo.cs b/src/System.Web.Http.Common/Properties/AssemblyInfo.cs
deleted file mode 100644
index 56b085e1..00000000
--- a/src/System.Web.Http.Common/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-
-[assembly: AssemblyTitle("System.Web.Http.Common")]
-[assembly: AssemblyDescription("")]
-[assembly: InternalsVisibleTo("System.Web.Http, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Http.Common.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Http.SelfHost, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Http.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Http.WebHost, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Mvc, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
-[assembly: InternalsVisibleTo("System.Web.Mvc.Test, PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")]
diff --git a/src/System.Web.Http.Common/System.Web.Http.Common.csproj b/src/System.Web.Http.Common/System.Web.Http.Common.csproj
deleted file mode 100644
index 48f723d8..00000000
--- a/src/System.Web.Http.Common/System.Web.Http.Common.csproj
+++ /dev/null
@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <CodeAnalysis Condition=" '$(CodeAnalysis)' == '' ">false</CodeAnalysis>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web.Http.Common</RootNamespace>
- <AssemblyName>System.Web.Http.Common</AssemblyName>
- <FileAlignment>512</FileAlignment>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>..\..\bin\Debug\</OutputPath>
- <DefineConstants>TRACE;DEBUG;ASPNETMVC</DefineConstants>
- <CodeAnalysisRuleSet>..\Strict.ruleset</CodeAnalysisRuleSet>
- <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
- <NoWarn>1591</NoWarn>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>..\..\bin\Release\</OutputPath>
- <DefineConstants>TRACE;ASPNETMVC</DefineConstants>
- <CodeAnalysisRuleSet>..\Strict.ruleset</CodeAnalysisRuleSet>
- <RunCodeAnalysis>$(CodeAnalysis)</RunCodeAnalysis>
- <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
- <NoWarn>1591</NoWarn>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'CodeCoverage|AnyCPU'">
- <DebugSymbols>true</DebugSymbols>
- <OutputPath>..\..\bin\CodeCoverage\</OutputPath>
- <DefineConstants>TRACE;DEBUG;CODE_COVERAGE;ASPNETMVC</DefineConstants>
- <DebugType>full</DebugType>
- <CodeAnalysisRuleSet>..\Strict.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Net.Http">
- <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20302.1\lib\net40\System.Net.Http.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http.WebRequest">
- <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20302.1\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="..\CommonAssemblyInfo.cs">
- <Link>Properties\CommonAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="..\TransparentCommonAssemblyInfo.cs">
- <Link>Properties\TransparentCommonAssemblyInfo.cs</Link>
- </Compile>
- <Compile Include="Error.cs" />
- <Compile Include="GlobalSuppressions.cs" />
- <Compile Include="HttpMethodHelper.cs" />
- <Compile Include="HttpRequestMessageCommonExtensions.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- <Compile Include="Properties\SRResources.Designer.cs">
- <AutoGen>True</AutoGen>
- <DesignTime>True</DesignTime>
- <DependentUpon>SRResources.resx</DependentUpon>
- </Compile>
- <Compile Include="TaskHelpersExtensions.cs" />
- <Compile Include="TaskHelpers.cs" />
- <Compile Include="RouteParameter.cs" />
- </ItemGroup>
- <ItemGroup>
- <EmbeddedResource Include="Properties\SRResources.resx">
- <Generator>ResXFileCodeGenerator</Generator>
- <LastGenOutput>SRResources.Designer.cs</LastGenOutput>
- </EmbeddedResource>
- </ItemGroup>
- <ItemGroup>
- <CodeAnalysisDictionary Include="..\CodeAnalysisDictionary.xml">
- <Link>CodeAnalysisDictionary.xml</Link>
- </CodeAnalysisDictionary>
- </ItemGroup>
- <ItemGroup>
- <None Include="packages.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project> \ No newline at end of file
diff --git a/src/System.Web.Http.Common/packages.config b/src/System.Web.Http.Common/packages.config
deleted file mode 100644
index c611f43d..00000000
--- a/src/System.Web.Http.Common/packages.config
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Microsoft.Net.Http" version="2.0.20302.1" />
-</packages> \ No newline at end of file
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpBinding.cs b/src/System.Web.Http.SelfHost/Channels/HttpBinding.cs
index 730453d8..01e0d457 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpBinding.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpBinding.cs
@@ -2,7 +2,6 @@ using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.ServiceModel;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.ServiceModel;
using System.Web.Http.SelfHost.ServiceModel.Channels;
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpBindingSecurityModeHelper.cs b/src/System.Web.Http.SelfHost/Channels/HttpBindingSecurityModeHelper.cs
index d5e9b3c3..768e40d9 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpBindingSecurityModeHelper.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpBindingSecurityModeHelper.cs
@@ -1,5 +1,4 @@
using System.ComponentModel;
-using System.Web.Http.Common;
namespace System.Web.Http.SelfHost.Channels
{
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpMessage.cs b/src/System.Web.Http.SelfHost/Channels/HttpMessage.cs
index 2d57987c..b269ee8e 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpMessage.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpMessage.cs
@@ -1,7 +1,6 @@
using System.Diagnostics.Contracts;
using System.Net.Http;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
using System.Xml;
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncoderFactory.cs b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncoderFactory.cs
index 029a29be..7cc41b60 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncoderFactory.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncoderFactory.cs
@@ -4,7 +4,6 @@ using System.IO;
using System.Net.Http;
using System.ServiceModel;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
using System.Web.Http.SelfHost.ServiceModel.Channels;
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingBindingElement.cs b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingBindingElement.cs
index 6c6d8e5b..11770379 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingBindingElement.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingBindingElement.cs
@@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.Channels
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingRequestContext.cs b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingRequestContext.cs
index 230b18c7..13415c88 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingRequestContext.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpMessageEncodingRequestContext.cs
@@ -6,7 +6,6 @@ using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.Channels
diff --git a/src/System.Web.Http.SelfHost/Channels/HttpMessageExtensions.cs b/src/System.Web.Http.SelfHost/Channels/HttpMessageExtensions.cs
index e68aee60..47916eca 100644
--- a/src/System.Web.Http.SelfHost/Channels/HttpMessageExtensions.cs
+++ b/src/System.Web.Http.SelfHost/Channels/HttpMessageExtensions.cs
@@ -1,6 +1,5 @@
using System.Net.Http;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
namespace System.Web.Http.SelfHost.Channels
{
diff --git a/src/System.Web.Http.SelfHost/HttpSelfHostConfiguration.cs b/src/System.Web.Http.SelfHost/HttpSelfHostConfiguration.cs
index b1ef8bff..53564a9e 100644
--- a/src/System.Web.Http.SelfHost/HttpSelfHostConfiguration.cs
+++ b/src/System.Web.Http.SelfHost/HttpSelfHostConfiguration.cs
@@ -4,7 +4,6 @@ using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Description;
using System.ServiceModel.Security;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Channels;
using System.Web.Http.SelfHost.Properties;
using System.Web.Http.SelfHost.ServiceModel;
diff --git a/src/System.Web.Http.SelfHost/HttpSelfHostServer.cs b/src/System.Web.Http.SelfHost/HttpSelfHostServer.cs
index e9b427fe..9a86f418 100644
--- a/src/System.Web.Http.SelfHost/HttpSelfHostServer.cs
+++ b/src/System.Web.Http.SelfHost/HttpSelfHostServer.cs
@@ -9,7 +9,6 @@ using System.ServiceModel.Channels;
using System.ServiceModel.Security;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Hosting;
using System.Web.Http.SelfHost.Channels;
using System.Web.Http.SelfHost.Properties;
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/Channels/AsyncResult.cs b/src/System.Web.Http.SelfHost/ServiceModel/Channels/AsyncResult.cs
index c43dc1ea..cbf0ce88 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/Channels/AsyncResult.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/Channels/AsyncResult.cs
@@ -2,7 +2,6 @@ using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.ServiceModel.Channels
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferManagerOutputStream.cs b/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferManagerOutputStream.cs
index 04644829..cbdaec5f 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferManagerOutputStream.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferManagerOutputStream.cs
@@ -1,7 +1,6 @@
using System.Diagnostics;
using System.ServiceModel;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
namespace System.Web.Http.SelfHost.ServiceModel.Channels
{
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferedOutputStream.cs b/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferedOutputStream.cs
index 4d26d5fb..bcabdc21 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferedOutputStream.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/Channels/BufferedOutputStream.cs
@@ -1,7 +1,6 @@
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.IO;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.ServiceModel.Channels
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/Channels/InternalBufferManager.cs b/src/System.Web.Http.SelfHost/ServiceModel/Channels/InternalBufferManager.cs
index 680ca90f..bfec0f64 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/Channels/InternalBufferManager.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/Channels/InternalBufferManager.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics;
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.ServiceModel.Channels
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/Channels/LayeredChannelListener.cs b/src/System.Web.Http.SelfHost/ServiceModel/Channels/LayeredChannelListener.cs
index d2b10dfe..74837317 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/Channels/LayeredChannelListener.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/Channels/LayeredChannelListener.cs
@@ -1,7 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.ServiceModel;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.ServiceModel.Channels
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/HostNameComparisonModeHelper.cs b/src/System.Web.Http.SelfHost/ServiceModel/HostNameComparisonModeHelper.cs
index 97d503ca..3ba50fb7 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/HostNameComparisonModeHelper.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/HostNameComparisonModeHelper.cs
@@ -1,5 +1,4 @@
using System.ServiceModel;
-using System.Web.Http.Common;
namespace System.Web.Http.SelfHost.ServiceModel
{
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/HttpTransportSecurityExtensionMethods.cs b/src/System.Web.Http.SelfHost/ServiceModel/HttpTransportSecurityExtensionMethods.cs
index 55751cb8..d055a10d 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/HttpTransportSecurityExtensionMethods.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/HttpTransportSecurityExtensionMethods.cs
@@ -2,7 +2,6 @@
using System.Net;
using System.ServiceModel;
using System.ServiceModel.Channels;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost.Properties;
namespace System.Web.Http.SelfHost.ServiceModel
diff --git a/src/System.Web.Http.SelfHost/ServiceModel/TransferModeHelper.cs b/src/System.Web.Http.SelfHost/ServiceModel/TransferModeHelper.cs
index cc5be6d1..13da78cf 100644
--- a/src/System.Web.Http.SelfHost/ServiceModel/TransferModeHelper.cs
+++ b/src/System.Web.Http.SelfHost/ServiceModel/TransferModeHelper.cs
@@ -1,5 +1,4 @@
using System.ServiceModel;
-using System.Web.Http.Common;
namespace System.Web.Http.SelfHost.ServiceModel
{
diff --git a/src/System.Web.Http.SelfHost/System.Web.Http.SelfHost.csproj b/src/System.Web.Http.SelfHost/System.Web.Http.SelfHost.csproj
index 7c63a859..0fb9b5f1 100644
--- a/src/System.Web.Http.SelfHost/System.Web.Http.SelfHost.csproj
+++ b/src/System.Web.Http.SelfHost/System.Web.Http.SelfHost.csproj
@@ -63,6 +63,18 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\HttpMethodHelper.cs">
+ <Link>Common\HttpMethodHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
+ </Compile>
<Compile Include="..\TransparentCommonAssemblyInfo.cs">
<Link>Properties\TransparentCommonAssemblyInfo.cs</Link>
</Compile>
@@ -108,15 +120,30 @@
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Properties\SRResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SRResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
+ <ProjectReference Include="..\System.Net.Http.Formatting\System.Net.Http.Formatting.csproj">
+ <Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
+ <Name>System.Net.Http.Formatting</Name>
</ProjectReference>
<ProjectReference Include="..\System.Web.Http\System.Web.Http.csproj">
<Project>{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440}</Project>
diff --git a/src/System.Web.Http.WebHost/HttpControllerHandler.cs b/src/System.Web.Http.WebHost/HttpControllerHandler.cs
index b3b704b2..fa610cee 100644
--- a/src/System.Web.Http.WebHost/HttpControllerHandler.cs
+++ b/src/System.Web.Http.WebHost/HttpControllerHandler.cs
@@ -4,7 +4,6 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Hosting;
using System.Web.Http.Routing;
using System.Web.Http.WebHost.Properties;
diff --git a/src/System.Web.Http.WebHost/RouteCollectionExtensions.cs b/src/System.Web.Http.WebHost/RouteCollectionExtensions.cs
index aa0fe0f0..acdbcd0f 100644
--- a/src/System.Web.Http.WebHost/RouteCollectionExtensions.cs
+++ b/src/System.Web.Http.WebHost/RouteCollectionExtensions.cs
@@ -1,5 +1,4 @@
using System.ComponentModel;
-using System.Web.Http.Common;
using System.Web.Http.WebHost;
using System.Web.Http.WebHost.Routing;
using System.Web.Routing;
diff --git a/src/System.Web.Http.WebHost/Routing/HostedHttpRoute.cs b/src/System.Web.Http.WebHost/Routing/HostedHttpRoute.cs
index 9a85c0ca..d3b4f186 100644
--- a/src/System.Web.Http.WebHost/Routing/HostedHttpRoute.cs
+++ b/src/System.Web.Http.WebHost/Routing/HostedHttpRoute.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Routing;
using System.Web.Routing;
diff --git a/src/System.Web.Http.WebHost/Routing/HostedHttpRouteCollection.cs b/src/System.Web.Http.WebHost/Routing/HostedHttpRouteCollection.cs
index b6d081bb..35caa647 100644
--- a/src/System.Web.Http.WebHost/Routing/HostedHttpRouteCollection.cs
+++ b/src/System.Web.Http.WebHost/Routing/HostedHttpRouteCollection.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Net.Http;
using System.Web.Hosting;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Routing;
using System.Web.Http.WebHost.Properties;
diff --git a/src/System.Web.Http.WebHost/Routing/HostedHttpRouteData.cs b/src/System.Web.Http.WebHost/Routing/HostedHttpRouteData.cs
index 5cc9eb18..8611fe91 100644
--- a/src/System.Web.Http.WebHost/Routing/HostedHttpRouteData.cs
+++ b/src/System.Web.Http.WebHost/Routing/HostedHttpRouteData.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Web.Http.Common;
using System.Web.Http.Routing;
using System.Web.Routing;
diff --git a/src/System.Web.Http.WebHost/Routing/HostedHttpVirtualPathData.cs b/src/System.Web.Http.WebHost/Routing/HostedHttpVirtualPathData.cs
index 13fce709..3e305937 100644
--- a/src/System.Web.Http.WebHost/Routing/HostedHttpVirtualPathData.cs
+++ b/src/System.Web.Http.WebHost/Routing/HostedHttpVirtualPathData.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Routing;
+using System.Web.Http.Routing;
using System.Web.Routing;
namespace System.Web.Http.WebHost.Routing
diff --git a/src/System.Web.Http.WebHost/Routing/HttpRouteDataExtensions.cs b/src/System.Web.Http.WebHost/Routing/HttpRouteDataExtensions.cs
index 9022f0ff..24ef3904 100644
--- a/src/System.Web.Http.WebHost/Routing/HttpRouteDataExtensions.cs
+++ b/src/System.Web.Http.WebHost/Routing/HttpRouteDataExtensions.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Routing;
+using System.Web.Http.Routing;
using System.Web.Routing;
namespace System.Web.Http.WebHost.Routing
diff --git a/src/System.Web.Http.WebHost/Routing/HttpRouteExtensions.cs b/src/System.Web.Http.WebHost/Routing/HttpRouteExtensions.cs
index c50fc304..8a7eae45 100644
--- a/src/System.Web.Http.WebHost/Routing/HttpRouteExtensions.cs
+++ b/src/System.Web.Http.WebHost/Routing/HttpRouteExtensions.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Routing;
+using System.Web.Http.Routing;
using System.Web.Routing;
namespace System.Web.Http.WebHost.Routing
diff --git a/src/System.Web.Http.WebHost/System.Web.Http.WebHost.csproj b/src/System.Web.Http.WebHost/System.Web.Http.WebHost.csproj
index 13adb3b7..7340b740 100644
--- a/src/System.Web.Http.WebHost/System.Web.Http.WebHost.csproj
+++ b/src/System.Web.Http.WebHost/System.Web.Http.WebHost.csproj
@@ -60,6 +60,18 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\HttpMethodHelper.cs">
+ <Link>Common\HttpMethodHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
+ </Compile>
<Compile Include="Routing\HostedHttpRouteCollection.cs" />
<Compile Include="Routing\HostedHttpRoute.cs" />
<Compile Include="Routing\HostedHttpRouteData.cs" />
@@ -91,16 +103,27 @@
<Compile Include="TaskWrapperAsyncResult.cs" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Properties\SRResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SRResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
- <ProjectReference Include="..\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\System.Web.Http\System.Web.Http.csproj">
<Project>{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440}</Project>
<Name>System.Web.Http</Name>
diff --git a/src/System.Web.Http.WebHost/TaskWrapperAsyncResult.cs b/src/System.Web.Http.WebHost/TaskWrapperAsyncResult.cs
index be0bd8bb..7a5b59d5 100644
--- a/src/System.Web.Http.WebHost/TaskWrapperAsyncResult.cs
+++ b/src/System.Web.Http.WebHost/TaskWrapperAsyncResult.cs
@@ -1,6 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
namespace System.Web.Http.WebHost
{
diff --git a/src/System.Web.Http/AcceptVerbsAttribute.cs b/src/System.Web.Http/AcceptVerbsAttribute.cs
index 0625ab2a..118c4588 100644
--- a/src/System.Web.Http/AcceptVerbsAttribute.cs
+++ b/src/System.Web.Http/AcceptVerbsAttribute.cs
@@ -3,7 +3,6 @@ using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http
diff --git a/src/System.Web.Http/ApiController.cs b/src/System.Web.Http/ApiController.cs
index 53a42d7b..4a19627b 100644
--- a/src/System.Web.Http/ApiController.cs
+++ b/src/System.Web.Http/ApiController.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;
using System.Web.Http.Filters;
diff --git a/src/System.Web.Http/AuthorizeAttribute.cs b/src/System.Web.Http/AuthorizeAttribute.cs
index 56474a7f..4c6559a5 100644
--- a/src/System.Web.Http/AuthorizeAttribute.cs
+++ b/src/System.Web.Http/AuthorizeAttribute.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Net;
using System.Net.Http;
using System.Security.Principal;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
diff --git a/src/System.Web.Http/Controllers/ApiControllerActionInvoker.cs b/src/System.Web.Http/Controllers/ApiControllerActionInvoker.cs
index 22af8e8d..19195e13 100644
--- a/src/System.Web.Http/Controllers/ApiControllerActionInvoker.cs
+++ b/src/System.Web.Http/Controllers/ApiControllerActionInvoker.cs
@@ -3,7 +3,6 @@ using System.Diagnostics.Contracts;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
namespace System.Web.Http.Controllers
{
diff --git a/src/System.Web.Http/Controllers/ApiControllerActionSelector.cs b/src/System.Web.Http/Controllers/ApiControllerActionSelector.cs
index 97535321..2eba7b0f 100644
--- a/src/System.Web.Http/Controllers/ApiControllerActionSelector.cs
+++ b/src/System.Web.Http/Controllers/ApiControllerActionSelector.cs
@@ -7,7 +7,6 @@ using System.Net.Http;
using System.Reflection;
using System.Text;
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Controllers/HttpActionContext.cs b/src/System.Web.Http/Controllers/HttpActionContext.cs
index f5bf9375..42c58c81 100644
--- a/src/System.Web.Http/Controllers/HttpActionContext.cs
+++ b/src/System.Web.Http/Controllers/HttpActionContext.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.ModelBinding;
namespace System.Web.Http.Controllers
diff --git a/src/System.Web.Http/Controllers/HttpActionContextExtensions.cs b/src/System.Web.Http/Controllers/HttpActionContextExtensions.cs
index 4e20a6b4..2afa2fbb 100644
--- a/src/System.Web.Http/Controllers/HttpActionContextExtensions.cs
+++ b/src/System.Web.Http/Controllers/HttpActionContextExtensions.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Controllers/HttpActionDescriptor.cs b/src/System.Web.Http/Controllers/HttpActionDescriptor.cs
index a0d0cee9..d04543cb 100644
--- a/src/System.Web.Http/Controllers/HttpActionDescriptor.cs
+++ b/src/System.Web.Http/Controllers/HttpActionDescriptor.cs
@@ -5,7 +5,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Filters;
namespace System.Web.Http.Controllers
diff --git a/src/System.Web.Http/Controllers/HttpControllerContext.cs b/src/System.Web.Http/Controllers/HttpControllerContext.cs
index c5f25e78..d0dfd4c0 100644
--- a/src/System.Web.Http/Controllers/HttpControllerContext.cs
+++ b/src/System.Web.Http/Controllers/HttpControllerContext.cs
@@ -1,5 +1,4 @@
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Routing;
namespace System.Web.Http.Controllers
diff --git a/src/System.Web.Http/Controllers/HttpControllerDescriptor.cs b/src/System.Web.Http/Controllers/HttpControllerDescriptor.cs
index 266e2d59..03d4a790 100644
--- a/src/System.Web.Http/Controllers/HttpControllerDescriptor.cs
+++ b/src/System.Web.Http/Controllers/HttpControllerDescriptor.cs
@@ -4,7 +4,6 @@ using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Dispatcher;
using System.Web.Http.Filters;
using System.Web.Http.Internal;
diff --git a/src/System.Web.Http/Controllers/HttpParameterDescriptor.cs b/src/System.Web.Http/Controllers/HttpParameterDescriptor.cs
index e724cc59..a2bdd1a5 100644
--- a/src/System.Web.Http/Controllers/HttpParameterDescriptor.cs
+++ b/src/System.Web.Http/Controllers/HttpParameterDescriptor.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Controllers/ReflectedHttpActionDescriptor.cs b/src/System.Web.Http/Controllers/ReflectedHttpActionDescriptor.cs
index b9c0ffa0..28b13f48 100644
--- a/src/System.Web.Http/Controllers/ReflectedHttpActionDescriptor.cs
+++ b/src/System.Web.Http/Controllers/ReflectedHttpActionDescriptor.cs
@@ -7,7 +7,6 @@ using System.Linq.Expressions;
using System.Net;
using System.Net.Http;
using System.Reflection;
-using System.Web.Http.Common;
using System.Web.Http.Filters;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Controllers/ReflectedHttpParameterDescriptor.cs b/src/System.Web.Http/Controllers/ReflectedHttpParameterDescriptor.cs
index c033ee0c..2ca61ff3 100644
--- a/src/System.Web.Http/Controllers/ReflectedHttpParameterDescriptor.cs
+++ b/src/System.Web.Http/Controllers/ReflectedHttpParameterDescriptor.cs
@@ -2,7 +2,6 @@
using System.Collections.ObjectModel;
using System.Linq;
using System.Reflection;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
namespace System.Web.Http.Controllers
diff --git a/src/System.Web.Http/DependencyResolverExtensions.cs b/src/System.Web.Http/DependencyResolverExtensions.cs
index 048a7649..63029388 100644
--- a/src/System.Web.Http/DependencyResolverExtensions.cs
+++ b/src/System.Web.Http/DependencyResolverExtensions.cs
@@ -2,7 +2,6 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Description;
using System.Web.Http.Dispatcher;
diff --git a/src/System.Web.Http/Description/ApiExplorer.cs b/src/System.Web.Http/Description/ApiExplorer.cs
index 64e462f8..623281ea 100644
--- a/src/System.Web.Http/Description/ApiExplorer.cs
+++ b/src/System.Web.Http/Description/ApiExplorer.cs
@@ -6,7 +6,6 @@ using System.Linq;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Text.RegularExpressions;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;
using System.Web.Http.Internal;
diff --git a/src/System.Web.Http/DictionaryExtensions.cs b/src/System.Web.Http/DictionaryExtensions.cs
index 3ff3fd22..23d6d7a1 100644
--- a/src/System.Web.Http/DictionaryExtensions.cs
+++ b/src/System.Web.Http/DictionaryExtensions.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.Contracts;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http
diff --git a/src/System.Web.Http/Dispatcher/DefaultHttpControllerActivator.cs b/src/System.Web.Http/Dispatcher/DefaultHttpControllerActivator.cs
index 4d2adf31..5bd3d836 100644
--- a/src/System.Web.Http/Dispatcher/DefaultHttpControllerActivator.cs
+++ b/src/System.Web.Http/Dispatcher/DefaultHttpControllerActivator.cs
@@ -1,5 +1,4 @@
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Dispatcher/DefaultHttpControllerFactory.cs b/src/System.Web.Http/Dispatcher/DefaultHttpControllerFactory.cs
index ec7eaca3..844396d0 100644
--- a/src/System.Web.Http/Dispatcher/DefaultHttpControllerFactory.cs
+++ b/src/System.Web.Http/Dispatcher/DefaultHttpControllerFactory.cs
@@ -5,7 +5,6 @@ using System.Diagnostics.Contracts;
using System.Linq;
using System.Net;
using System.Text;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
using System.Web.Http.Routing;
diff --git a/src/System.Web.Http/Dispatcher/HttpControllerDispatcher.cs b/src/System.Web.Http/Dispatcher/HttpControllerDispatcher.cs
index abb9579b..85933a01 100644
--- a/src/System.Web.Http/Dispatcher/HttpControllerDispatcher.cs
+++ b/src/System.Web.Http/Dispatcher/HttpControllerDispatcher.cs
@@ -5,7 +5,6 @@ using System.Net;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Hosting;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Dispatcher/HttpControllerTypeCache.cs b/src/System.Web.Http/Dispatcher/HttpControllerTypeCache.cs
index ce346567..c38876d4 100644
--- a/src/System.Web.Http/Dispatcher/HttpControllerTypeCache.cs
+++ b/src/System.Web.Http/Dispatcher/HttpControllerTypeCache.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
namespace System.Web.Http.Dispatcher
diff --git a/src/System.Web.Http/Dispatcher/HttpControllerTypeCacheUtil.cs b/src/System.Web.Http/Dispatcher/HttpControllerTypeCacheUtil.cs
index 123256b3..cf12d7d4 100644
--- a/src/System.Web.Http/Dispatcher/HttpControllerTypeCacheUtil.cs
+++ b/src/System.Web.Http/Dispatcher/HttpControllerTypeCacheUtil.cs
@@ -4,7 +4,6 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.Linq;
using System.Reflection;
-using System.Web.Http.Common;
namespace System.Web.Http.Dispatcher
{
diff --git a/src/System.Web.Http/Filters/ActionDescriptorFilterProvider.cs b/src/System.Web.Http/Filters/ActionDescriptorFilterProvider.cs
index d0cad469..e8f0d8e7 100644
--- a/src/System.Web.Http/Filters/ActionDescriptorFilterProvider.cs
+++ b/src/System.Web.Http/Filters/ActionDescriptorFilterProvider.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Filters
diff --git a/src/System.Web.Http/Filters/ActionFilterAttribute.cs b/src/System.Web.Http/Filters/ActionFilterAttribute.cs
index c970893c..2c66c74b 100644
--- a/src/System.Web.Http/Filters/ActionFilterAttribute.cs
+++ b/src/System.Web.Http/Filters/ActionFilterAttribute.cs
@@ -3,7 +3,6 @@ using System.Diagnostics.Contracts;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Filters/AuthorizationFilterAttribute.cs b/src/System.Web.Http/Filters/AuthorizationFilterAttribute.cs
index 9b632118..1ec95342 100644
--- a/src/System.Web.Http/Filters/AuthorizationFilterAttribute.cs
+++ b/src/System.Web.Http/Filters/AuthorizationFilterAttribute.cs
@@ -2,7 +2,6 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Filters
diff --git a/src/System.Web.Http/Filters/ConfigurationFilterProvider.cs b/src/System.Web.Http/Filters/ConfigurationFilterProvider.cs
index 14160a05..1a82b815 100644
--- a/src/System.Web.Http/Filters/ConfigurationFilterProvider.cs
+++ b/src/System.Web.Http/Filters/ConfigurationFilterProvider.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Filters
diff --git a/src/System.Web.Http/Filters/EnumerableEvaluatorFilter.cs b/src/System.Web.Http/Filters/EnumerableEvaluatorFilter.cs
index e13b51c9..5477a3b9 100644
--- a/src/System.Web.Http/Filters/EnumerableEvaluatorFilter.cs
+++ b/src/System.Web.Http/Filters/EnumerableEvaluatorFilter.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Net.Http;
using System.Reflection;
using System.Runtime.CompilerServices;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
diff --git a/src/System.Web.Http/Filters/EnumerableEvaluatorFilterProvider.cs b/src/System.Web.Http/Filters/EnumerableEvaluatorFilterProvider.cs
index 46809bd9..04858345 100644
--- a/src/System.Web.Http/Filters/EnumerableEvaluatorFilterProvider.cs
+++ b/src/System.Web.Http/Filters/EnumerableEvaluatorFilterProvider.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
diff --git a/src/System.Web.Http/Filters/ExceptionFilterAttribute.cs b/src/System.Web.Http/Filters/ExceptionFilterAttribute.cs
index 75a3bddc..5b922e51 100644
--- a/src/System.Web.Http/Filters/ExceptionFilterAttribute.cs
+++ b/src/System.Web.Http/Filters/ExceptionFilterAttribute.cs
@@ -1,6 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
namespace System.Web.Http.Filters
{
diff --git a/src/System.Web.Http/Filters/FilterInfo.cs b/src/System.Web.Http/Filters/FilterInfo.cs
index 2d3bb236..ac4bf3cd 100644
--- a/src/System.Web.Http/Filters/FilterInfo.cs
+++ b/src/System.Web.Http/Filters/FilterInfo.cs
@@ -1,6 +1,4 @@
-using System.Web.Http.Common;
-
-namespace System.Web.Http.Filters
+namespace System.Web.Http.Filters
{
public sealed class FilterInfo
{
diff --git a/src/System.Web.Http/Filters/HttpActionExecutedContext.cs b/src/System.Web.Http/Filters/HttpActionExecutedContext.cs
index f98d9ead..3ef81473 100644
--- a/src/System.Web.Http/Filters/HttpActionExecutedContext.cs
+++ b/src/System.Web.Http/Filters/HttpActionExecutedContext.cs
@@ -1,5 +1,4 @@
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Filters
diff --git a/src/System.Web.Http/Filters/HttpFilterCollection.cs b/src/System.Web.Http/Filters/HttpFilterCollection.cs
index 8819463f..aa5c11e4 100644
--- a/src/System.Web.Http/Filters/HttpFilterCollection.cs
+++ b/src/System.Web.Http/Filters/HttpFilterCollection.cs
@@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
namespace System.Web.Http.Filters
{
diff --git a/src/System.Web.Http/Filters/QueryCompositionFilterAttribute.cs b/src/System.Web.Http/Filters/QueryCompositionFilterAttribute.cs
index bd40c27c..0efb8816 100644
--- a/src/System.Web.Http/Filters/QueryCompositionFilterAttribute.cs
+++ b/src/System.Web.Http/Filters/QueryCompositionFilterAttribute.cs
@@ -3,7 +3,6 @@ using System.Diagnostics.Contracts;
using System.Linq;
using System.Net;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
using System.Web.Http.Query;
diff --git a/src/System.Web.Http/Hosting/HttpPipelineFactory.cs b/src/System.Web.Http/Hosting/HttpPipelineFactory.cs
index 0e3b05f0..2c59a8f5 100644
--- a/src/System.Web.Http/Hosting/HttpPipelineFactory.cs
+++ b/src/System.Web.Http/Hosting/HttpPipelineFactory.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Hosting
diff --git a/src/System.Web.Http/HttpConfiguration.cs b/src/System.Web.Http/HttpConfiguration.cs
index 8b65a42e..138cbbc2 100644
--- a/src/System.Web.Http/HttpConfiguration.cs
+++ b/src/System.Web.Http/HttpConfiguration.cs
@@ -3,7 +3,6 @@ using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.Filters;
using System.Web.Http.ModelBinding;
using System.Web.Http.Services;
diff --git a/src/System.Web.Http/HttpRequestMessageExtensions.cs b/src/System.Web.Http/HttpRequestMessageExtensions.cs
index bdeb5beb..09891ee1 100644
--- a/src/System.Web.Http/HttpRequestMessageExtensions.cs
+++ b/src/System.Web.Http/HttpRequestMessageExtensions.cs
@@ -7,7 +7,6 @@ using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Security.Principal;
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.Hosting;
using System.Web.Http.Properties;
using System.Web.Http.Routing;
diff --git a/src/System.Web.Http/HttpResponseException.cs b/src/System.Web.Http/HttpResponseException.cs
index 4ce88ac1..4a5b798e 100644
--- a/src/System.Web.Http/HttpResponseException.cs
+++ b/src/System.Web.Http/HttpResponseException.cs
@@ -1,6 +1,5 @@
using System.Diagnostics.CodeAnalysis;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http
diff --git a/src/System.Web.Http/HttpResponseMessageExtensions.cs b/src/System.Web.Http/HttpResponseMessageExtensions.cs
index 5557e78b..fe9b17bf 100644
--- a/src/System.Web.Http/HttpResponseMessageExtensions.cs
+++ b/src/System.Web.Http/HttpResponseMessageExtensions.cs
@@ -1,6 +1,5 @@
using System.ComponentModel;
using System.Net.Http;
-using System.Web.Http.Common;
namespace System.Web.Http
{
diff --git a/src/System.Web.Http/HttpRouteCollection.cs b/src/System.Web.Http/HttpRouteCollection.cs
index bb6e817b..30613bfb 100644
--- a/src/System.Web.Http/HttpRouteCollection.cs
+++ b/src/System.Web.Http/HttpRouteCollection.cs
@@ -5,7 +5,6 @@ using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
using System.Web.Http.Routing;
diff --git a/src/System.Web.Http/HttpRouteCollectionExtensions.cs b/src/System.Web.Http/HttpRouteCollectionExtensions.cs
index 20440b86..38112e60 100644
--- a/src/System.Web.Http/HttpRouteCollectionExtensions.cs
+++ b/src/System.Web.Http/HttpRouteCollectionExtensions.cs
@@ -1,5 +1,4 @@
using System.ComponentModel;
-using System.Web.Http.Common;
using System.Web.Http.Routing;
namespace System.Web.Http
diff --git a/src/System.Web.Http/HttpServer.cs b/src/System.Web.Http/HttpServer.cs
index 716c9c41..a874ad57 100644
--- a/src/System.Web.Http/HttpServer.cs
+++ b/src/System.Web.Http/HttpServer.cs
@@ -6,7 +6,6 @@ using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Dispatcher;
using System.Web.Http.Hosting;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/Internal/HttpActionContextExtensions.cs b/src/System.Web.Http/Internal/HttpActionContextExtensions.cs
index 93a35140..df0cffa9 100644
--- a/src/System.Web.Http/Internal/HttpActionContextExtensions.cs
+++ b/src/System.Web.Http/Internal/HttpActionContextExtensions.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Controllers;
+using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Internal/MemberInfoExtensions.cs b/src/System.Web.Http/Internal/MemberInfoExtensions.cs
index 6f874bf7..708ffc1f 100644
--- a/src/System.Web.Http/Internal/MemberInfoExtensions.cs
+++ b/src/System.Web.Http/Internal/MemberInfoExtensions.cs
@@ -1,5 +1,4 @@
using System.Reflection;
-using System.Web.Http.Common;
namespace System.Web.Http.Internal
{
diff --git a/src/System.Web.Http/Internal/ParameterInfoExtensions.cs b/src/System.Web.Http/Internal/ParameterInfoExtensions.cs
index baeea9b7..ceeddb9a 100644
--- a/src/System.Web.Http/Internal/ParameterInfoExtensions.cs
+++ b/src/System.Web.Http/Internal/ParameterInfoExtensions.cs
@@ -1,6 +1,5 @@
using System.ComponentModel;
using System.Reflection;
-using System.Web.Http.Common;
namespace System.Web.Http.Internal
{
diff --git a/src/System.Web.Http/Internal/TypeHelper.cs b/src/System.Web.Http/Internal/TypeHelper.cs
index 2013b17a..59707ff8 100644
--- a/src/System.Web.Http/Internal/TypeHelper.cs
+++ b/src/System.Web.Http/Internal/TypeHelper.cs
@@ -6,7 +6,6 @@ using System.Diagnostics.Contracts;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Metadata/ModelMetadata.cs b/src/System.Web.Http/Metadata/ModelMetadata.cs
index ea880191..2e64f22c 100644
--- a/src/System.Web.Http/Metadata/ModelMetadata.cs
+++ b/src/System.Web.Http/Metadata/ModelMetadata.cs
@@ -3,7 +3,6 @@ using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Validation;
diff --git a/src/System.Web.Http/Metadata/Providers/AssociatedMetadataProvider.cs b/src/System.Web.Http/Metadata/Providers/AssociatedMetadataProvider.cs
index 3e4276df..92ba2a67 100644
--- a/src/System.Web.Http/Metadata/Providers/AssociatedMetadataProvider.cs
+++ b/src/System.Web.Http/Metadata/Providers/AssociatedMetadataProvider.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Metadata/Providers/CachedDataAnnotationsModelMetadata.cs b/src/System.Web.Http/Metadata/Providers/CachedDataAnnotationsModelMetadata.cs
index 913966b0..8abae19c 100644
--- a/src/System.Web.Http/Metadata/Providers/CachedDataAnnotationsModelMetadata.cs
+++ b/src/System.Web.Http/Metadata/Providers/CachedDataAnnotationsModelMetadata.cs
@@ -3,7 +3,6 @@ using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Reflection;
using System.Security;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ModelBinding/Binders/ComplexModelDto.cs b/src/System.Web.Http/ModelBinding/Binders/ComplexModelDto.cs
index 449c257c..00b28171 100644
--- a/src/System.Web.Http/ModelBinding/Binders/ComplexModelDto.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/ComplexModelDto.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Metadata;
namespace System.Web.Http.ModelBinding.Binders
diff --git a/src/System.Web.Http/ModelBinding/Binders/ComplexModelDtoResult.cs b/src/System.Web.Http/ModelBinding/Binders/ComplexModelDtoResult.cs
index 15fa9a60..6099b199 100644
--- a/src/System.Web.Http/ModelBinding/Binders/ComplexModelDtoResult.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/ComplexModelDtoResult.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Validation;
+using System.Web.Http.Validation;
namespace System.Web.Http.ModelBinding.Binders
{
diff --git a/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinder.cs b/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinder.cs
index f3d05868..1a3e7cd4 100644
--- a/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinder.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinder.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinderProvider.cs b/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinderProvider.cs
index c7668da8..ad2325df 100644
--- a/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinderProvider.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/CompositeModelBinderProvider.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.ModelBinding.Binders
diff --git a/src/System.Web.Http/ModelBinding/Binders/GenericModelBinderProvider.cs b/src/System.Web.Http/ModelBinding/Binders/GenericModelBinderProvider.cs
index b1d48b7b..30b007a3 100644
--- a/src/System.Web.Http/ModelBinding/Binders/GenericModelBinderProvider.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/GenericModelBinderProvider.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Controllers;
+using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ModelBinding/Binders/MutableObjectModelBinder.cs b/src/System.Web.Http/ModelBinding/Binders/MutableObjectModelBinder.cs
index 4340f9ac..619f7fe4 100644
--- a/src/System.Web.Http/ModelBinding/Binders/MutableObjectModelBinder.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/MutableObjectModelBinder.cs
@@ -2,7 +2,6 @@
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/ModelBinding/Binders/SimpleModelBinderProvider.cs b/src/System.Web.Http/ModelBinding/Binders/SimpleModelBinderProvider.cs
index 553ccb99..d30129bb 100644
--- a/src/System.Web.Http/ModelBinding/Binders/SimpleModelBinderProvider.cs
+++ b/src/System.Web.Http/ModelBinding/Binders/SimpleModelBinderProvider.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Controllers;
+using System.Web.Http.Controllers;
namespace System.Web.Http.ModelBinding.Binders
{
diff --git a/src/System.Web.Http/ModelBinding/DefaultActionValueBinder.cs b/src/System.Web.Http/ModelBinding/DefaultActionValueBinder.cs
index 44452838..d1d9f328 100644
--- a/src/System.Web.Http/ModelBinding/DefaultActionValueBinder.cs
+++ b/src/System.Web.Http/ModelBinding/DefaultActionValueBinder.cs
@@ -5,7 +5,6 @@ using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/ModelBinding/ErrorParameterBinding.cs b/src/System.Web.Http/ModelBinding/ErrorParameterBinding.cs
index b3ed1739..c1796c82 100644
--- a/src/System.Web.Http/ModelBinding/ErrorParameterBinding.cs
+++ b/src/System.Web.Http/ModelBinding/ErrorParameterBinding.cs
@@ -1,6 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/ModelBinding/FormDataCollectionExtensions.cs b/src/System.Web.Http/ModelBinding/FormDataCollectionExtensions.cs
index 15757811..86f5586e 100644
--- a/src/System.Web.Http/ModelBinding/FormDataCollectionExtensions.cs
+++ b/src/System.Web.Http/ModelBinding/FormDataCollectionExtensions.cs
@@ -3,7 +3,6 @@ using System.Collections.Specialized;
using System.Globalization;
using System.Net.Http.Formatting;
using System.Text;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding.Binders;
diff --git a/src/System.Web.Http/ModelBinding/FormatterParameterBinding.cs b/src/System.Web.Http/ModelBinding/FormatterParameterBinding.cs
index db03586a..fd1cef99 100644
--- a/src/System.Web.Http/ModelBinding/FormatterParameterBinding.cs
+++ b/src/System.Web.Http/ModelBinding/FormatterParameterBinding.cs
@@ -3,7 +3,6 @@ using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.Validation;
diff --git a/src/System.Web.Http/ModelBinding/HttpParameterBinding.cs b/src/System.Web.Http/ModelBinding/HttpParameterBinding.cs
index e926a7cf..eed73673 100644
--- a/src/System.Web.Http/ModelBinding/HttpParameterBinding.cs
+++ b/src/System.Web.Http/ModelBinding/HttpParameterBinding.cs
@@ -1,6 +1,5 @@
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/ModelBinding/ModelBinderAttribute.cs b/src/System.Web.Http/ModelBinding/ModelBinderAttribute.cs
index 95931245..1895f720 100644
--- a/src/System.Web.Http/ModelBinding/ModelBinderAttribute.cs
+++ b/src/System.Web.Http/ModelBinding/ModelBinderAttribute.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.ModelBinding.Binders;
using System.Web.Http.Properties;
using System.Web.Http.ValueProviders;
diff --git a/src/System.Web.Http/ModelBinding/ModelBinderConfig.cs b/src/System.Web.Http/ModelBinding/ModelBinderConfig.cs
index c5791b92..389137df 100644
--- a/src/System.Web.Http/ModelBinding/ModelBinderConfig.cs
+++ b/src/System.Web.Http/ModelBinding/ModelBinderConfig.cs
@@ -1,5 +1,4 @@
using System.Diagnostics.CodeAnalysis;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ModelBinding/ModelBinderParameterBinding.cs b/src/System.Web.Http/ModelBinding/ModelBinderParameterBinding.cs
index 6806daa8..a6a6d02f 100644
--- a/src/System.Web.Http/ModelBinding/ModelBinderParameterBinding.cs
+++ b/src/System.Web.Http/ModelBinding/ModelBinderParameterBinding.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ValueProviders;
diff --git a/src/System.Web.Http/ModelBinding/ModelBindingContext.cs b/src/System.Web.Http/ModelBinding/ModelBindingContext.cs
index eac46388..6923c08a 100644
--- a/src/System.Web.Http/ModelBinding/ModelBindingContext.cs
+++ b/src/System.Web.Http/ModelBinding/ModelBindingContext.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
using System.Web.Http.Validation;
diff --git a/src/System.Web.Http/ModelBinding/ModelBindingHelper.cs b/src/System.Web.Http/ModelBinding/ModelBindingHelper.cs
index b7fd2aca..43201056 100644
--- a/src/System.Web.Http/ModelBinding/ModelBindingHelper.cs
+++ b/src/System.Web.Http/ModelBinding/ModelBindingHelper.cs
@@ -2,7 +2,6 @@
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/ModelBinding/ModelError.cs b/src/System.Web.Http/ModelBinding/ModelError.cs
index 775971c9..14a96985 100644
--- a/src/System.Web.Http/ModelBinding/ModelError.cs
+++ b/src/System.Web.Http/ModelBinding/ModelError.cs
@@ -1,6 +1,4 @@
-using System.Web.Http.Common;
-
-namespace System.Web.Http.ModelBinding
+namespace System.Web.Http.ModelBinding
{
[Serializable]
public class ModelError
diff --git a/src/System.Web.Http/ModelBinding/ModelStateDictionary.cs b/src/System.Web.Http/ModelBinding/ModelStateDictionary.cs
index 1ee177f8..c63d5607 100644
--- a/src/System.Web.Http/ModelBinding/ModelStateDictionary.cs
+++ b/src/System.Web.Http/ModelBinding/ModelStateDictionary.cs
@@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.ValueProviders;
namespace System.Web.Http.ModelBinding
diff --git a/src/System.Web.Http/Query/DynamicQueryable.cs b/src/System.Web.Http/Query/DynamicQueryable.cs
index aaa7822c..2469b8f4 100644
--- a/src/System.Web.Http/Query/DynamicQueryable.cs
+++ b/src/System.Web.Http/Query/DynamicQueryable.cs
@@ -5,7 +5,6 @@ using System.Globalization;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Query
diff --git a/src/System.Web.Http/Query/ODataQueryDeserializer.cs b/src/System.Web.Http/Query/ODataQueryDeserializer.cs
index ecf91320..2d9570a3 100644
--- a/src/System.Web.Http/Query/ODataQueryDeserializer.cs
+++ b/src/System.Web.Http/Query/ODataQueryDeserializer.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Query/QueryValidator.cs b/src/System.Web.Http/Query/QueryValidator.cs
index 964b3bf5..48f7c78c 100644
--- a/src/System.Web.Http/Query/QueryValidator.cs
+++ b/src/System.Web.Http/Query/QueryValidator.cs
@@ -2,7 +2,6 @@
using System.Linq.Expressions;
using System.Reflection;
using System.Runtime.Serialization;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
using System.Xml.Serialization;
diff --git a/src/System.Web.Http/Query/ServiceQueryPart.cs b/src/System.Web.Http/Query/ServiceQueryPart.cs
index a6bc1d86..64b8bba8 100644
--- a/src/System.Web.Http/Query/ServiceQueryPart.cs
+++ b/src/System.Web.Http/Query/ServiceQueryPart.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Properties;
+using System.Web.Http.Properties;
namespace System.Web.Http.Query
{
diff --git a/src/System.Web.Http/ResultLimitAttribute.cs b/src/System.Web.Http/ResultLimitAttribute.cs
index a7468eda..0ae20f36 100644
--- a/src/System.Web.Http/ResultLimitAttribute.cs
+++ b/src/System.Web.Http/ResultLimitAttribute.cs
@@ -2,7 +2,6 @@
using System.Diagnostics.Contracts;
using System.Linq;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http.Common/RouteParameter.cs b/src/System.Web.Http/RouteParameter.cs
index dc75e048..dc75e048 100644
--- a/src/System.Web.Http.Common/RouteParameter.cs
+++ b/src/System.Web.Http/RouteParameter.cs
diff --git a/src/System.Web.Http/Routing/HttpMethodConstraint.cs b/src/System.Web.Http/Routing/HttpMethodConstraint.cs
index 87cbf9be..05ca20d3 100644
--- a/src/System.Web.Http/Routing/HttpMethodConstraint.cs
+++ b/src/System.Web.Http/Routing/HttpMethodConstraint.cs
@@ -2,7 +2,6 @@
using System.Collections.ObjectModel;
using System.Linq;
using System.Net.Http;
-using System.Web.Http.Common;
namespace System.Web.Http.Routing
{
diff --git a/src/System.Web.Http/Routing/HttpRoute.cs b/src/System.Web.Http/Routing/HttpRoute.cs
index 5f901589..fee31f56 100644
--- a/src/System.Web.Http/Routing/HttpRoute.cs
+++ b/src/System.Web.Http/Routing/HttpRoute.cs
@@ -3,7 +3,6 @@ using System.Globalization;
using System.Linq;
using System.Net.Http;
using System.Text.RegularExpressions;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Routing/HttpRouteData.cs b/src/System.Web.Http/Routing/HttpRouteData.cs
index 2c7df78d..2093f57a 100644
--- a/src/System.Web.Http/Routing/HttpRouteData.cs
+++ b/src/System.Web.Http/Routing/HttpRouteData.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Web.Http.Common;
namespace System.Web.Http.Routing
{
diff --git a/src/System.Web.Http/Routing/HttpRouteParser.cs b/src/System.Web.Http/Routing/HttpRouteParser.cs
index 93fe6139..cd102510 100644
--- a/src/System.Web.Http/Routing/HttpRouteParser.cs
+++ b/src/System.Web.Http/Routing/HttpRouteParser.cs
@@ -2,7 +2,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Routing
diff --git a/src/System.Web.Http/Routing/HttpRouteValueDictionary.cs b/src/System.Web.Http/Routing/HttpRouteValueDictionary.cs
index 66e88b53..62d75708 100644
--- a/src/System.Web.Http/Routing/HttpRouteValueDictionary.cs
+++ b/src/System.Web.Http/Routing/HttpRouteValueDictionary.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
-using System.Web.Http.Common;
namespace System.Web.Http.Routing
{
diff --git a/src/System.Web.Http/Routing/HttpVirtualPathData.cs b/src/System.Web.Http/Routing/HttpVirtualPathData.cs
index 86b444ef..3b557a63 100644
--- a/src/System.Web.Http/Routing/HttpVirtualPathData.cs
+++ b/src/System.Web.Http/Routing/HttpVirtualPathData.cs
@@ -1,6 +1,4 @@
-using System.Web.Http.Common;
-
-namespace System.Web.Http.Routing
+namespace System.Web.Http.Routing
{
public class HttpVirtualPathData : IHttpVirtualPathData
{
diff --git a/src/System.Web.Http/Routing/UrlHelper.cs b/src/System.Web.Http/Routing/UrlHelper.cs
index 04b3f220..b544fbd2 100644
--- a/src/System.Web.Http/Routing/UrlHelper.cs
+++ b/src/System.Web.Http/Routing/UrlHelper.cs
@@ -1,5 +1,4 @@
using System.Collections.Generic;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Routing
diff --git a/src/System.Web.Http/Services/DefaultServiceResolver.cs b/src/System.Web.Http/Services/DefaultServiceResolver.cs
index bfc0bbd3..1451589c 100644
--- a/src/System.Web.Http/Services/DefaultServiceResolver.cs
+++ b/src/System.Web.Http/Services/DefaultServiceResolver.cs
@@ -3,7 +3,6 @@ using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Linq;
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Description;
using System.Web.Http.Dispatcher;
diff --git a/src/System.Web.Http/Services/DependencyResolver.cs b/src/System.Web.Http/Services/DependencyResolver.cs
index 49a68173..5eb7a967 100644
--- a/src/System.Web.Http/Services/DependencyResolver.cs
+++ b/src/System.Web.Http/Services/DependencyResolver.cs
@@ -3,7 +3,6 @@ using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Reflection;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Services
diff --git a/src/System.Web.Http/System.Web.Http.csproj b/src/System.Web.Http/System.Web.Http.csproj
index d3f1c342..92826f52 100644
--- a/src/System.Web.Http/System.Web.Http.csproj
+++ b/src/System.Web.Http/System.Web.Http.csproj
@@ -66,6 +66,18 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
+ <Compile Include="..\Common\Error.cs">
+ <Link>Common\Error.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\HttpMethodHelper.cs">
+ <Link>Common\HttpMethodHelper.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
+ </Compile>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
+ </Compile>
<Compile Include="AcceptVerbsAttribute.cs" />
<Compile Include="Controllers\HttpControllerConfigurationAttribute.cs" />
<Compile Include="Controllers\HttpActionContext.cs" />
@@ -149,6 +161,7 @@
<Compile Include="ModelBinding\Binders\CompositeModelBinder.cs" />
<Compile Include="HttpRouteCollectionExtensions.cs" />
<Compile Include="Query\QueryValidator.cs" />
+ <Compile Include="RouteParameter.cs" />
<Compile Include="Routing\BoundRouteTemplate.cs" />
<Compile Include="Routing\IHttpVirtualPathData.cs" />
<Compile Include="Routing\IHttpRouteData.cs" />
@@ -350,6 +363,21 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
+ <Compile Include="..\Common\CommonWebApiResources.Designer.cs">
+ <Link>Properties\CommonWebApiResources.Designer.cs</Link>
+ <AutoGen>True</AutoGen>
+ <DesignTime>True</DesignTime>
+ <DependentUpon>CommonWebApiResources.resx</DependentUpon>
+ </Compile>
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="..\Common\CommonWebApiResources.resx">
+ <Link>Properties\CommonWebApiResources.resx</Link>
+ <Generator>ResXFileCodeGenerator</Generator>
+ <LastGenOutput>CommonWebApiResources.Designer.cs</LastGenOutput>
+ </EmbeddedResource>
+ </ItemGroup>
+ <ItemGroup>
<EmbeddedResource Include="Properties\SRResources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>SRResources.Designer.cs</LastGenOutput>
@@ -361,10 +389,6 @@
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
<Name>System.Net.Http.Formatting</Name>
</ProjectReference>
- <ProjectReference Include="..\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
diff --git a/src/System.Web.Http/Tracing/FormattingUtilities.cs b/src/System.Web.Http/Tracing/FormattingUtilities.cs
index be85c19b..885160f0 100644
--- a/src/System.Web.Http/Tracing/FormattingUtilities.cs
+++ b/src/System.Web.Http/Tracing/FormattingUtilities.cs
@@ -5,7 +5,6 @@ using System.Globalization;
using System.Linq;
using System.Net.Http.Formatting;
using System.Text;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.ModelBinding;
using System.Web.Http.ModelBinding.Binders;
diff --git a/src/System.Web.Http/Tracing/ITraceWriterExtensions.cs b/src/System.Web.Http/Tracing/ITraceWriterExtensions.cs
index 86b4b6f5..99975693 100644
--- a/src/System.Web.Http/Tracing/ITraceWriterExtensions.cs
+++ b/src/System.Web.Http/Tracing/ITraceWriterExtensions.cs
@@ -192,12 +192,12 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (exception == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("exception");
+ throw System.Web.Http.Error.ArgumentNull("exception");
}
traceWriter.Trace(
@@ -226,17 +226,17 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (exception == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("exception");
+ throw System.Web.Http.Error.ArgumentNull("exception");
}
if (messageFormat == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("messageFormat");
+ throw System.Web.Http.Error.ArgumentNull("messageFormat");
}
traceWriter.Trace(
@@ -246,7 +246,7 @@ namespace System.Web.Http.Tracing
(TraceRecord traceRecord) =>
{
traceRecord.Exception = exception;
- traceRecord.Message = System.Web.Http.Common.Error.Format(messageFormat, messageArguments);
+ traceRecord.Message = System.Web.Http.Error.Format(messageFormat, messageArguments);
});
}
@@ -265,12 +265,12 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (messageFormat == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("messageFormat");
+ throw System.Web.Http.Error.ArgumentNull("messageFormat");
}
traceWriter.Trace(
@@ -279,7 +279,7 @@ namespace System.Web.Http.Tracing
level,
(TraceRecord traceRecord) =>
{
- traceRecord.Message = System.Web.Http.Common.Error.Format(messageFormat, messageArguments);
+ traceRecord.Message = System.Web.Http.Error.Format(messageFormat, messageArguments);
});
}
@@ -312,12 +312,12 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (execute == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("execute");
+ throw System.Web.Http.Error.ArgumentNull("execute");
}
bool isTracing = false;
@@ -418,12 +418,12 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (execute == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("execute");
+ throw System.Web.Http.Error.ArgumentNull("execute");
}
bool isTracing = false;
@@ -578,12 +578,12 @@ namespace System.Web.Http.Tracing
{
if (traceWriter == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("traceWriter");
+ throw System.Web.Http.Error.ArgumentNull("traceWriter");
}
if (execute == null)
{
- throw System.Web.Http.Common.Error.ArgumentNull("execute");
+ throw System.Web.Http.Error.ArgumentNull("execute");
}
bool isTracing = false;
diff --git a/src/System.Web.Http/Tracing/Tracers/ActionFilterAttributeTracer.cs b/src/System.Web.Http/Tracing/Tracers/ActionFilterAttributeTracer.cs
index 76e7d1a0..7a1ecc38 100644
--- a/src/System.Web.Http/Tracing/Tracers/ActionFilterAttributeTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/ActionFilterAttributeTracer.cs
@@ -1,5 +1,4 @@
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/BufferedMediaTypeFormatterTracer.cs b/src/System.Web.Http/Tracing/Tracers/BufferedMediaTypeFormatterTracer.cs
index d606995f..a98d5c1e 100644
--- a/src/System.Web.Http/Tracing/Tracers/BufferedMediaTypeFormatterTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/BufferedMediaTypeFormatterTracer.cs
@@ -3,7 +3,6 @@ using System.IO;
using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Tracing.Tracers
diff --git a/src/System.Web.Http/Tracing/Tracers/ContentNegotiatorTracer.cs b/src/System.Web.Http/Tracing/Tracers/ContentNegotiatorTracer.cs
index 52bf1b16..05969c88 100644
--- a/src/System.Web.Http/Tracing/Tracers/ContentNegotiatorTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/ContentNegotiatorTracer.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Net.Http;
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Tracing.Tracers
diff --git a/src/System.Web.Http/Tracing/Tracers/FormatterParameterBindingTracer.cs b/src/System.Web.Http/Tracing/Tracers/FormatterParameterBindingTracer.cs
index 66141fa6..d4936183 100644
--- a/src/System.Web.Http/Tracing/Tracers/FormatterParameterBindingTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/FormatterParameterBindingTracer.cs
@@ -4,7 +4,6 @@ using System.Net.Http;
using System.Net.Http.Formatting;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpActionBindingTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpActionBindingTracer.cs
index 03fcf2a3..e604be49 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpActionBindingTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpActionBindingTracer.cs
@@ -5,7 +5,6 @@ using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.ModelBinding;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpActionDescriptorTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpActionDescriptorTracer.cs
index 294beb22..3a9ca41f 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpActionDescriptorTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpActionDescriptorTracer.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpActionInvokerTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpActionInvokerTracer.cs
index 346f58a8..9baaee28 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpActionInvokerTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpActionInvokerTracer.cs
@@ -2,7 +2,6 @@
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpActionSelectorTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpActionSelectorTracer.cs
index 2f836012..d960bc00 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpActionSelectorTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpActionSelectorTracer.cs
@@ -1,6 +1,5 @@
using System.Globalization;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpControllerFactoryTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpControllerFactoryTracer.cs
index 56aa2c23..dc1021bd 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpControllerFactoryTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpControllerFactoryTracer.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Globalization;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Dispatcher;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Tracing/Tracers/HttpParameterBindingTracer.cs b/src/System.Web.Http/Tracing/Tracers/HttpParameterBindingTracer.cs
index 3ea8fabc..13a18770 100644
--- a/src/System.Web.Http/Tracing/Tracers/HttpParameterBindingTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/HttpParameterBindingTracer.cs
@@ -1,7 +1,6 @@
using System.Globalization;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Tracing/Tracers/MediaTypeFormatterTracer.cs b/src/System.Web.Http/Tracing/Tracers/MediaTypeFormatterTracer.cs
index f874c5db..bca3bc86 100644
--- a/src/System.Web.Http/Tracing/Tracers/MediaTypeFormatterTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/MediaTypeFormatterTracer.cs
@@ -5,7 +5,6 @@ using System.Net.Http;
using System.Net.Http.Formatting;
using System.Net.Http.Headers;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Tracing.Tracers
diff --git a/src/System.Web.Http/Tracing/Tracers/RequestMessageHandlerTracer.cs b/src/System.Web.Http/Tracing/Tracers/RequestMessageHandlerTracer.cs
index c7a85d7f..a6251374 100644
--- a/src/System.Web.Http/Tracing/Tracers/RequestMessageHandlerTracer.cs
+++ b/src/System.Web.Http/Tracing/Tracers/RequestMessageHandlerTracer.cs
@@ -3,7 +3,6 @@ using System.Net.Http;
using System.Net.Http.Headers;
using System.Threading;
using System.Threading.Tasks;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.Tracing.Tracers
diff --git a/src/System.Web.Http/Validation/DefaultBodyModelValidator.cs b/src/System.Web.Http/Validation/DefaultBodyModelValidator.cs
index a62d8b73..cc69406c 100644
--- a/src/System.Web.Http/Validation/DefaultBodyModelValidator.cs
+++ b/src/System.Web.Http/Validation/DefaultBodyModelValidator.cs
@@ -1,7 +1,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/Validation/ModelStateFormatterLogger.cs b/src/System.Web.Http/Validation/ModelStateFormatterLogger.cs
index 5fa171a1..cede3b2e 100644
--- a/src/System.Web.Http/Validation/ModelStateFormatterLogger.cs
+++ b/src/System.Web.Http/Validation/ModelStateFormatterLogger.cs
@@ -1,5 +1,4 @@
using System.Net.Http.Formatting;
-using System.Web.Http.Common;
using System.Web.Http.ModelBinding;
namespace System.Web.Http.Validation
diff --git a/src/System.Web.Http/Validation/ModelValidatedEventArgs.cs b/src/System.Web.Http/Validation/ModelValidatedEventArgs.cs
index 139ca10d..259c2e9e 100644
--- a/src/System.Web.Http/Validation/ModelValidatedEventArgs.cs
+++ b/src/System.Web.Http/Validation/ModelValidatedEventArgs.cs
@@ -1,5 +1,4 @@
-using System.Web.Http.Common;
-using System.Web.Http.Controllers;
+using System.Web.Http.Controllers;
namespace System.Web.Http.Validation
{
diff --git a/src/System.Web.Http/Validation/ModelValidatingEventArgs.cs b/src/System.Web.Http/Validation/ModelValidatingEventArgs.cs
index 7c83cea4..c96f49a4 100644
--- a/src/System.Web.Http/Validation/ModelValidatingEventArgs.cs
+++ b/src/System.Web.Http/Validation/ModelValidatingEventArgs.cs
@@ -1,5 +1,4 @@
using System.ComponentModel;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
namespace System.Web.Http.Validation
diff --git a/src/System.Web.Http/Validation/ModelValidationNode.cs b/src/System.Web.Http/Validation/ModelValidationNode.cs
index cc0378b5..98897fc4 100644
--- a/src/System.Web.Http/Validation/ModelValidationNode.cs
+++ b/src/System.Web.Http/Validation/ModelValidationNode.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Validation/ModelValidationRequiredMemberSelector.cs b/src/System.Web.Http/Validation/ModelValidationRequiredMemberSelector.cs
index 66413c7b..d472fe25 100644
--- a/src/System.Web.Http/Validation/ModelValidationRequiredMemberSelector.cs
+++ b/src/System.Web.Http/Validation/ModelValidationRequiredMemberSelector.cs
@@ -2,7 +2,6 @@
using System.Linq;
using System.Net.Http.Formatting;
using System.Reflection;
-using System.Web.Http.Common;
using System.Web.Http.Metadata;
namespace System.Web.Http.Validation
diff --git a/src/System.Web.Http/Validation/ModelValidator.cs b/src/System.Web.Http/Validation/ModelValidator.cs
index 23c135a7..4c483ebb 100644
--- a/src/System.Web.Http/Validation/ModelValidator.cs
+++ b/src/System.Web.Http/Validation/ModelValidator.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.ModelBinding;
diff --git a/src/System.Web.Http/Validation/Providers/AssociatedValidatorProvider.cs b/src/System.Web.Http/Validation/Providers/AssociatedValidatorProvider.cs
index 0cb3462d..98610938 100644
--- a/src/System.Web.Http/Validation/Providers/AssociatedValidatorProvider.cs
+++ b/src/System.Web.Http/Validation/Providers/AssociatedValidatorProvider.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Internal;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/Validation/Providers/ClientDataTypeModelValidatorProvider.cs b/src/System.Web.Http/Validation/Providers/ClientDataTypeModelValidatorProvider.cs
index db188fdc..c4f0c575 100644
--- a/src/System.Web.Http/Validation/Providers/ClientDataTypeModelValidatorProvider.cs
+++ b/src/System.Web.Http/Validation/Providers/ClientDataTypeModelValidatorProvider.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Validation/Providers/DataAnnotationsModelValidatorProvider.cs b/src/System.Web.Http/Validation/Providers/DataAnnotationsModelValidatorProvider.cs
index da5b2d72..7fe6969f 100644
--- a/src/System.Web.Http/Validation/Providers/DataAnnotationsModelValidatorProvider.cs
+++ b/src/System.Web.Http/Validation/Providers/DataAnnotationsModelValidatorProvider.cs
@@ -4,7 +4,6 @@ using System.Linq;
using System.Reflection;
using System.Security;
using System.Threading;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/Validation/Validators/DataAnnotationsModelValidator.cs b/src/System.Web.Http/Validation/Validators/DataAnnotationsModelValidator.cs
index 17b9831b..47ef34d7 100644
--- a/src/System.Web.Http/Validation/Validators/DataAnnotationsModelValidator.cs
+++ b/src/System.Web.Http/Validation/Validators/DataAnnotationsModelValidator.cs
@@ -2,7 +2,6 @@
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Security;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
diff --git a/src/System.Web.Http/Validation/Validators/RequiredMemberModelValidator.cs b/src/System.Web.Http/Validation/Validators/RequiredMemberModelValidator.cs
index 53afef2e..c3e5a4e4 100644
--- a/src/System.Web.Http/Validation/Validators/RequiredMemberModelValidator.cs
+++ b/src/System.Web.Http/Validation/Validators/RequiredMemberModelValidator.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Globalization;
-using System.Web.Http.Common;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
using System.Web.Http.Validation.ClientRules;
diff --git a/src/System.Web.Http/Validation/Validators/ValidatableObjectAdapter.cs b/src/System.Web.Http/Validation/Validators/ValidatableObjectAdapter.cs
index 1fa75c67..d29e7ccb 100644
--- a/src/System.Web.Http/Validation/Validators/ValidatableObjectAdapter.cs
+++ b/src/System.Web.Http/Validation/Validators/ValidatableObjectAdapter.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Metadata;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ValueProviders/Providers/CompositeValueProvider.cs b/src/System.Web.Http/ValueProviders/Providers/CompositeValueProvider.cs
index 11e1255c..10d35ad7 100644
--- a/src/System.Web.Http/ValueProviders/Providers/CompositeValueProvider.cs
+++ b/src/System.Web.Http/ValueProviders/Providers/CompositeValueProvider.cs
@@ -2,7 +2,6 @@
using System.Collections.ObjectModel;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
-using System.Web.Http.Common;
namespace System.Web.Http.ValueProviders.Providers
{
diff --git a/src/System.Web.Http/ValueProviders/Providers/NameValueCollectionValueProvider.cs b/src/System.Web.Http/ValueProviders/Providers/NameValueCollectionValueProvider.cs
index 93f9bcad..3f3ba513 100644
--- a/src/System.Web.Http/ValueProviders/Providers/NameValueCollectionValueProvider.cs
+++ b/src/System.Web.Http/ValueProviders/Providers/NameValueCollectionValueProvider.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
-using System.Web.Http.Common;
using System.Web.Http.Internal;
namespace System.Web.Http.ValueProviders.Providers
diff --git a/src/System.Web.Http/ValueProviders/ValueProviderAttribute.cs b/src/System.Web.Http/ValueProviders/ValueProviderAttribute.cs
index f95d5c84..bfe1ac44 100644
--- a/src/System.Web.Http/ValueProviders/ValueProviderAttribute.cs
+++ b/src/System.Web.Http/ValueProviders/ValueProviderAttribute.cs
@@ -1,6 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
-using System.Web.Http.Common;
using System.Web.Http.ModelBinding;
using System.Web.Http.Properties;
diff --git a/src/System.Web.Http/ValueProviders/ValueProviderResult.cs b/src/System.Web.Http/ValueProviders/ValueProviderResult.cs
index 77f38591..b1921325 100644
--- a/src/System.Web.Http/ValueProviders/ValueProviderResult.cs
+++ b/src/System.Web.Http/ValueProviders/ValueProviderResult.cs
@@ -1,7 +1,6 @@
using System.Collections;
using System.ComponentModel;
using System.Globalization;
-using System.Web.Http.Common;
using System.Web.Http.Properties;
namespace System.Web.Http.ValueProviders
diff --git a/src/System.Web.Mvc/System.Web.Mvc.csproj b/src/System.Web.Mvc/System.Web.Mvc.csproj
index 646cce61..eb19b321 100644
--- a/src/System.Web.Mvc/System.Web.Mvc.csproj
+++ b/src/System.Web.Mvc/System.Web.Mvc.csproj
@@ -67,11 +67,11 @@
<Compile Include="..\CommonAssemblyInfo.cs">
<Link>Properties\CommonAssemblyInfo.cs</Link>
</Compile>
- <Compile Include="..\System.Web.Http.Common\TaskHelpers.cs">
- <Link>Async\TaskHelpers.cs</Link>
+ <Compile Include="..\Common\TaskHelpers.cs">
+ <Link>Common\TaskHelpers.cs</Link>
</Compile>
- <Compile Include="..\System.Web.Http.Common\TaskHelpersExtensions.cs">
- <Link>Async\TaskHelpersExtensions.cs</Link>
+ <Compile Include="..\Common\TaskHelpersExtensions.cs">
+ <Link>Common\TaskHelpersExtensions.cs</Link>
</Compile>
<Compile Include="..\TransparentCommonAssemblyInfo.cs">
<Link>Properties\TransparentCommonAssemblyInfo.cs</Link>
diff --git a/test/System.Net.Http.Formatting.Test.Unit/HttpClientExtensionsTest.cs b/test/System.Net.Http.Formatting.Test.Unit/HttpClientExtensionsTest.cs
index 8fc36b88..534cdf6f 100644
--- a/test/System.Net.Http.Formatting.Test.Unit/HttpClientExtensionsTest.cs
+++ b/test/System.Net.Http.Formatting.Test.Unit/HttpClientExtensionsTest.cs
@@ -1,8 +1,8 @@
using System.Net.Http.Formatting;
using System.Net.Http.Formatting.Mocks;
-using System.Net.Http.Internal;
using System.Net.Http.Mocks;
using System.Threading;
+using System.Threading.Tasks;
using Moq;
using Xunit;
using Assert = Microsoft.TestCommon.AssertEx;
diff --git a/test/System.Web.Http.Common.Test/HttpRequestMessageCommonExtensionsTest.cs b/test/System.Net.Http.Formatting.Test.Unit/HttpRequestMessageCommonExtensionsTest.cs
index 63c36412..80478982 100644
--- a/test/System.Web.Http.Common.Test/HttpRequestMessageCommonExtensionsTest.cs
+++ b/test/System.Net.Http.Formatting.Test.Unit/HttpRequestMessageCommonExtensionsTest.cs
@@ -1,29 +1,27 @@
-using System.Net;
-using System.Net.Http;
-using Microsoft.TestCommon;
+using Microsoft.TestCommon;
using Xunit;
using Assert = Microsoft.TestCommon.AssertEx;
-namespace System.Web.Http
+namespace System.Net.Http
{
- public class HttpRequestMessageCommonExtensionsTest
+ public class HttpRequestMessageExtensionsTest
{
[Fact]
public void IsCorrectType()
{
- Assert.Type.HasProperties(typeof(HttpRequestMessageCommonExtensions), TypeAssert.TypeProperties.IsStatic | TypeAssert.TypeProperties.IsPublicVisibleClass);
+ Assert.Type.HasProperties(typeof(HttpRequestMessageExtensions), TypeAssert.TypeProperties.IsStatic | TypeAssert.TypeProperties.IsPublicVisibleClass);
}
[Fact]
public void CreateResponseThrowsOnNull()
{
- Assert.ThrowsArgumentNull(() => HttpRequestMessageCommonExtensions.CreateResponse(null), "request");
+ Assert.ThrowsArgumentNull(() => HttpRequestMessageExtensions.CreateResponse(null), "request");
}
[Fact]
public void CreateResponseWithStatusThrowsOnNull()
{
- Assert.ThrowsArgumentNull(() => HttpRequestMessageCommonExtensions.CreateResponse(null, HttpStatusCode.OK), "request");
+ Assert.ThrowsArgumentNull(() => HttpRequestMessageExtensions.CreateResponse(null, HttpStatusCode.OK), "request");
}
[Fact]
diff --git a/test/System.Net.Http.Formatting.Test.Unit/System.Net.Http.Formatting.Test.Unit.csproj b/test/System.Net.Http.Formatting.Test.Unit/System.Net.Http.Formatting.Test.Unit.csproj
index fb2596f0..aae3a2d9 100644
--- a/test/System.Net.Http.Formatting.Test.Unit/System.Net.Http.Formatting.Test.Unit.csproj
+++ b/test/System.Net.Http.Formatting.Test.Unit/System.Net.Http.Formatting.Test.Unit.csproj
@@ -89,6 +89,7 @@
<Compile Include="FormUrlEncodedJsonTests.cs" />
<Compile Include="HttpClientExtensionsTest.cs" />
<Compile Include="HttpContentExtensionsTest.cs" />
+ <Compile Include="HttpRequestMessageCommonExtensionsTest.cs" />
<Compile Include="Mocks\TestableHttpMessageHandler.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="UriQueryDataSet.cs" />
diff --git a/test/System.Web.Http.Common.Test/System.Web.Http.Common.Test.csproj b/test/System.Web.Http.Common.Test/System.Web.Http.Common.Test.csproj
deleted file mode 100644
index 54cf1980..00000000
--- a/test/System.Web.Http.Common.Test/System.Web.Http.Common.Test.csproj
+++ /dev/null
@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory),Runtime.sln))\tools\WebStack.settings.targets" />
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7FB5C0C0-5223-4C79-A8DA-D2A0F264A478}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>System.Web.Http.Common</RootNamespace>
- <AssemblyName>System.Web.Http.Common.Test</AssemblyName>
- <FileAlignment>512</FileAlignment>
- <ProjectTypeGuids>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>$(WebStackRootPath)\bin\Debug\Test\</OutputPath>
- <DefineConstants>TRACE;DEBUG</DefineConstants>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>$(WebStackRootPath)\bin\Release\Test\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)' == 'CodeCoverage' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>$(WebStackRootPath)\bin\CodeCoverage\Test\</OutputPath>
- <DefineConstants>TRACE;DEBUG</DefineConstants>
- <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
- <HintPath>..\..\packages\Moq.4.0.10827\lib\NET40\Moq.dll</HintPath>
- </Reference>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Net.Http">
- <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20302.1\lib\net40\System.Net.Http.dll</HintPath>
- </Reference>
- <Reference Include="System.Net.Http.WebRequest">
- <HintPath>..\..\packages\Microsoft.Net.Http.2.0.20302.1\lib\net40\System.Net.Http.WebRequest.dll</HintPath>
- </Reference>
- <Reference Include="xunit">
- <HintPath>..\..\packages\xunit.1.9.0.1566\lib\xunit.dll</HintPath>
- </Reference>
- <Reference Include="xunit.extensions">
- <HintPath>..\..\packages\xunit.extensions.1.9.0.1566\lib\xunit.extensions.dll</HintPath>
- </Reference>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="ErrorTests.cs" />
- <Compile Include="HttpRequestMessageCommonExtensionsTest.cs" />
- <Compile Include="TaskHelpersExtensionsTest.cs" />
- <Compile Include="TaskHelpersTest.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\..\src\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
- <ProjectReference Include="..\Microsoft.TestCommon\Microsoft.TestCommon.csproj">
- <Project>{FCCC4CB7-BAF7-4A57-9F89-E5766FE536C0}</Project>
- <Name>Microsoft.TestCommon</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="packages.config" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-</Project> \ No newline at end of file
diff --git a/test/System.Web.Http.Common.Test/packages.config b/test/System.Web.Http.Common.Test/packages.config
deleted file mode 100644
index b9070f9e..00000000
--- a/test/System.Web.Http.Common.Test/packages.config
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<packages>
- <package id="Microsoft.Net.Http" version="2.0.20302.1" />
- <package id="Moq" version="4.0.10827" />
- <package id="xunit" version="1.9.0.1566" />
- <package id="xunit.extensions" version="1.9.0.1566" />
-</packages> \ No newline at end of file
diff --git a/test/System.Web.Http.Integration.Test/Controllers/CustomControllerFactoryTest.cs b/test/System.Web.Http.Integration.Test/Controllers/CustomControllerFactoryTest.cs
index 1cc1f55b..2d43f997 100644
--- a/test/System.Web.Http.Integration.Test/Controllers/CustomControllerFactoryTest.cs
+++ b/test/System.Web.Http.Integration.Test/Controllers/CustomControllerFactoryTest.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Net;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Dispatcher;
using System.Web.Http.ModelBinding;
using System.Web.Http.SelfHost;
diff --git a/test/System.Web.Http.Integration.Test/Controllers/Helpers/ApiControllerHelper.cs b/test/System.Web.Http.Integration.Test/Controllers/Helpers/ApiControllerHelper.cs
index 4389f0c9..4261d807 100644
--- a/test/System.Web.Http.Integration.Test/Controllers/Helpers/ApiControllerHelper.cs
+++ b/test/System.Web.Http.Integration.Test/Controllers/Helpers/ApiControllerHelper.cs
@@ -1,7 +1,6 @@
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.Controllers;
using System.Web.Http.Routing;
diff --git a/test/System.Web.Http.Integration.Test/ModelBinding/ModelBindingTests.cs b/test/System.Web.Http.Integration.Test/ModelBinding/ModelBindingTests.cs
index 86e26892..d6e7188a 100644
--- a/test/System.Web.Http.Integration.Test/ModelBinding/ModelBindingTests.cs
+++ b/test/System.Web.Http.Integration.Test/ModelBinding/ModelBindingTests.cs
@@ -1,5 +1,4 @@
using System.Net.Http;
-using System.Web.Http.Common;
using System.Web.Http.SelfHost;
namespace System.Web.Http.ModelBinding
diff --git a/test/System.Web.Http.Integration.Test/System.Web.Http.Integration.Test.csproj b/test/System.Web.Http.Integration.Test/System.Web.Http.Integration.Test.csproj
index c02d9068..4174670b 100644
--- a/test/System.Web.Http.Integration.Test/System.Web.Http.Integration.Test.csproj
+++ b/test/System.Web.Http.Integration.Test/System.Web.Http.Integration.Test.csproj
@@ -130,10 +130,6 @@
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
<Name>System.Net.Http.Formatting</Name>
</ProjectReference>
- <ProjectReference Include="..\..\src\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\src\System.Web.Http.SelfHost\System.Web.Http.SelfHost.csproj">
<Project>{66492E69-CE4C-4FB1-9B1F-88DEE09D06F1}</Project>
<Name>System.Web.Http.SelfHost</Name>
diff --git a/test/System.Web.Http.Common.Test/ErrorTests.cs b/test/System.Web.Http.Test/Common/ErrorTests.cs
index 09c187fb..16f52ccc 100644
--- a/test/System.Web.Http.Common.Test/ErrorTests.cs
+++ b/test/System.Web.Http.Test/Common/ErrorTests.cs
@@ -1,7 +1,7 @@
using Xunit;
using Assert = Microsoft.TestCommon.AssertEx;
-namespace System.Web.Http.Common
+namespace System.Web.Http
{
public class ErrorTests
{
diff --git a/test/System.Web.Http.Common.Test/TaskHelpersExtensionsTest.cs b/test/System.Web.Http.Test/Common/TaskHelpersExtensionsTest.cs
index 03d36a46..03d36a46 100644
--- a/test/System.Web.Http.Common.Test/TaskHelpersExtensionsTest.cs
+++ b/test/System.Web.Http.Test/Common/TaskHelpersExtensionsTest.cs
diff --git a/test/System.Web.Http.Common.Test/TaskHelpersTest.cs b/test/System.Web.Http.Test/Common/TaskHelpersTest.cs
index fe6d1d6a..fe6d1d6a 100644
--- a/test/System.Web.Http.Common.Test/TaskHelpersTest.cs
+++ b/test/System.Web.Http.Test/Common/TaskHelpersTest.cs
diff --git a/test/System.Web.Http.Test/System.Web.Http.Test.csproj b/test/System.Web.Http.Test/System.Web.Http.Test.csproj
index e47ba77e..8701d239 100644
--- a/test/System.Web.Http.Test/System.Web.Http.Test.csproj
+++ b/test/System.Web.Http.Test/System.Web.Http.Test.csproj
@@ -67,6 +67,9 @@
</ItemGroup>
<ItemGroup>
<Compile Include="AuthorizeAttributeTest.cs" />
+ <Compile Include="Common\ErrorTests.cs" />
+ <Compile Include="Common\TaskHelpersExtensionsTest.cs" />
+ <Compile Include="Common\TaskHelpersTest.cs" />
<Compile Include="Controllers\Apis\User.cs" />
<Compile Include="Controllers\Apis\UsersRpcController.cs" />
<Compile Include="Controllers\HttpControllerContextTest.cs" />
@@ -229,10 +232,6 @@
<Project>{668E9021-CE84-49D9-98FB-DF125A9FCDB0}</Project>
<Name>System.Net.Http.Formatting</Name>
</ProjectReference>
- <ProjectReference Include="..\..\src\System.Web.Http.Common\System.Web.Http.Common.csproj">
- <Project>{03A5E5F2-2E23-48F2-ABCC-6C41BAC9AC02}</Project>
- <Name>System.Web.Http.Common</Name>
- </ProjectReference>
<ProjectReference Include="..\..\src\System.Web.Http\System.Web.Http.csproj">
<Project>{DDC1CE0C-486E-4E35-BB3B-EAB61F8F9440}</Project>
<Name>System.Web.Http</Name>