﻿<?xml version="1.0" encoding="utf-8"?><Type Name="StateMachineAttribute" FullName="System.Runtime.CompilerServices.StateMachineAttribute"><TypeSignature Language="C#" Value="public class StateMachineAttribute : Attribute" /><TypeSignature Language="ILAsm" Value=".class public auto ansi serializable beforefieldinit StateMachineAttribute 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></Attributes><Docs><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>You should not apply the <unmanagedCodeEntityReference>StateMachine</unmanagedCodeEntityReference> attribute to methods in your code. For methods that are state machine methods, the compiler will apply the <see cref="T:System.Runtime.CompilerServices.AsyncStateMachineAttribute" /> or <see cref="T:System.Runtime.CompilerServices.IteratorStateMachineAttribute" /> in the emitted IL.</para><para>When checking whether a method is a state machine method, it is preferable to instead check for following attributes, which are derived from <unmanagedCodeEntityReference>StateMachineAttribute</unmanagedCodeEntityReference>:</para><list type="bullet"><item><para><see cref="T:System.Runtime.CompilerServices.AsyncStateMachineAttribute" /></para></item><item><para><see cref="T:System.Runtime.CompilerServices.IteratorStateMachineAttribute" /></para></item></list><block subset="none" type="note"><para><unmanagedCodeEntityReference>StateMachineAttribute</unmanagedCodeEntityReference> cannot be used to check whether a method is a state machine method if the method is an iterator method in C#.</para></block></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Allows you to determine whether a method is a state machine method.</para></summary></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public StateMachineAttribute (Type stateMachineType);" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor(class System.Type stateMachineType) cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><Parameters><Parameter Name="stateMachineType" Type="System.Type" /></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.Runtime.CompilerServices.StateMachineAttribute" /> class.</para></summary><param name="stateMachineType"><attribution license="cc4" from="Microsoft" modified="false" />The type object for the underlying state machine type that was generated by the compiler to implement the state machine method.</param></Docs></Member><Member MemberName="StateMachineType"><MemberSignature Language="C#" Value="public Type StateMachineType { get; }" /><MemberSignature Language="ILAsm" Value=".property instance class System.Type StateMachineType" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>4.0.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Type</ReturnType></ReturnValue><Docs><value>To be added.</value><remarks><attribution license="cc4" from="Microsoft" modified="false" /><para>This property may be useful for debuggers and reflection tools.</para></remarks><summary><attribution license="cc4" from="Microsoft" modified="false" /><para>Returns the type object for the underlying state machine type that was generated by the compiler to implement the state machine method.</para></summary></Docs></Member></Members></Type>