Imported Upstream version 3.6.0

Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
This commit is contained in:
Jo Shields
2014-08-13 10:39:27 +01:00
commit a575963da9
50588 changed files with 8155799 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,46 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractAbbreviatorAttribute" FullName="System.Diagnostics.Contracts.ContractAbbreviatorAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractAbbreviatorAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractAbbreviatorAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Method)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Defines abbreviations that you can use in place of the full contract syntax.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractAbbreviatorAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractAbbreviatorAttribute" /> class.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractArgumentValidatorAttribute" FullName="System.Diagnostics.Contracts.ContractArgumentValidatorAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractArgumentValidatorAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractArgumentValidatorAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Method)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If your code uses explicit if-then-throw code to validate parameters, you may be employing helper methods that perform checks and throw particular exceptions on failure, as shown in the following example.</para>
<code>static class ValidationHelper
{
public static void NotNull(object argument, string parameterName)
{
if (argument == null) throw new ArgumentNullException(parameterName, ...);
}
}
...
public void MyMethod(string value)
{
ValidationHelper .NotNull(value , "value");
...
}
</code>
<para>In this example, MyMethod has an elective precondition specifying that the parameter value should not be null. To enable the contract tools to recognize that the call to ValidationHelper.NotNull represents a contract, you can mark the called method with the ContractArgumentValidator attribute. The EndContractBlock() call should be used to enable the tools to extract the proper specifications for document generation and static checking, as follows.</para>
<code>static class ValidationHelper {
[ContractArgumentValidator]
public static void NotNull(object argument, string parameterName) {
if (argument == null) throw new ArgumentNullException(parameterName, ...);
Contract.EndContractBlock();
...
}
}
</code>
<para>In addition to if-then-throw statements, the contract section of contract validator methods may contain calls to other contract validator methods. However, no other contracts (such as <see cref="M:System.Diagnostics.Contracts.Contract.Requires(System.Boolean)" />, or <see cref="M:System.Diagnostics.Contracts.Contract.Ensures(System.Boolean)" />) are allowed. Code that follows the EndContractBlock() call is ignored by all contract tools.The following example shows a range argument validator written in terms of an existing NotNull validator method.</para>
<code>static class ValidationHelper
{
[ContractArgumentValidator]
public static void NotNull(object argument, string parameterName)
{ ... }
[ContractArgumentValidator]
public static void InRange(object[] array , int index , string arrayName, string indexName) {
ValidationHelper .NotNull(array , arrayName);
if (index &lt; 0) throw new ArgumentOutOfRangeException(indexName, ...);
if (index &gt;= array.Length) throw new ArgumentOutOfRangeException(indexName, ...);
Contract.EndContractBlock();
...
}
...
public void MyMethod(int[] data, int position )
{
ValidationHelper .InRange(data, position , "data", " position ");
...
}
</code>
<para>From a specification point of view, the method MyMethod has the following three contracts:</para>
<code>Contract.Requires&lt;ArgumentNullException&gt;(data != null);
Contract.Requires&lt;ArgumentOutOfRangeException&gt;(position &gt;= 0);
Contract.Requires&lt;ArgumentOutOfRangeException&gt;(position &lt; data.Length);
</code>
<para>In standard methods, calls to contract validator methods can be freely mixed with other contracts such as <see cref="M:System.Diagnostics.Contracts.Contract.Ensures(System.Boolean)" /> or <see cref="M:System.Diagnostics.Contracts.Contract.Requires(System.Boolean)" />.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Enables the factoring of legacy if-then-throw code into separate methods for reuse, and provides full control over thrown exceptions and arguments.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractArgumentValidatorAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractArgumentValidatorAttribute" /> class.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,75 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractClassAttribute" FullName="System.Diagnostics.Contracts.ContractClassAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractClassAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractClassAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface | System.AttributeTargets.Delegate | System.AttributeTargets.All, Inherited=false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("DEBUG")</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Types that are marked with this attribute have code contracts that are included in a separate type. The type that contains the contracts is specified in the constructor. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies that a separate type contains the code contracts for this type.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractClassAttribute (Type typeContainingContracts);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type typeContainingContracts) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="typeContainingContracts" Type="System.Type" />
</Parameters>
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractClassAttribute" /> class. </para>
</summary>
<param name="typeContainingContracts">
<attribution license="cc4" from="Microsoft" modified="false" />The type that contains the code contracts for this type.</param>
</Docs>
</Member>
<Member MemberName="TypeContainingContracts">
<MemberSignature Language="C#" Value="public Type TypeContainingContracts { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type TypeContainingContracts" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<value>The type that contains the code contract specifications.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the type that contains the code contracts for this type.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractClassForAttribute" FullName="System.Diagnostics.Contracts.ContractClassForAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractClassForAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractClassForAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class, Inherited=false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Types that are marked with this attribute represent a code contract for another type. The type that the contract applies to is specified in the constructor. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies that a class is a contract for a type.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractClassForAttribute (Type typeContractsAreFor);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type typeContractsAreFor) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="typeContractsAreFor" Type="System.Type" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The following example shows how to use the <see cref="M:System.Diagnostics.Contracts.ContractClassAttribute.#ctor(System.Type)" /> constructor to specify that the contracts in the type apply to the IArray interface. This code example is part of a larger example provided for the <see cref="T:System.Diagnostics.Contracts.ContractClassAttribute" /> class.</para>
<para>code reference: ContractExample#4</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractClassForAttribute" /> class, specifying the type the current class is a contract for. </para>
</summary>
<param name="typeContractsAreFor">
<attribution license="cc4" from="Microsoft" modified="false" />The type the current class is a contract for.</param>
</Docs>
</Member>
<Member MemberName="TypeContractsAreFor">
<MemberSignature Language="C#" Value="public Type TypeContractsAreFor { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Type TypeContractsAreFor" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Type</ReturnType>
</ReturnValue>
<Docs>
<value>The type for which these are the code contract specifications.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the type that this code contract applies to. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,226 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractFailedEventArgs" FullName="System.Diagnostics.Contracts.ContractFailedEventArgs">
<TypeSignature Language="C#" Value="public sealed class ContractFailedEventArgs : EventArgs" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractFailedEventArgs extends System.EventArgs" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="T:System.Diagnostics.Contracts.ContractFailedEventArgs" /> object is passed to the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event when a contract fails. The <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event enables a managed application environment such as an interactive interpreter, a Web browser host, a test harness, or a logging infrastructure to be notified of contract failures. The event requires full trust. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides methods and data for the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractFailedEventArgs (System.Diagnostics.Contracts.ContractFailureKind failureKind, string message, string condition, Exception originalException);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(valuetype System.Diagnostics.Contracts.ContractFailureKind failureKind, string message, string condition, class System.Exception originalException) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Attributes>
<Attribute>
<AttributeName>System.Runtime.ConstrainedExecution.ReliabilityContract(System.Runtime.ConstrainedExecution.Consistency.WillNotCorruptState, System.Runtime.ConstrainedExecution.Cer.MayFail)</AttributeName>
</Attribute>
</Attributes>
<Parameters>
<Parameter Name="failureKind" Type="System.Diagnostics.Contracts.ContractFailureKind" />
<Parameter Name="message" Type="System.String" />
<Parameter Name="condition" Type="System.String" />
<Parameter Name="originalException" Type="System.Exception" />
</Parameters>
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Provides data for the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event.</para>
</summary>
<param name="failureKind">
<attribution license="cc4" from="Microsoft" modified="false" />One of the enumeration values that specifies the contract that failed.</param>
<param name="message">
<attribution license="cc4" from="Microsoft" modified="false" />The message for the event.</param>
<param name="condition">
<attribution license="cc4" from="Microsoft" modified="false" />The condition for the event.</param>
<param name="originalException">
<attribution license="cc4" from="Microsoft" modified="false" />The exception that caused the event.</param>
</Docs>
</Member>
<Member MemberName="Condition">
<MemberSignature Language="C#" Value="public string Condition { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Condition" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>The condition that caused the contract failure.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the condition for the failure of the contract.</para>
</summary>
</Docs>
</Member>
<Member MemberName="FailureKind">
<MemberSignature Language="C#" Value="public System.Diagnostics.Contracts.ContractFailureKind FailureKind { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance valuetype System.Diagnostics.Contracts.ContractFailureKind FailureKind" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<value>The kind of contract failure.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the type of contract that failed.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Handled">
<MemberSignature Language="C#" Value="public bool Handled { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Handled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>Whether the contract failure has been handled.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event has not been handled, the debugger is notified. If no debugger is attached, an <ui>Assert</ui> dialog box is displayed.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Indicates whether the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event has been handled.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Message">
<MemberSignature Language="C#" Value="public string Message { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Message" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>The message associated with this contract failure.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the message that describes the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event.</para>
</summary>
</Docs>
</Member>
<Member MemberName="OriginalException">
<MemberSignature Language="C#" Value="public Exception OriginalException { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance class System.Exception OriginalException" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Exception</ReturnType>
</ReturnValue>
<Docs>
<value>The original exception that caused this contract failure, if any.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the original exception that caused the <see cref="E:System.Diagnostics.Contracts.Contract.ContractFailed" /> event.</para>
</summary>
</Docs>
</Member>
<Member MemberName="SetHandled">
<MemberSignature Language="C#" Value="public void SetHandled ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetHandled() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Diagnostics.Contracts.ContractFailedEventArgs.SetHandled" /> method provides a way for the runtime analysis checker to indicate that a contract exception has been handled. See the <see cref="P:System.Diagnostics.Contracts.ContractFailedEventArgs.Handled" /> property for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the <see cref="P:System.Diagnostics.Contracts.ContractFailedEventArgs.Handled" /> property to true.</para>
</summary>
</Docs>
</Member>
<Member MemberName="SetUnwind">
<MemberSignature Language="C#" Value="public void SetUnwind ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetUnwind() cil managed" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="M:System.Diagnostics.Contracts.ContractFailedEventArgs.SetUnwind" /> method provides a way to indicate that the escalation policy for the code contract should be applied. See the <see cref="P:System.Diagnostics.Contracts.ContractFailedEventArgs.Unwind" /> property for more information.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Sets the <see cref="P:System.Diagnostics.Contracts.ContractFailedEventArgs.Unwind" /> property to true.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Unwind">
<MemberSignature Language="C#" Value="public bool Unwind { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Unwind" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>Whether the contract failure should unwind the stack.</value>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>If the return value is true, the escalation policy is to notify the attached debugger about a contract failure or to display an <ui>Assert</ui> dialog box if a debugger is not attached.</para>
<block subset="none" type="note">
<para>This value should be set to false for analysis tools that run on a server (for example, ASP.NET).</para>
</block>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Indicates whether the code contract escalation policy should be applied.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractFailureKind" FullName="System.Diagnostics.Contracts.ContractFailureKind">
<TypeSignature Language="C#" Value="public enum ContractFailureKind" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed ContractFailureKind extends System.Enum" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>
</Base>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The <see cref="T:System.Diagnostics.Contracts.ContractFailureKind" /> enumeration is used by the <see cref="T:System.Diagnostics.Contracts.ContractFailedEventArgs" /> class.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies the type of contract that failed. </para>
</summary>
</Docs>
<Members>
<Member MemberName="Assert">
<MemberSignature Language="C#" Value="Assert" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind Assert = int32(4)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="Overload:System.Diagnostics.Contracts.Contract.Assert" /> contract failed.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Assume">
<MemberSignature Language="C#" Value="Assume" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind Assume = int32(5)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="Overload:System.Diagnostics.Contracts.Contract.Assume" /> contract failed.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Invariant">
<MemberSignature Language="C#" Value="Invariant" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind Invariant = int32(3)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="Overload:System.Diagnostics.Contracts.Contract.Invariant" /> contract failed.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Postcondition">
<MemberSignature Language="C#" Value="Postcondition" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind Postcondition = int32(1)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="Overload:System.Diagnostics.Contracts.Contract.Ensures" /> contract failed. </para>
</summary>
</Docs>
</Member>
<Member MemberName="PostconditionOnException">
<MemberSignature Language="C#" Value="PostconditionOnException" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind PostconditionOnException = int32(2)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>An <see cref="Overload:System.Diagnostics.Contracts.Contract.EnsuresOnThrow" /> contract failed.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Precondition">
<MemberSignature Language="C#" Value="Precondition" />
<MemberSignature Language="ILAsm" Value=".field public static literal valuetype System.Diagnostics.Contracts.ContractFailureKind Precondition = int32(0)" />
<MemberType>Field</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Diagnostics.Contracts.ContractFailureKind</ReturnType>
</ReturnValue>
<Docs>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A <see cref="Overload:System.Diagnostics.Contracts.Contract.Requires" /> contract failed.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractInvariantMethodAttribute" FullName="System.Diagnostics.Contracts.ContractInvariantMethodAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractInvariantMethodAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractInvariantMethodAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Method, Inherited=false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The invariant method can have any name, but it must return void and take no parameters. A suggested name for the method is ObjectInvariant. The body of the invariant method must consist solely of one or more calls to the <see cref="M:System.Diagnostics.Contracts.Contract.Invariant(System.Boolean)" /> method. A type can have more than one contract invariant method, which can be public or private. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Marks a method as being the invariant method for a class.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractInvariantMethodAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractInvariantMethodAttribute" /> class. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,235 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractOptionAttribute" FullName="System.Diagnostics.Contracts.ContractOptionAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractOptionAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractOptionAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.All, AllowMultiple=true, Inherited=false)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>The following table shows the currently supported options.</para>
<list type="table">
<listheader>
<item>
<term>
<para>Category</para>
</term>
<description>
<para>Setting</para>
</description>
<description>
<para>Value/effect</para>
</description>
</item>
</listheader>
<item>
<term>
<para>contract</para>
</term>
<description>
<para>inheritance</para>
</description>
<description>
<para>true to turn contract inheritance on; false to turn it off. The default is true.</para>
</description>
</item>
<item>
<term>
<para>runtime</para>
</term>
<description>
<para>checking</para>
</description>
<description>
<para>true to turn run-time checking on; false to turn it off. The default is true.</para>
</description>
</item>
</list>
<para>You can use this attribute as illustrated in the following examples.</para>
<para>To turn off run-time checking for the entire assembly:</para>
<code>[assembly:ContractOption("runtime", "checking", false)]</code>
<para>To turn run-time contract checking on for a specific type:</para>
<code>   [ContractOption("runtime", "checking", true)]
   class TypeWithRuntimeChecking {
 
       ...
</code>
<para>To turn run-time checking off for a specific method:</para>
<code>// Turn off all contract inheritance from interface IList&lt;T&gt;
[ContractOption("contract", "inheritance", false)]
class MyConcurrentList&lt;T&gt; : IList&lt;T&gt; {
   ...
}
 
[ContractOption("runtime", "checking", false)]
public override MyMethod(int x) {
   // no inherited contracts checked at runtime,
   // no invariants checked at runtime.
   ...
}
  
       [ContractOption("runtime", "checking", false)]
       public void MethodWithoutRuntimeChecking(...) {
          ...
       }
   }
