System.Diagnostics.Contracts.ContractFailedEventArgs.SetUnwind C# (CSharp) Method

SetUnwind() public method

public SetUnwind ( ) : void
return void
		public void SetUnwind ()
		{
			Unwind = true;
		}

Usage Example

Esempio n. 1
0
        public static void ContractFailed(object sender, ContractFailedEventArgs e)
        {
            if (e == null)
            {
                return;
            }

            e.SetUnwind();  // Causes the code to throw a ContractException after the event finishes
            Assert.Fail(string.Format(CultureInfo.InvariantCulture, "{0}: {1}\r\nCondition: {2}", e.FailureKind, e.Message, e.Condition));
        }
All Usage Examples Of System.Diagnostics.Contracts.ContractFailedEventArgs::SetUnwind