Example #1
0
        /// <summary>
        /// Выполнение действия
        /// </summary>
        /// <param name="workItemState">Единица работы для исполнения</param>
        private static void RunInnerHelper(object workItemState)
        {
            ThreadPoolWorkItem workItem = (ThreadPoolWorkItem)workItemState;

            Debug.Assert(workItem != null);
            workItem.RunInner();
        }
Example #2
0
        /// <summary>
        /// Helper method to run work item when state object is required
        /// </summary>
        /// <param name="workItemState"><see cref="ThreadPoolWorkItem"/> to be executed</param>
        private static void RunInnerHelper(object workItemState)
        {
            ThreadPoolWorkItem workItem = (ThreadPoolWorkItem)workItemState;

            TurboContract.Assert(workItem != null, conditionString: "workItem != null");
            workItem.RunInner();
        }