当前位置: 首页>>代码示例>>C#>>正文


C# TaskState类代码示例

本文整理汇总了C#中TaskState的典型用法代码示例。如果您正苦于以下问题:C# TaskState类的具体用法?C# TaskState怎么用?C# TaskState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


TaskState类属于命名空间,在下文中一共展示了TaskState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: IOPH_EZLinkDongle

 public IOPH_EZLinkDongle(ADTRecord adtRec, IAppMainWindow mainWin)
 {
     this._adtRec = adtRec;
     this._mainWin = mainWin;
     this._teleFromWin = new Telegram(0x3e8);
     this._teleToWin = new Telegram(0x3e8);
     this._replyData = new DataBuffer(0x3e8);
     this._isSeries = false;
     this._seriesExecStat = SeriesExecutionState.Stop;
     this._taskEvent = new AutoResetEvent(false);
     this._taskState = TaskState.TaskReady_OK;
     if (adtRec.isUsbEZLinkDevice())
     {
         this._ddi = DDI_EZLinkDongle.instance();
     }
     else if (adtRec.isTESTDevice())
     {
         this._ddi = DDI_TEST.instance();
     }
     else
     {
         GlobalServices.ErrMsg("FATAL ERROR: IOPH_EZLinkDongle", "I/O port type not supported, exit WDS!");
         Application.Exit();
     }
     this._iot = new Thread(new ThreadStart(this.doDeviceIO));
     this._iot.IsBackground = true;
     this._iot.Name = "IOPH_EZLink thread";
     this._isTelegramRequest = false;
     this._isRxTimerRequest = false;
     this._isReadRxPacketEnabled = false;
     this._iot.Start();
 }
开发者ID:x893,项目名称:WDS,代码行数:32,代码来源:IOPH_EZLinkDongle.cs

示例2: TaskSnapshot

 /// <summary>
 /// Create a new progress snapshot.
 /// </summary>
 /// <param name="state">The current State of the task.</param>
 /// <param name="unitsByte"><c>true</c> if <see cref="UnitsProcessed"/> and <see cref="UnitsTotal"/> are measured in bytes; <c>false</c> if they are measured in generic units.</param>
 /// <param name="unitsProcessed">The number of units that have been processed so far.</param>
 /// <param name="unitsTotal">The total number of units that are to be processed; -1 for unknown.</param>
 public TaskSnapshot(TaskState state, bool unitsByte = false, long unitsProcessed = 0, long unitsTotal = -1)
 {
     State = state;
     UnitsByte = unitsByte;
     UnitsProcessed = unitsProcessed;
     UnitsTotal = unitsTotal;
 }
开发者ID:nano-byte,项目名称:common,代码行数:14,代码来源:TaskSnapshot.cs

示例3: RequestTaskState

		public override void RequestTaskState(TaskState taskState)
		{
			if (taskState == TaskState.Stopped || taskState == TaskState.Finished || taskState == TaskState.Paused)
			{
				while (true)
				{
					try
					{
						tcpListener.Stop();
						tcpListener.Server.Close();
					}
					catch
					{
					}

					if (base.RequestTaskState(taskState, TimeSpan.FromSeconds(0.5)))
					{
						return;
					}

					if (taskState == TaskState.Stopped || taskState == TaskState.Finished)
					{
						return;
					}
				}
			}

			base.RequestTaskState(taskState);
		}
开发者ID:Euphrates-Media,项目名称:Platform.VirtualFileSystem,代码行数:29,代码来源:NetworkServer.cs

示例4: FlowState

        internal FlowState(Flow flow)
        {
            this.Tasks = new List<TaskState>();
            this.Art = flow.Art;

            foreach (var task in flow.Nodes)
            {
                TaskState state = new TaskState()
                {
                    ItemsProcessed = task.ItemsProcessed,
                    Name = task.Name,
                    Status = task.Status,
                    TotalSecondsBlocked = task.TotalSecondsBlocked,
                    TotalSecondsProcessing = task.TotalSecondsProcessing,
                    Position = task.Position
                };

                this.Tasks.Add(state);
            }
            this.Streams = new List<StreamState>();
            foreach (var stream in flow.Streams)
            {
                StreamState state = new StreamState()
                {
                    Name = stream.Name,
                    Closed = stream.IsClosed,
                    Count = stream.Count,
                    InPoint = stream.InPoint
                };
                this.Streams.Add(state);
            }
        }
开发者ID:Teun,项目名称:BatchFlow,代码行数:32,代码来源:FlowState.cs