</code>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Enables you to set contract and tool options at assembly, type, or method granularity.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractOptionAttribute (string category, string setting, bool enabled);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string category, string setting, bool enabled) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="category" Type="System.String" />
<Parameter Name="setting" Type="System.String" />
<Parameter Name="enabled" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractOptionAttribute" /> class by using the provided category, setting, and enable/disable value.</para>
</summary>
<param name="category">
<attribution license="cc4" from="Microsoft" modified="false" />The category for the option to be set.</param>
<param name="setting">
<attribution license="cc4" from="Microsoft" modified="false" />The option setting.</param>
<param name="enabled">
<attribution license="cc4" from="Microsoft" modified="false" />true to enable the option; false to disable the option.</param>
</Docs>
</Member>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractOptionAttribute (string category, string setting, string value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string category, string setting, string value) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="category" Type="System.String" />
<Parameter Name="setting" Type="System.String" />
<Parameter Name="value" Type="System.String" />
</Parameters>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>There are only two category/setting options, and they can be set by either of the constructor overloads. You can use this overload with the same settings as the <see cref="M:System.Diagnostics.Contracts.ContractOptionAttribute.#ctor(System.String,System.String,System.Boolean)" /> overload by specifying "true" or "false" in string format; for example:</para>
<code>[ContractOption("contract", "inheritance", “false”)]
class MyConcurrentList&lt;T&gt; : IList&lt;T&gt; {
   ...
}
</code>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractOptionAttribute" /> class by using the provided category, setting, and value.</para>
</summary>
<param name="category">
<attribution license="cc4" from="Microsoft" modified="false" />The category of the option to be set.</param>
<param name="setting">
<attribution license="cc4" from="Microsoft" modified="false" />The option setting.</param>
<param name="value">
<attribution license="cc4" from="Microsoft" modified="false" />The value for the setting.</param>
</Docs>
</Member>
<Member MemberName="Category">
<MemberSignature Language="C#" Value="public string Category { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Category" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the category of the option.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Enabled">
<MemberSignature Language="C#" Value="public bool Enabled { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Enabled" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Determines if an option is enabled.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Setting">
<MemberSignature Language="C#" Value="public string Setting { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Setting" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the setting for the option.</para>
</summary>
</Docs>
</Member>
<Member MemberName="Value">
<MemberSignature Language="C#" Value="public string Value { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Value" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>To be added.</value>
<remarks>To be added.</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the value for the option.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractPublicPropertyNameAttribute" FullName="System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractPublicPropertyNameAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractPublicPropertyNameAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Field)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>When you apply the <see cref="T:System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute" /> attribute to a field, that field can be used in the code contracts for a method when the field has less visibility than the method. There must be a visible property that is equivalent to the value of the field. For example, you can use this attribute if the method is public, but the field is private. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies that a field can be used in method contracts when the field has less visibility than the method. </para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractPublicPropertyNameAttribute (string name);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(string name) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="name" Type="System.String" />
</Parameters>
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractPublicPropertyNameAttribute" /> class. </para>
</summary>
<param name="name">
<attribution license="cc4" from="Microsoft" modified="false" />The property name to apply to the field.</param>
</Docs>
</Member>
<Member MemberName="Name">
<MemberSignature Language="C#" Value="public string Name { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance string Name" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<value>The name of the public property associated with this field.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the property name to be applied to the field.</para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractReferenceAssemblyAttribute" FullName="System.Diagnostics.Contracts.ContractReferenceAssemblyAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractReferenceAssemblyAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractReferenceAssemblyAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Assembly)</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>A contract reference assembly is named assembly.Contracts.dll, where assembly is the name of the assembly from which the contracts were extracted. A contract reference assembly contains the publicly visible interface of an assembly and its contracts, but contains no code. Contract reference assemblies are used both by the runtime analyzer to inherit contracts across assemblies, and during static verification to discover contracts on methods and types from assemblies outside the assembly that is under analysis. </para>
<para>For more information about using attributes, see <format type="text/html"><a href="30386922-1e00-4602-9ebf-526b271a8b87">Extending Metadata Using Attributes</a></format>.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Specifies that an assembly is a reference assembly that contains contracts.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractReferenceAssemblyAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractReferenceAssemblyAttribute" /> class. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractRuntimeIgnoredAttribute" FullName="System.Diagnostics.Contracts.ContractRuntimeIgnoredAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractRuntimeIgnoredAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractRuntimeIgnoredAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.All, AllowMultiple=false, Inherited=true)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Methods and properties that are marked with this attribute can be used within calls to <see cref="T:System.Diagnostics.Contracts.Contract" /> methods, but they have no run-time behavior.</para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Identifies a member that has no run-time behavior.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractRuntimeIgnoredAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractRuntimeIgnoredAttribute" /> class. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="ContractVerificationAttribute" FullName="System.Diagnostics.Contracts.ContractVerificationAttribute">
<TypeSignature Language="C#" Value="public sealed class ContractVerificationAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit ContractVerificationAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Struct | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.All)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Use ContractVerification(false) to explicitly mark an assembly, type, or member as not requiring verification. The most specific element found (member, type, and then assembly) takes precedence. Applying this attribute to a property, type, or assembly has the following effects:</para>
<list type="bullet">
<item>
<para>When you apply it to a property, it applies to both the get accessor and the set accessor.</para>
</item>
<item>
<para>When you apply it to a type, it applies to all members of the type, including nested types. </para>
</item>
<item>
<para>When you apply it to an assembly, it applies to all types and members of the assembly.</para>
</item>
</list>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Instructs analysis tools to assume the correctness of an assembly, type, or member without performing static verification.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public ContractVerificationAttribute (bool value);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(bool value) cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters>
<Parameter Name="value" Type="System.Boolean" />
</Parameters>
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.ContractVerificationAttribute" /> class. </para>
</summary>
<param name="value">
<attribution license="cc4" from="Microsoft" modified="false" />true to require verification; otherwise, false. </param>
</Docs>
</Member>
<Member MemberName="Value">
<MemberSignature Language="C#" Value="public bool Value { get; }" />
<MemberSignature Language="ILAsm" Value=".property instance bool Value" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<value>Whether to include this item in verification.</value>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Gets the value that indicates whether to verify the contract of the target. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>

