﻿<?xml version="1.0" encoding="utf-8"?><Type Name="Cer" FullName="System.Runtime.ConstrainedExecution.Cer"><TypeSignature Language="C#" Value="public enum Cer" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable sealed Cer extends System.Enum" /><AssemblyInfo><AssemblyName>mscorlib</AssemblyName><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>System.Enum</BaseTypeName></Base><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>The <see cref="T:System.Runtime.ConstrainedExecution.Cer" /> enumeration specifies the behavior of a method, type, or assembly within a constrained execution region (CER). Use one of the three available values to indicate that the entity will succeed, has no knowledge of a CER, or might (deterministically) be able to report success or failure.</para><para>A CER provides guarantees that the region of code will execute uninterrupted even if an asynchronous exception such as an aborted thread out-of-memory exception, or stack overflow is raised.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Specifies a method's behavior when called within a constrained execution region.</para></summary></Docs><Members><Member MemberName="MayFail"><MemberSignature Language="C#" Value="MayFail" /><MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Runtime.ConstrainedExecution.Cer MayFail = int32(1)" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Runtime.ConstrainedExecution.Cer</ReturnType></ReturnValue><Docs><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>In the face of exceptional conditions, the method might fail. In this case, the method will report back to the calling method whether it succeeded or failed. The method must have a CER around the method body to ensure that it can report the return value.</para></summary></Docs></Member><Member MemberName="None"><MemberSignature Language="C#" Value="None" /><MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Runtime.ConstrainedExecution.Cer None = int32(0)" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Runtime.ConstrainedExecution.Cer</ReturnType></ReturnValue><Docs><since version=".NET 2.0" /><remarks><attribution license="cc4" from="Microsoft" modified="false" /><list type="bullet"><item><para>In the face of exceptional conditions the method might fail.</para></item><item><para>The method might or might not report that it failed (it is non-deterministic).</para></item><item><para>The method is not written with CERs in mind (which is the most likely scenario).</para></item></list><para>If a method, type, or assembly is not explicitly marked to succeed, it is implicitly marked as Cer.None.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>The method, type, or assembly has no concept of a CER. It does not take advantage of CER guarantees. This implies the following:</para></summary></Docs></Member><Member MemberName="Success"><MemberSignature Language="C#" Value="Success" /><MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Runtime.ConstrainedExecution.Cer Success = int32(2)" /><MemberType>Field</MemberType><AssemblyInfo><AssemblyVersion>2.0.0.0</AssemblyVersion><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Runtime.ConstrainedExecution.Cer</ReturnType></ReturnValue><Docs><since version=".NET 2.0" /><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>In the face of exceptional conditions, the method is guaranteed to succeed. You should always construct a CER around the method that is called, even when it is called from within a non-CER region. A method is successful if it accomplishes what is intended. For example, marking <see cref="P:System.Collections.ArrayList.Count" /> with ReliabilityContractAttribute(Cer.Success) implies that when it is run under a CER, it always returns a count of the number of elements in the <see cref="T:System.Collections.ArrayList" /> and it can never leave the internal fields in an undetermined state.</para></summary></Docs></Member></Members></Type>