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

C# TaskStatus类代码示例

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

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



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

示例1: Get

 public IEnumerable<Task> Get(TaskStatus taskStatus)
 {
     var url = String.Format("tasks/{0}.xml", taskStatus.ToString().ToLower());
     var response = _client.Execute<List<Task>>(new RestRequest(url, Method.GET));
     var tasks = response.Data;
     return tasks;
 }
开发者ID:scottschluer,项目名称:highrise-api,代码行数:7,代码来源:TaskRequest.cs


示例2: GetByProject

        public List<Task> GetByProject(int projectId, TaskStatus? status, Guid participant)
        {
            var query = CreateQuery()
                .LeftOuterJoin("projects_milestones m", Exp.EqColumns("m.id", "t.milestone_id") & Exp.EqColumns("m.tenant_id", "t.tenant_id"))
                .Where("t.project_id", projectId)
                .OrderBy("t.sort_order", false)
                .OrderBy("m.status", true)
                .OrderBy("m.deadLine", true)
                .OrderBy("m.id", true)
                .OrderBy("t.status", true)
                .OrderBy("t.priority", true)
                .OrderBy("t.create_on", true);
            if (status != null)
            {
                if (status == TaskStatus.Open)
                    query.Where(!Exp.Eq("t.status", TaskStatus.Closed));
                else
                    query.Where("t.status", TaskStatus.Closed);
            }

            if (participant != Guid.Empty)
            {
                var existSubtask = new SqlQuery("projects_subtasks pst").Select("pst.task_id").Where(Exp.EqColumns("t.tenant_id", "pst.tenant_id") & Exp.EqColumns("t.id", "pst.task_id") & Exp.Eq("pst.status", TaskStatus.Open));
                var existResponsible = new SqlQuery("projects_tasks_responsible ptr1").Select("ptr1.task_id").Where(Exp.EqColumns("t.tenant_id", "ptr1.tenant_id") & Exp.EqColumns("t.id", "ptr1.task_id"));

                existSubtask.Where(Exp.Eq("pst.responsible_id", participant.ToString()));
                existResponsible.Where(Exp.Eq("ptr1.responsible_id", participant.ToString()));

                query.Where(Exp.Exists(existSubtask) | Exp.Exists(existResponsible));
            }

            return DbManager.ExecuteList(query).ConvertAll(r => ToTask(r));
        }
开发者ID:ridhouan,项目名称:teamlab.v6.5,代码行数:33,代码来源:TaskDao.cs


示例3: Terminate

 //forceful terminate a behaviour
 public void Terminate(Behaviour behaviour, TaskStatus result)
 {
     behaviour.status = result;
     if(behaviour.observer != null){
         behaviour.observer();
     }
 }
开发者ID:Suike,项目名称:Tools,代码行数:8,代码来源:BehaviourTree.cs


示例4: SetTaskComplete

 public void SetTaskComplete(TaskStatus status)
 {
     int statusId = (int)status;
     DatabaseProviderFactory factory = new DatabaseProviderFactory();
     var db = factory.CreateDefault();
     db.ExecuteNonQuery(CommandType.Text, "update app.taskqueue set statusid = " + statusId + ", completedate = '" + DateTime.Now.ToString() + "' where taskQueueId = " + this.TaskQueueId);
 }
开发者ID:kerryRarson,项目名称:TaskQueue,代码行数:7,代码来源:TaskQueueBase.cs


