コード例 #1
0
ファイル: GhostLine.cs プロジェクト: erisonliang/ghostline
        ///<summary>
        ///Iterates through all the WorkUnits until the producer calls CompleteAdding() and all added WorkUnits have been processed.
        ///</summary>
        public void Begin()
        {
            // if the external process doesn't set up a process, just pass the value along
            if (ProcessCompleted.GetInvocationList().Count() == 0 && PassValuesIfNoProcessDelegate)
            {
                Process = w =>
                {
                    return(w);
                };
            }

            Task.Run(() =>
            {
                InnerWorkLoop();
            });
        }