Beispiel #1
0
        public void TestIsAsSafeOrSaferDynamicWriteOnAbsentProbePolicy(DynamicWriteOnAbsentProbePolicy lhs, DynamicWriteOnAbsentProbePolicy rhs, bool expectedOutcome)
        {
            XAssert.AreEqual(expectedOutcome, UnsafeSandboxConfigurationExtensions.IsAsSafeOrSafer(lhs, rhs));

            var lhsConf = new UnsafeSandboxConfiguration {
                IgnoreDynamicWritesOnAbsentProbes = lhs
            };
            var rhsConf = new UnsafeSandboxConfiguration {
                IgnoreDynamicWritesOnAbsentProbes = rhs
            };

            XAssert.AreEqual(expectedOutcome, lhsConf.IsAsSafeOrSaferThan(rhsConf));
        }
 private static bool IsAsSafeOrSafer(DynamicWriteOnAbsentProbePolicy lhsValue, DynamicWriteOnAbsentProbePolicy rhsValue, DynamicWriteOnAbsentProbePolicy _)
 => IsAsSafeOrSafer(lhsValue, rhsValue);
 /// <nodoc />
 public static bool IsAsSafeOrSafer(DynamicWriteOnAbsentProbePolicy lhsValue, DynamicWriteOnAbsentProbePolicy rhsValue)
 {
     return((lhsValue & rhsValue) == lhsValue);
 }