static private ExpressionTypeDoesNotMatchLabel ( object p0, object p1 ) : |
||
p0 | object | |
p1 | object | |
return |
// Standard argument validation, taken from ValidateArgumentTypes private static void ValidateGotoType(Type expectedType, ref Expression value, string paramName) { RequiresCanRead(value, paramName); if (!TypeUtils.AreReferenceAssignable(expectedType, value.Type)) { // C# autoquotes return values, so we'll do that here if (TypeUtils.IsSameOrSubclass(typeof(Expression), expectedType) && expectedType.IsAssignableFrom(value.GetType())) { value = Expression.Quote(value); } throw Error.ExpressionTypeDoesNotMatchLabel(value.Type, expectedType); } }
// Standard argument validation, taken from ValidateArgumentTypes private static void ValidateGotoType(Type expectedType, ref Expression value, string paramName) { ExpressionUtils.RequiresCanRead(value, paramName); if (expectedType != typeof(void)) { if (!TypeUtils.AreReferenceAssignable(expectedType, value.Type)) { // C# auto-quotes return values, so we'll do that here if (!TryQuote(expectedType, ref value)) { throw Error.ExpressionTypeDoesNotMatchLabel(value.Type, expectedType); } } } }