• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# TaskState类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: Task

 /// <summary>
 /// Create method constructer parameters
 /// </summary>
 /// <param name="id"></param>
 /// <param name="name"></param>
 /// <param name="description"></param>
 /// <param name="type"></param>
 /// <param name="user"></param>
 /// <param name="state"></param>
 /// <param name="completedPercent"></param>
 public Task(int id, string name, string description, TaskType type, List<User> user, TaskState state, int completedPercent)
 {
     TaskId = id;
     Name = name;
     Description = description;
     Type = type;
     Users = user;
     State = state;
     CompletedPercent = completedPercent;
 }
开发者ID:Hungle123,项目名称:Taskmanagement,代码行数:20,代码来源:Task.cs


示例17: Tick

        public TaskState Tick( Dictionary<string, object> pxActorView )
        {
            bool bHasTask = m_pxRootTask != null;
            if ( bHasTask )
            {
                m_pxRootTask.TickTask( pxActorView );
                m_eStatus = m_pxRootTask.GetCurrentState();

                return m_eStatus;
            }
            return TaskState.eTaskFailed;
        }
开发者ID:moto2002,项目名称:BaseFramework,代码行数:12,代码来源:BehaviourTree.cs


示例18: TaskAsyncStateAndImplementationHelper

	        /// <summary>
            /// 
            /// </summary>
            /// <param name="task"></param>
            public TaskAsyncStateAndImplementationHelper(ITask task)
            {
                this.task = task;
                taskState = TaskState.NotStarted;

                requestedTaskState = TaskState.Unknown;
                this.TaskThread = null;
                this.TaskStateLock = new object();

                TaskStateChanged = null;
                RequestedTaskStateChanged = null;
            }
开发者ID:platformdotnet,项目名称:Platform,代码行数:16,代码来源:AbstractTask.cs


示例19: Initialize

    public void Initialize(Task _task)
    {
        interfaceB = GameObject.FindGameObjectWithTag("Interface").GetComponent<InterfaceBehaviour>();
        //Debug.Log("prova " + interfaceB.name);
        task = _task;
        if (title.text.Length > maxStringCountTitle)
        {
            title.text = title.text.Substring(0, maxStringCountTitle) + "...";
        }
        else
        {
            title.text = _task.title;
        }

        if (_task.description.Length > maxStringCountDescr)
        {
            description.text = _task.description.Substring(0, maxStringCountDescr) + "...";
        }
        else
        {
            description.text = _task.description;
        }

        state = _task.taskState;
        bitmapNumber.text = _task.number.ToString();
        switch (state)
        {
            case TaskState.New:
                this.GetComponent<Button>().interactable = true;
                maskLock.SetActive(false);
                informationTask.gameObject.SetActive(true);
                stateText.color = InterfaceBehaviour.Orange;
                interfaceB.localizationUtils.AddTranslationText(stateText, "{new_task}");
                break;
            case TaskState.Visited:
                this.GetComponent<Button>().interactable = true;
                maskLock.SetActive(false);
                informationTask.gameObject.SetActive(true);
                stateText.color = InterfaceBehaviour.ClearGreen;
                interfaceB.localizationUtils.AddTranslationText(stateText, "{visited_task}");
                break;
            case TaskState.Locked:
                this.GetComponent<Button>().interactable = false;
                stateText.color = InterfaceBehaviour.Grey;
                interfaceB.localizationUtils.AddTranslationText(stateText, "{locked_task}");
                maskLock.SetActive(true);
                informationTask.gameObject.SetActive(false);
                break;
        }
    }
开发者ID:sergutsan,项目名称:it2l-fractions-lab,代码行数:50,代码来源:TaskVoice.cs


示例20: ResmgrNative

    private ResmgrNative()
    {
        //初始化本地URL
        #if UNITY_ANDROID && !UNITY_EDITOR
        localurl = Application.streamingAssetsPath;
        //Android 比较特别
        #else
        localurl = "file://" + Application.streamingAssetsPath;
        //此url 在 windows 及 WP IOS  可以使用
        #endif
        cacheurl = System.IO.Path.Combine(Application.persistentDataPath, "vercache");

        sha1 = new System.Security.Cryptography.SHA1Managed();
        taskState = new TaskState();
    }
开发者ID:Gaopest,项目名称:fightclub,代码行数:15,代码来源:ResmgrNative.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# TaskStatus类代码示例发布时间:2022-05-24
下一篇:
C# TaskScheduler类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap