Skip to content

Commit

Permalink
MapFileExtensions NETCORE31
Browse files Browse the repository at this point in the history
  • Loading branch information
Revsgaard committed Dec 11, 2019
1 parent bed7ae3 commit 632a362
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if NETCORE30
#if NETCORE30 || NETCORE31
using System;
#endif
using System.IO;
Expand All @@ -8,15 +8,15 @@ namespace ITfoxtec.Identity.Saml2.MvcCore
{
public static class MapFileExtensions
{
#if NETCORE30
#if NETCORE30 || NETCORE31
[Obsolete("The IHostingEnvironment type and this method is obsolete and will be removed in a future version. The recommended alternative is Microsoft.AspNetCore.Hosting.IWebHostEnvironment.", false)]
#endif
public static string MapToPhysicalFilePath(this IHostingEnvironment appEnvironment, string fileName)
{
return Path.Combine(appEnvironment.ContentRootPath, fileName);
}

#if NETCORE30
#if NETCORE30 || NETCORE31
public static string MapToPhysicalFilePath(this IWebHostEnvironment appEnvironment, string fileName)
{
return Path.Combine(appEnvironment.ContentRootPath, fileName);
Expand Down

0 comments on commit 632a362

Please sign in to comment.