From 854dcd1abddc3eef33da953592deb61133e5e7ed Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Wed, 1 May 2013 23:00:46 +0100
Subject: Fix SmartThreadPool line endings in recent update from dos to unix
---
.../SmartThreadPool/WorkItem.WorkItemResult.cs | 380 ++++++++++-----------
1 file changed, 190 insertions(+), 190 deletions(-)
(limited to 'ThirdParty/SmartThreadPool/WorkItem.WorkItemResult.cs')
diff --git a/ThirdParty/SmartThreadPool/WorkItem.WorkItemResult.cs b/ThirdParty/SmartThreadPool/WorkItem.WorkItemResult.cs
index 5745c15..435a14b 100644
--- a/ThirdParty/SmartThreadPool/WorkItem.WorkItemResult.cs
+++ b/ThirdParty/SmartThreadPool/WorkItem.WorkItemResult.cs
@@ -1,190 +1,190 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using System.Threading;
-
-namespace Amib.Threading.Internal
-{
- public partial class WorkItem
- {
- #region WorkItemResult class
-
- private class WorkItemResult : IWorkItemResult, IInternalWorkItemResult, IInternalWaitableResult
- {
- ///
- /// A back reference to the work item
- ///
- private readonly WorkItem _workItem;
-
- public WorkItemResult(WorkItem workItem)
- {
- _workItem = workItem;
- }
-
- internal WorkItem GetWorkItem()
- {
- return _workItem;
- }
-
- #region IWorkItemResult Members
-
- public bool IsCompleted
- {
- get
- {
- return _workItem.IsCompleted;
- }
- }
-
- public bool IsCanceled
- {
- get
- {
- return _workItem.IsCanceled;
- }
- }
-
- public object GetResult()
- {
- return _workItem.GetResult(Timeout.Infinite, true, null);
- }
-
- public object GetResult(int millisecondsTimeout, bool exitContext)
- {
- return _workItem.GetResult(millisecondsTimeout, exitContext, null);
- }
-
- public object GetResult(TimeSpan timeout, bool exitContext)
- {
- return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, null);
- }
-
- public object GetResult(int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle)
- {
- return _workItem.GetResult(millisecondsTimeout, exitContext, cancelWaitHandle);
- }
-
- public object GetResult(TimeSpan timeout, bool exitContext, WaitHandle cancelWaitHandle)
- {
- return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle);
- }
-
- public object GetResult(out Exception e)
- {
- return _workItem.GetResult(Timeout.Infinite, true, null, out e);
- }
-
- public object GetResult(int millisecondsTimeout, bool exitContext, out Exception e)
- {
- return _workItem.GetResult(millisecondsTimeout, exitContext, null, out e);
- }
-
- public object GetResult(TimeSpan timeout, bool exitContext, out Exception e)
- {
- return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, null, out e);
- }
-
- public object GetResult(int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle, out Exception e)
- {
- return _workItem.GetResult(millisecondsTimeout, exitContext, cancelWaitHandle, out e);
- }
-
- public object GetResult(TimeSpan timeout, bool exitContext, WaitHandle cancelWaitHandle, out Exception e)
- {
- return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle, out e);
- }
-
- public bool Cancel()
- {
- return Cancel(false);
- }
-
- public bool Cancel(bool abortExecution)
- {
- return _workItem.Cancel(abortExecution);
- }
-
- public object State
- {
- get
- {
- return _workItem._state;
- }
- }
-
- public WorkItemPriority WorkItemPriority
- {
- get
- {
- return _workItem._workItemInfo.WorkItemPriority;
- }
- }
-
- ///
- /// Return the result, same as GetResult()
- ///
- public object Result
- {
- get { return GetResult(); }
- }
-
- ///
- /// Returns the exception if occured otherwise returns null.
- /// This value is valid only after the work item completed,
- /// before that it is always null.
- ///
- public object Exception
- {
- get { return _workItem._exception; }
- }
-
- #endregion
-
- #region IInternalWorkItemResult Members
-
- public event WorkItemStateCallback OnWorkItemStarted
- {
- add
- {
- _workItem.OnWorkItemStarted += value;
- }
- remove
- {
- _workItem.OnWorkItemStarted -= value;
- }
- }
-
-
- public event WorkItemStateCallback OnWorkItemCompleted
- {
- add
- {
- _workItem.OnWorkItemCompleted += value;
- }
- remove
- {
- _workItem.OnWorkItemCompleted -= value;
- }
- }
-
- #endregion
-
- #region IInternalWorkItemResult Members
-
- public IWorkItemResult GetWorkItemResult()
- {
- return this;
- }
-
- public IWorkItemResult GetWorkItemResultT()
- {
- return new WorkItemResultTWrapper(this);
- }
-
- #endregion
- }
-
- #endregion
-
- }
-}
+using System;
+using System.Collections.Generic;
+using System.Text;
+using System.Threading;
+
+namespace Amib.Threading.Internal
+{
+ public partial class WorkItem
+ {
+ #region WorkItemResult class
+
+ private class WorkItemResult : IWorkItemResult, IInternalWorkItemResult, IInternalWaitableResult
+ {
+ ///
+ /// A back reference to the work item
+ ///
+ private readonly WorkItem _workItem;
+
+ public WorkItemResult(WorkItem workItem)
+ {
+ _workItem = workItem;
+ }
+
+ internal WorkItem GetWorkItem()
+ {
+ return _workItem;
+ }
+
+ #region IWorkItemResult Members
+
+ public bool IsCompleted
+ {
+ get
+ {
+ return _workItem.IsCompleted;
+ }
+ }
+
+ public bool IsCanceled
+ {
+ get
+ {
+ return _workItem.IsCanceled;
+ }
+ }
+
+ public object GetResult()
+ {
+ return _workItem.GetResult(Timeout.Infinite, true, null);
+ }
+
+ public object GetResult(int millisecondsTimeout, bool exitContext)
+ {
+ return _workItem.GetResult(millisecondsTimeout, exitContext, null);
+ }
+
+ public object GetResult(TimeSpan timeout, bool exitContext)
+ {
+ return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, null);
+ }
+
+ public object GetResult(int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle)
+ {
+ return _workItem.GetResult(millisecondsTimeout, exitContext, cancelWaitHandle);
+ }
+
+ public object GetResult(TimeSpan timeout, bool exitContext, WaitHandle cancelWaitHandle)
+ {
+ return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle);
+ }
+
+ public object GetResult(out Exception e)
+ {
+ return _workItem.GetResult(Timeout.Infinite, true, null, out e);
+ }
+
+ public object GetResult(int millisecondsTimeout, bool exitContext, out Exception e)
+ {
+ return _workItem.GetResult(millisecondsTimeout, exitContext, null, out e);
+ }
+
+ public object GetResult(TimeSpan timeout, bool exitContext, out Exception e)
+ {
+ return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, null, out e);
+ }
+
+ public object GetResult(int millisecondsTimeout, bool exitContext, WaitHandle cancelWaitHandle, out Exception e)
+ {
+ return _workItem.GetResult(millisecondsTimeout, exitContext, cancelWaitHandle, out e);
+ }
+
+ public object GetResult(TimeSpan timeout, bool exitContext, WaitHandle cancelWaitHandle, out Exception e)
+ {
+ return _workItem.GetResult((int)timeout.TotalMilliseconds, exitContext, cancelWaitHandle, out e);
+ }
+
+ public bool Cancel()
+ {
+ return Cancel(false);
+ }
+
+ public bool Cancel(bool abortExecution)
+ {
+ return _workItem.Cancel(abortExecution);
+ }
+
+ public object State
+ {
+ get
+ {
+ return _workItem._state;
+ }
+ }
+
+ public WorkItemPriority WorkItemPriority
+ {
+ get
+ {
+ return _workItem._workItemInfo.WorkItemPriority;
+ }
+ }
+
+ ///
+ /// Return the result, same as GetResult()
+ ///
+ public object Result
+ {
+ get { return GetResult(); }
+ }
+
+ ///
+ /// Returns the exception if occured otherwise returns null.
+ /// This value is valid only after the work item completed,
+ /// before that it is always null.
+ ///
+ public object Exception
+ {
+ get { return _workItem._exception; }
+ }
+
+ #endregion
+
+ #region IInternalWorkItemResult Members
+
+ public event WorkItemStateCallback OnWorkItemStarted
+ {
+ add
+ {
+ _workItem.OnWorkItemStarted += value;
+ }
+ remove
+ {
+ _workItem.OnWorkItemStarted -= value;
+ }
+ }
+
+
+ public event WorkItemStateCallback OnWorkItemCompleted
+ {
+ add
+ {
+ _workItem.OnWorkItemCompleted += value;
+ }
+ remove
+ {
+ _workItem.OnWorkItemCompleted -= value;
+ }
+ }
+
+ #endregion
+
+ #region IInternalWorkItemResult Members
+
+ public IWorkItemResult GetWorkItemResult()
+ {
+ return this;
+ }
+
+ public IWorkItemResult GetWorkItemResultT()
+ {
+ return new WorkItemResultTWrapper(this);
+ }
+
+ #endregion
+ }
+
+ #endregion
+
+ }
+}
--
cgit v1.1