Skip to content

Commit a3c3780

Browse files
committed
Renaming partial trust checking members for clarity
1 parent e095877 commit a3c3780

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

AgileMapper/Constants.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
internal static class Constants
1212
{
13-
public static readonly bool IsPartialTrust;
13+
public static readonly bool ReflectionPermissionDenied;
1414

1515
public static readonly string[] EmptyStringArray = { };
1616

@@ -69,19 +69,19 @@ static Constants()
6969
try
7070
{
7171
typeof(TrustTester)
72-
.GetNonPublicStaticMethod("IsPartialTrust")
72+
.GetNonPublicStaticMethod("IsReflectionPermitted")
7373
.Invoke(null, null);
7474
}
7575
catch
7676
{
77-
IsPartialTrust = true;
77+
ReflectionPermissionDenied = true;
7878
}
7979
}
8080
}
8181

8282
internal class TrustTester
8383
{
8484
// ReSharper disable once UnusedMember.Local
85-
private static void IsPartialTrust() { }
85+
private static void IsReflectionPermitted() { }
8686
}
8787
}

AgileMapper/DerivedTypesCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ private static IEnumerable<Type> GetTypesFromAssembly(Assembly assembly)
5757
{
5858
IEnumerable<Type> types = assembly.GetTypes();
5959

60-
if (Constants.IsPartialTrust)
60+
if (Constants.ReflectionPermissionDenied)
6161
{
6262
types = types.Where(t => t.IsPublic());
6363
}

AgileMapper/ObjectPopulation/ObjectMappingDataFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ private static IObjectMappingData Create<TDeclaredSource, TDeclaredTarget>(
222222
parent);
223223
}
224224

225-
if (Constants.IsPartialTrust)
225+
if (Constants.ReflectionPermissionDenied)
226226
{
227227
var createCaller = GetPartialTrustMappingDataCreator<TDeclaredSource, TDeclaredTarget>(mappingTypes);
228228

0 commit comments

Comments
 (0)