48 references to ContractFailureKind
mscorlib (48)
system\diagnostics\contracts\contracts.cs (22)
306
ReportFailure(
ContractFailureKind
.Assume, null, null, null);
327
ReportFailure(
ContractFailureKind
.Assume, userMessage, null, null);
348
ReportFailure(
ContractFailureKind
.Assert, null, null, null);
365
ReportFailure(
ContractFailureKind
.Assert, userMessage, null, null);
388
AssertMustUseRewriter(
ContractFailureKind
.Precondition, "Requires");
408
AssertMustUseRewriter(
ContractFailureKind
.Precondition, "Requires");
428
AssertMustUseRewriter(
ContractFailureKind
.Precondition, "Requires<TException>");
450
AssertMustUseRewriter(
ContractFailureKind
.Precondition, "Requires<TException>");
473
AssertMustUseRewriter(
ContractFailureKind
.Postcondition, "Ensures");
493
AssertMustUseRewriter(
ContractFailureKind
.Postcondition, "Ensures");
514
AssertMustUseRewriter(
ContractFailureKind
.PostconditionOnException, "EnsuresOnThrow");
536
AssertMustUseRewriter(
ContractFailureKind
.PostconditionOnException, "EnsuresOnThrow");
610
AssertMustUseRewriter(
ContractFailureKind
.Invariant, "Invariant");
630
AssertMustUseRewriter(
ContractFailureKind
.Invariant, "Invariant");
893
static partial void ReportFailure(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException);
899
static partial void AssertMustUseRewriter(
ContractFailureKind
kind, String contractKind);
940
public static string RaiseContractFailedEvent(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException)
952
public static void TriggerFailure(
ContractFailureKind
kind, String displayMessage, String userMessage, String conditionText, Exception innerException)
979
public static string RaiseContractFailedEvent(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException)
994
public static void TriggerFailure(
ContractFailureKind
kind, String displayMessage, String userMessage, String conditionText, Exception innerException)
1014
static partial void RaiseContractFailedEventImplementation(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException, ref string resultFailureMessage);
1019
static partial void TriggerFailureImplementation(
ContractFailureKind
kind, String displayMessage, String userMessage, String conditionText, Exception innerException);
system\diagnostics\contracts\contractsbcl.cs (25)
58
static partial void AssertMustUseRewriter(
ContractFailureKind
kind, String contractKind)
102
static partial void ReportFailure(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException)
104
if (failureKind <
ContractFailureKind
.Precondition || failureKind >
ContractFailureKind
.Assume)
150
private
ContractFailureKind
_failureKind;
162
public ContractFailedEventArgs(
ContractFailureKind
failureKind, String message, String condition, Exception originalException)
164
Contract.Requires(originalException == null || failureKind ==
ContractFailureKind
.PostconditionOnException);
173
public
ContractFailureKind
FailureKind { get { return _failureKind; } }
216
readonly
ContractFailureKind
_Kind;
221
public
ContractFailureKind
Kind { get { return _Kind; } }
235
public ContractException(
ContractFailureKind
kind, string failure, string userMessage, string condition, Exception innerException)
248
_Kind = (
ContractFailureKind
)info.GetInt32("Kind");
340
static partial void RaiseContractFailedEventImplementation(
ContractFailureKind
failureKind, String userMessage, String conditionText, Exception innerException, ref string resultFailureMessage)
342
if (failureKind <
ContractFailureKind
.Precondition || failureKind >
ContractFailureKind
.Assume)
408
static partial void TriggerFailureImplementation(
ContractFailureKind
kind, String displayMessage, String userMessage, String conditionText, Exception innerException)
438
private static String GetResourceNameForFailure(
ContractFailureKind
failureKind)
443
case
ContractFailureKind
.Assert:
447
case
ContractFailureKind
.Assume:
451
case
ContractFailureKind
.Precondition:
455
case
ContractFailureKind
.Postcondition:
459
case
ContractFailureKind
.Invariant:
463
case
ContractFailureKind
.PostconditionOnException:
478
private static String GetDisplayMessage(
ContractFailureKind
failureKind, String userMessage, String conditionText)
520
private static void TriggerCodeContractEscalationPolicy(
ContractFailureKind
failureKind, String message, String conditionText, Exception innerException)
system\environment.cs (1)
345
internal static extern void TriggerCodeContractFailure(
ContractFailureKind
failureKind, String message, String condition, String exceptionAsString);