This is an automated email from the ASF dual-hosted git repository. nightowl888 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/lucenenet.git
commit 6fe133e7302db58451ebc9c26f6cd62b1b825a0a Author: Shad Storhaug <[email protected]> AuthorDate: Fri Sep 11 11:09:04 2020 +0700 Directory.Build.targets: Added FEATURE_APPDOMAIN_ISFULLYTRUSTED and implemented throughout solution --- Directory.Build.targets | 3 ++- src/Lucene.Net/Support/Util/NamedServiceFactory.cs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Directory.Build.targets b/Directory.Build.targets index 40ee749..92de61f 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -56,7 +56,8 @@ <!-- Features in .NET Framework 4.5+, .NET Standard 2.x, .NET Core 2.x, and .NET Core 3.x --> <PropertyGroup Condition=" $(TargetFramework.StartsWith('net4')) Or $(TargetFramework.StartsWith('netstandard2.')) Or $(TargetFramework.StartsWith('netcoreapp2.')) Or $(TargetFramework.StartsWith('netcoreapp3.')) "> - + + <DefineConstants>$(DefineConstants);FEATURE_APPDOMAIN_ISFULLYTRUSTED</DefineConstants> <DefineConstants>$(DefineConstants);FEATURE_CONCURRENTMERGESCHEDULER</DefineConstants> <DefineConstants>$(DefineConstants);FEATURE_CULTUREINFO_GETCULTURES</DefineConstants> <DefineConstants>$(DefineConstants);FEATURE_DTD_PROCESSING</DefineConstants> diff --git a/src/Lucene.Net/Support/Util/NamedServiceFactory.cs b/src/Lucene.Net/Support/Util/NamedServiceFactory.cs index 10e8733..6920bcd 100644 --- a/src/Lucene.Net/Support/Util/NamedServiceFactory.cs +++ b/src/Lucene.Net/Support/Util/NamedServiceFactory.cs @@ -173,10 +173,10 @@ namespace Lucene.Net.Util { get { -#if NETSTANDARD - return true; // Partial trust is obsolete -#else +#if FEATURE_APPDOMAIN_ISFULLYTRUSTED return AppDomain.CurrentDomain.IsFullyTrusted; // Partial trust support +#else + return true; // Partial trust not supported #endif } }