View File

@@ -0,0 +1,49 @@
<?xml version="1.0" encoding="utf-8"?>
<Type Name="PureAttribute" FullName="System.Diagnostics.Contracts.PureAttribute">
<TypeSignature Language="C#" Value="public sealed class PureAttribute : Attribute" />
<TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit PureAttribute extends System.Attribute" />
<AssemblyInfo>
<AssemblyName>mscorlib</AssemblyName>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Attribute</BaseTypeName>
</Base>
<Interfaces />
<Attributes>
<Attribute>
<AttributeName>System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Constructor | System.AttributeTargets.Method | System.AttributeTargets.Property | System.AttributeTargets.Event | System.AttributeTargets.Parameter | System.AttributeTargets.Delegate | System.AttributeTargets.All)</AttributeName>
</Attribute>
<Attribute>
<AttributeName>System.Diagnostics.Conditional("CONTRACTS_FULL")</AttributeName>
</Attribute>
</Attributes>
<Docs>
<remarks>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Methods and types that are marked with this attribute can be used in calls to <see cref="T:System.Diagnostics.Contracts.Contract" /> methods. Pure methods do not make any visible state changes. This attribute is not enforced by the current analysis tools; you should use this attribute only if you are sure that the methods are pure. </para>
</remarks>
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Indicates that a type or method is pure, that is, it does not make any visible state changes.</para>
</summary>
</Docs>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public PureAttribute ();" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
<MemberType>Constructor</MemberType>
<AssemblyInfo>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Parameters />
<Docs>
<remarks />
<summary>
<attribution license="cc4" from="Microsoft" modified="false" />
<para>Initializes a new instance of the <see cref="T:System.Diagnostics.Contracts.PureAttribute" /> class. </para>
</summary>
</Docs>
</Member>
</Members>
</Type>