示例5: GetXpoState

 XpoState GetXpoState(TaskStatus taskStatus, XpoStateMachine stateMachine) {
     var xpoState = ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", taskStatus.ToString()))??ObjectSpace.CreateObject<XpoState>();
     xpoState.Caption = taskStatus.ToString();
     xpoState.StateMachine=stateMachine;
     xpoState.MarkerValue = taskStatus.ToString();
     return xpoState;
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:Updater.cs


示例6: Task

        public Task(string name, bool isimportant, bool ishard, int estimatetomato, 
            TaskType  tasktype, TaskPriority taskpri,
            TaskStatus taskstatus = TaskStatus.INQUEUE, DateTime? reminder = null)
        {
            this.name = name;
            this.isImportant = isimportant ? "important" : "not important";
            this.isHard = ishard ? "hard" : "easy";
            this.estimateToamto = estimatetomato;

            this.completeTomato = 0;
            this.incompleteTomato = 0;
            this.innerBreak = 0;
            this.outterBreak = 0;
            this.completeness = 0;
            this.difficulties = 0;
            this.satisfaction = 0;
            this.efficiency = 0;
            this.improvement = 0;
            this.achivement = 0;
            this.focusness = 0;

            this.taskStatus = taskstatus;
            this.taskType = tasktype;
            this.taskPriority = taskpri;
        }
开发者ID:mysterytony,项目名称:PomodoroTechiniqueHelper,代码行数:25,代码来源:Task.cs


示例7: OnConditionalAbort

 public override void OnConditionalAbort(int childIndex)
 {
     // Start from the beginning on an abort
     childrenExecutionOrder.Clear();
     executionStatus = TaskStatus.Inactive;
     ShuffleChilden();
 }
开发者ID:wishes2018,项目名称:UnityGame,代码行数:7,代码来源:RandomSelector.cs


示例8: CreateTransition

 void CreateTransition(TaskStatus startStatus, TaskStatus endStatus) {
     var caption = startStatus.ToString() + endStatus;
     var transition = ObjectSpace.FindObject<XpoTransition>(CriteriaOperator.Parse("Caption=?", caption)) ?? ObjectSpace.CreateObject<XpoTransition>();
     transition.Caption = caption;
     transition.SourceState = ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", startStatus.ToString()));
     transition.TargetState =ObjectSpace.FindObject<XpoState>(CriteriaOperator.Parse("Caption=?", endStatus.ToString()));
 }
开发者ID:aries544,项目名称:eXpand,代码行数:7,代码来源:Updater.cs


示例9: TaskData

    public TaskData(JsonObject o)
    {
        count = Convert.ToInt32(o ["count"]);
        killCount = Convert.ToInt32(o ["killCount"]);
        createTime = (long)Convert.ToInt64(o ["createtime"]);
        prizedTime = (long)Convert.ToInt64(o["finishtime"]);
        templateID = Convert.ToInt32(o ["tid"]);
        status = (TaskStatus)Convert.ToInt32(o ["status"]);       
        if (o.ContainsKey("buyCount"))
        {
            buyCount = Convert.ToInt32(o ["buyCount"]);
        }

        if (o.ContainsKey("buyTime"))
        {
            buyTime = (long)Convert.ToInt64(o ["buyTime"]);
        }

        taskType = (TaskMechanism)Convert.ToInt32(o ["taskType"]);

        if (o.ContainsKey("starLevel"))
        {
            starLevel = Convert.ToInt32(o["starLevel"]);
        }
    }
开发者ID:xiaozhuzhaoge,项目名称:Universal-Space,代码行数:25,代码来源:TaskData.cs


示例10: TaskStatusChanged

 public TaskStatusChanged(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, TaskStatus status)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.Status = status;
 }
开发者ID:asr0,项目名称:IDDD_Samples_NET,代码行数:7,代码来源:TaskStatusChanged.cs


示例11: AcknowledgeStatusUpdate

        public Status AcknowledgeStatusUpdate(TaskStatus status)
        {
            var statusBytes = ProtoBufHelper.Serialize(status);

            using (var pinned = MarshalHelper.CreatePinnedObject(statusBytes))
                return (Status)NativeImports.SchedulerDriver.AcknowledgeStatusUpdate(_nativeDriverPtr, pinned.Ptr);
        }
开发者ID:bcrusu,项目名称:mesos-clr,代码行数:7,代码来源:SchedulerDriverBridge.cs


示例12: InternalRun

 internal void InternalRun()
 {
     FCurrent = this;
     try
     {
         this.OnStarted();
         try
         {
             this.FStatus = TaskStatus.Running;
             this.Run();
             this.FStatus = ((this.FInternalState & InternalState.CancellationConfirmed) > 0) ? TaskStatus.Canceled : TaskStatus.RanToCompletion;
         }
         catch (OperationCanceledException)
         {
             this.FStatus = TaskStatus.Canceled;
         }
         catch (System.Exception exception)
         {
             this.FException = exception;
             this.FStatus = TaskStatus.Faulted;
             if (!this.OnError(exception))
             {
                 throw;
             }
         }
         finally
         {
             this.OnFinished();
         }
     }
     finally
     {
         FCurrent = null;
     }
 }
开发者ID:shankithegreat,项目名称:commanderdotnet,代码行数:35,代码来源:SimpleTask.cs


