Skip to content

Commit

Permalink
Remove some unnecessary FEATURE_APPDOMAIN guards
Browse files Browse the repository at this point in the history
(.NET Standard 2.x supports `AppDomain.CurrentDomain.BaseDirectory`.)
  • Loading branch information
stakx committed Jun 10, 2020
1 parent 4871e9b commit f2619a5
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
4 changes: 0 additions & 4 deletions src/Castle.Core/Core/Logging/AbstractExtendedLoggerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,7 @@ protected static FileInfo GetConfigFile(string fileName)
}
else
{
#if FEATURE_APPDOMAIN
string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
#else
string baseDirectory = AppContext.BaseDirectory;
#endif
result = new FileInfo(Path.Combine(baseDirectory, fileName));
}

Expand Down
4 changes: 0 additions & 4 deletions src/Castle.Core/Core/Logging/AbstractLoggerFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ protected static FileInfo GetConfigFile(string fileName)
}
else
{
#if FEATURE_APPDOMAIN
string baseDirectory = AppDomain.CurrentDomain.BaseDirectory;
#else
string baseDirectory = AppContext.BaseDirectory;
#endif
result = new FileInfo(Path.Combine(baseDirectory, fileName));
}

Expand Down
4 changes: 0 additions & 4 deletions src/Castle.Core/Core/Resource/AbstractResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,7 @@ namespace Castle.Core.Resource

public abstract class AbstractResource : IResource
{
#if FEATURE_APPDOMAIN
protected static readonly string DefaultBasePath = AppDomain.CurrentDomain.BaseDirectory;
#else
protected static readonly string DefaultBasePath = AppContext.BaseDirectory;
#endif

public virtual string FileBasePath
{
Expand Down

0 comments on commit f2619a5

Please sign in to comment.