Archive

Async

Custom Attribute That Makes the Method Asynchronous

public class AsyncAttribute : OnMethodInvocationAspect
{
  public override void OnInvocation(MethodInvocationEventArgs eventArgs)
  {
    ThreadPool.QueueUserWorkItem(delegate { eventArgs.Proceed(); });
  }
}

Comments are closed