External/Aga.Controls/Threading/WorkItem.cs
author moel.mich
Sun, 23 Sep 2012 18:37:43 +0000
changeset 380 573f1fff48b2
permissions -rw-r--r--
Fixed Issue 387. The new implementation does not try to start a ring 0 driver that already exists, but could not be opened. It tries to delete the driver and install it new. The driver is now stored temporarily in the application folder. The driver is not correctly removed on system shutdown.
     1 using System;
     2 using System.Collections.Generic;
     3 using System.Text;
     4 using System.Threading;
     5 
     6 namespace Aga.Controls.Threading
     7 {
     8 	public sealed class WorkItem
     9 	{
    10 		private WaitCallback _callback;
    11 		private object _state;
    12 		private ExecutionContext _ctx;
    13 
    14 		internal WorkItem(WaitCallback wc, object state, ExecutionContext ctx)
    15 		{
    16 			_callback = wc; 
    17 			_state = state; 
    18 			_ctx = ctx;
    19 		}
    20 
    21 		internal WaitCallback Callback
    22 		{
    23 			get
    24 			{
    25 				return _callback;
    26 			}
    27 		}
    28 
    29 		internal object State
    30 		{
    31 			get
    32 			{
    33 				return _state;
    34 			}
    35 		}
    36 
    37 		internal ExecutionContext Context
    38 		{
    39 			get
    40 			{
    41 				return _ctx;
    42 			}
    43 		}
    44 	}
    45 }