From 5bf58a08e9664c63bf153c09b8f3f1b7dd7d5e33 Mon Sep 17 00:00:00 2001 From: John Luo Date: Thu, 7 Jan 2016 17:26:50 -0800 Subject: [PATCH] Remove redundant AddOptions which is now a default hosting service --- src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs b/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs index 08b7928b74..3a683d03d2 100644 --- a/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs +++ b/src/Microsoft.AspNet.Cors/CorsServiceCollectionExtensions.cs @@ -23,8 +23,7 @@ namespace Microsoft.Extensions.DependencyInjection { throw new ArgumentNullException(nameof(serviceCollection)); } - - serviceCollection.AddOptions(); + serviceCollection.TryAdd(ServiceDescriptor.Transient()); serviceCollection.TryAdd(ServiceDescriptor.Transient()); return serviceCollection;