示例13: ChangeStatus

        public Subtask ChangeStatus(Task task, Subtask subtask, TaskStatus newStatus)
        {
            if (subtask == null) throw new Exception("subtask.Task");
            if (task == null) throw new ArgumentNullException("task");
            if (task.Status == TaskStatus.Closed) throw new Exception("task can't be closed");

            if (subtask.Status == newStatus) return subtask;

            ProjectSecurity.DemandEdit(task, subtask);
           
            subtask.Status = newStatus;
            subtask.LastModifiedBy = SecurityContext.CurrentAccount.ID;
            subtask.LastModifiedOn = TenantUtil.DateTimeNow();
            subtask.StatusChangedOn = TenantUtil.DateTimeNow();

            if (subtask.Responsible.Equals(Guid.Empty))
                subtask.Responsible = SecurityContext.CurrentAccount.ID;

            var senders = GetSubscribers(task);

            if (task.Status != TaskStatus.Closed && newStatus == TaskStatus.Closed && !factory.DisableNotifications && senders.Count != 0)
                NotifyClient.Instance.SendAboutSubTaskClosing(senders, task, subtask);

            if (task.Status != TaskStatus.Closed && newStatus == TaskStatus.Open && !factory.DisableNotifications && senders.Count != 0)
                NotifyClient.Instance.SendAboutSubTaskResumed(senders, task, subtask);

            return subtaskDao.Save(subtask);
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:28,代码来源:SubtaskEngine.cs


示例14: ReportStatus

        public static void ReportStatus(string taskName, TaskStatus status)
        {
            if (_statuses.ContainsKey(taskName))
                throw new ArgumentOutOfRangeException("taskName", taskName, "Already reported status for this task.");

            _statuses.Add(taskName, status);
        }
开发者ID:Mofsy,项目名称:jinxbot,代码行数:7,代码来源:Context.cs


示例15: OnChildExecuted

 public override void OnChildExecuted(int childIndex, TaskStatus childStatus)
 {
     // The child status will be inactive immediately following an abort from OnReevaluationEnded. Ignore that status. 
     if (childStatus != TaskStatus.Inactive) {
         executionStatus = childStatus;
     }
 }
开发者ID:HaoYunSun,项目名称:TEMPORAIRE,代码行数:7,代码来源:SelectorEvaluator.cs


示例16: SaveReportTemplate

        public ReportTemplateWrapper SaveReportTemplate(string name, string period, int periodItem, int hour, bool autoGenerated, ReportType reportType,
                                         int tag, int project, TaskStatus? status, Guid departament, Guid userId, ReportTimeInterval reportTimeInterval,
                                         ApiDateTime fromDate, ApiDateTime toDate, int viewType, bool noResponsible)
        {
            ProjectSecurity.DemandAuthentication();

            if (name == null || name.Trim().Length == 0) throw new ArgumentNullException("name");

            var filter = new TaskFilter
            {
                TagId = tag,
                DepartmentId = departament,
                UserId = userId,
                TimeInterval = reportTimeInterval,
                FromDate = fromDate,
                ToDate = toDate,
                ViewType = viewType,
                NoResponsible = noResponsible
            };

            if (project != 0)
                filter.ProjectIds.Add(project);

            if (status != null)
                filter.TaskStatuses.Add((TaskStatus)status);

            var template = new ReportTemplate(reportType) { Filter = filter };

            SaveOrUpdateTemplate(template, name, period, periodItem, hour, autoGenerated);

            return new ReportTemplateWrapper(template);
        }
开发者ID:Inzaghi2012,项目名称:teamlab.v7.5,代码行数:32,代码来源:ProjectApi.Reports.cs


示例17: DoInterrupt

        public void DoInterrupt(TaskStatus status)
        {
            // An interruption has occurred. Update the interrupt status and notify the Behavior Manager. The Behavior Manager will stop all
            // child tasks from running.
            interruptStatus = status;

            BehaviorManager.instance.Interrupt(Owner, this);
        }
开发者ID:wishes2018,项目名称:UnityGame,代码行数:8,代码来源:Interrupt.cs


示例18: OnChildExecuted

 public override void OnChildExecuted(TaskStatus childStatus)
 {
     // Pop the top index from the stack and set the execution status.
     if (childrenExecutionOrder.Count > 0) {
         childrenExecutionOrder.Pop();
     }
     executionStatus = childStatus;
 }
开发者ID:wishes2018,项目名称:UnityGame,代码行数:8,代码来源:RandomSelector.cs


示例19: ExistsActivityUserTasks

		/// <summary>
		/// 查看节点是否收到的待办/待阅
		/// </summary>
		public static bool ExistsActivityUserTasks(string activityID, TaskStatus taskStatus)
		{
			return UserTaskAdapter.Instance.LoadUserTasks(builder =>
			{
				builder.AppendItem("ACTIVITY_ID", activityID);
				builder.AppendItem("STATUS", (int)taskStatus);
			}).Count > 0;
		}
开发者ID:jerryshi2007,项目名称:AK47Source,代码行数:11,代码来源:ProcessTestHelper.cs


示例20: Close

 public void Close()
 {
     if (_status != TaskStatus.Closed)
     {
         _status = TaskStatus.Closed;
         _aggregateRoot.ApplyEvent(new TaskClosedEvent(_aggregateRoot.Id, _id));
     }
 }
开发者ID:mserrate,项目名称:PoorMansCQRS,代码行数:8,代码来源:Task.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# TaskType类代码示例发布时间:2022-05-24
下一篇:
C# TaskState类代码示例发布时间: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