MonodroidStockPortfolio/MonoStockPortfolio/Framework/OnWorkerThreadAttribute.cs

13 lines
334 B
C#
Raw Normal View History

using System.Threading;
using PostSharp.Aspects;
namespace MonoStockPortfolio.Framework
{
public class OnWorkerThreadAttribute : MethodInterceptionAspect
{
public override void OnInvoke(MethodInterceptionArgs args)
{
ThreadPool.QueueUserWorkItem(d => args.Proceed());
}
}
}