Amib.Threading.Internal.WorkItem.GetResult C# (CSharp) Метод

GetResult() приватный Метод

Get the result of the work item. If the work item didn't run yet then the caller waits for the result, timeout, or cancel. In case of error the method throws and exception
private GetResult ( int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle ) : object
millisecondsTimeout int
exitContext bool
cancelWaitHandle System.Threading.WaitHandle
Результат object
        private object GetResult(
            int millisecondsTimeout,
            bool exitContext,
            WaitHandle cancelWaitHandle)
        {
            Exception e;
            object result = GetResult(millisecondsTimeout, exitContext, cancelWaitHandle, out e);
            if (null != e)
            {
                throw new WorkItemResultException("The work item caused an excpetion, see the inner exception for details", e);
            }
            return result;
        }

Same methods

WorkItem::GetResult ( int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle, Exception &e ) : object

Usage Example

Пример #1
0
 public object GetResult()
 {
     return(_workItem.GetResult(Timeout.Infinite, true, null));
 }