Skip to content

Instantly share code, notes, and snippets.

@csainty
Created February 18, 2013 19:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save csainty/4980042 to your computer and use it in GitHub Desktop.
Save csainty/4980042 to your computer and use it in GitHub Desktop.
[AsyncStateMachine(typeof (Class1.<ExecuteAsync>d__0))]
[DebuggerStepThrough]
public Task ExecuteAsync()
{
Class1.<ExecuteAsync>d__0 stateMachine;
stateMachine.<>4__this = this;
stateMachine.<>t__builder = AsyncTaskMethodBuilder.Create();
stateMachine.<>1__state = -1;
stateMachine.<>t__builder.Start<Class1.<ExecuteAsync>d__0>(ref stateMachine);
return stateMachine.<>t__builder.Task;
}
[CompilerGenerated]
[StructLayout(LayoutKind.Auto)]
private struct <ExecuteAsync>d__0 : IAsyncStateMachine
{
public int <>1__state;
public AsyncTaskMethodBuilder <>t__builder;
public Class1 <>4__this;
void IAsyncStateMachine.MoveNext()
{
try
{
if (this.<>1__state != -3)
;
}
catch (Exception ex)
{
this.<>1__state = -2;
this.<>t__builder.SetException(ex);
return;
}
this.<>1__state = -2;
this.<>t__builder.SetResult();
}
[DebuggerHidden]
void IAsyncStateMachine.SetStateMachine(IAsyncStateMachine param0)
{
this.<>t__builder.SetStateMachine(param0);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment