External/Aga.Controls/Threading/WorkItem.cs
changeset 345 0c551e8818e0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/External/Aga.Controls/Threading/WorkItem.cs	Sun May 27 15:16:19 2012 +0000
     1.3 @@ -0,0 +1,45 @@
     1.4 +using System;
     1.5 +using System.Collections.Generic;
     1.6 +using System.Text;
     1.7 +using System.Threading;
     1.8 +
     1.9 +namespace Aga.Controls.Threading
    1.10 +{
    1.11 +	public sealed class WorkItem
    1.12 +	{
    1.13 +		private WaitCallback _callback;
    1.14 +		private object _state;
    1.15 +		private ExecutionContext _ctx;
    1.16 +
    1.17 +		internal WorkItem(WaitCallback wc, object state, ExecutionContext ctx)
    1.18 +		{
    1.19 +			_callback = wc; 
    1.20 +			_state = state; 
    1.21 +			_ctx = ctx;
    1.22 +		}
    1.23 +
    1.24 +		internal WaitCallback Callback
    1.25 +		{
    1.26 +			get
    1.27 +			{
    1.28 +				return _callback;
    1.29 +			}
    1.30 +		}
    1.31 +
    1.32 +		internal object State
    1.33 +		{
    1.34 +			get
    1.35 +			{
    1.36 +				return _state;
    1.37 +			}
    1.38 +		}
    1.39 +
    1.40 +		internal ExecutionContext Context
    1.41 +		{
    1.42 +			get
    1.43 +			{
    1.44 +				return _ctx;
    1.45 +			}
    1.46 +		}
    1.47 +	}
    1.48 +}