示例5: ProcessByState

 private TaskState ProcessByState(Task processedTask, TaskState state)
 {
     //Global.Log ("Processing task of sequence (" + ToString () + "): " + processedTask.ToString() + " with state: " + state.ToString());
     switch (state) {
     case TaskState.Ready:
         return ExecuteSubTask (processedTask);
     case TaskState.Running:
         return TaskState.Running;
     case TaskState.Success:
         processedTask.State = TaskState.Ready;
         currentTaskIndex++;
         if (currentTaskIndex >= SubTasks.Count) {
             currentTaskIndex = 0;
             return TaskState.Success;
         }
         return TaskState.Running;
     case TaskState.Failed:
         processedTask.State = TaskState.Ready;
         //setting next task to first sub action
         currentTaskIndex = 0;
         return TaskState.Failed;
     default:
         //unexpected
         return TaskState.Failed;
     }
 }
开发者ID:wladimiiir,项目名称:vault112,代码行数:26,代码来源:Sequence.cs

示例6: Task

 internal Task(TaskManager taskManager, IEnumerator<IAsyncCall> callIterator)
 {
     this._waitCall = new AsyncCall<bool>();
     this._taskManager = taskManager;
     this._taskState = TaskState.Unstarted;
     this._asyncCallIterator = callIterator;
 }
开发者ID:ajaishankar,项目名称:easyasync,代码行数:7,代码来源:Task.cs

示例7: TaskState

 public TaskState(RemoteTask task, TaskState parentState, string message = "Internal Error (xunit runner): No status reported", TaskResult result = TaskResult.Inconclusive)
 {
     Task = task;
     Message = message;
     Result = result;
     ParentState = parentState;
 }
开发者ID:EddieGarmon,项目名称:resharper-xunit,代码行数:7,代码来源:ReSharperRunnerLogger.cs

示例8: BuildData

 public BuildData(string header)
 {
     Header = header;
     Info = new ObservableCollection<Message>();
     _state = TaskState.Normal;
     ItemCount = new ObservableCollection<string>();
 }
开发者ID:SkightTeam,项目名称:eLiteWeb,代码行数:7,代码来源:BuildData.cs

示例9: ScheduleTrigger

        public ScheduleTrigger(TaskState state, ITrigger trigger, IDev2TaskService service, ITaskServiceConvertorFactory factory)
        {
            _service = service;
            _factory = factory;
            State = state;
            Trigger = trigger;

        }
开发者ID:Robin--,项目名称:Warewolf,代码行数:8,代码来源:ScheduleTrigger.cs

示例10: GetState

        public static IProcessingState GetState(TaskState state)
        {
            if (States.ContainsKey(state))
            {
                return States[state];
            }

            throw new ArgumentOutOfRangeException("state");
        }
开发者ID:GusLab,项目名称:video-portal,代码行数:9,代码来源:TaskStateFactory.cs

示例11: SetState

        public void SetState(ITaskExecuteClient source, TaskState state, TaskMessage message)
        {
            this._state = state;

            if (this.StateChanged != null)
            {
                this.StateChanged(source, this, message);
            }
        }
开发者ID:ReinhardHsu,项目名称:devfw,代码行数:9,代码来源:Task.cs

示例12: NotifyTaskStateChanged

        private void NotifyTaskStateChanged(AsyncTask task, TaskState state)
        {
            var stateChangedHandler = TaskStateChanged;
            if (stateChangedHandler == null)
                return; // No event handler, bail.

            var e = new TaskStateChangedEventArgs(task, state);
            stateChangedHandler(this, e);
        }
开发者ID:whztt07,项目名称:Dynamo,代码行数:9,代码来源:DynamoSchedulerInternals.cs

示例13: Task

 internal Task(string name, Guid queueId)
 {
     this.Id = Guid.NewGuid();
     this.QueueId = queueId;
     this.Name = name;
     this.State = TaskState.Queued;
     this.OutstandingDependencies = new HashSet<Guid>();
     this.DependantOn = new HashSet<Guid>();
     this.DependencyTo = new HashSet<Guid>();
 }
开发者ID:girish66,项目名称:DynamicWorkflow,代码行数:10,代码来源:Task.cs

示例14: ChangeTaskState

        public bool ChangeTaskState(TaskState destinationState)
        {
            bool isSuccess = _database.ChangeTaskState(_targetTask, destinationState);
            if (isSuccess)
            {
                RefreshTaskList();

            }
            return isSuccess;
        }
开发者ID:sergelg90,项目名称:KanbanBoard,代码行数:10,代码来源:Model.cs

示例15: DummyTask

 public DummyTask(DummyBackend backend, int id, string taskName)
 {
     this.backend = backend;
     this.id = id;
     this.name = taskName;
     this.dueDate = DateTime.MinValue; // No due date specified
     this.completionDate = DateTime.MinValue; // No due date specified
     this.priority = TaskPriority.None;
     this.state = TaskState.Active;
 }
开发者ID:nolith,项目名称:tasque,代码行数:10,代码来源:DummyTask.cs


注:本文中的TaskState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。