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


C# ModelItem.GetTaskActivity方法代码示例

本文整理汇总了C#中System.Activities.Presentation.Model.ModelItem.GetTaskActivity方法的典型用法代码示例。如果您正苦于以下问题:C# ModelItem.GetTaskActivity方法的具体用法?C# ModelItem.GetTaskActivity怎么用?C# ModelItem.GetTaskActivity使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Activities.Presentation.Model.ModelItem的用法示例。


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

示例1: CanUnassign

        public static bool CanUnassign(ModelItem source)
        {
            Contract.Requires(source != null);

            var task = source.GetTaskActivity();
            return task.Status != TaskActivityStatus.Editing;
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:MultipleAuthorService.cs

示例2: CanMerge

        public static bool CanMerge(ModelItem source)
        {
            Contract.Requires(source != null);

            var task = source.GetTaskActivity();
            return task.Status == TaskActivityStatus.CheckedIn;
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:7,代码来源:MultipleAuthorService.cs

示例3: CheckIsTask

        public static bool CheckIsTask(ModelItem source)
        {
            Contract.Requires(source != null);

            return source.GetTaskActivity() != null ? true : false;
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:6,代码来源:MultipleAuthorService.cs

示例4: UpdateTaskItem

 private static void UpdateTaskItem(ModelItem source, WorkflowEditorViewModel workflowItem)
 {
     ModelItem taskModelItem = GetLastVersionActivity(source, workflowItem);
     MergeTaskArgmentToParent(taskModelItem, workflowItem.WorkflowDesigner.GetRoot(), source);
     CompositeService.UpdateModelItem(source, source.GetTaskActivity().CreateTaskActivity(taskModelItem));
 }
开发者ID:barbarossia,项目名称:CWF,代码行数:6,代码来源:MultipleAuthorService.cs

示例5: GetXamlOfTaskBody

        private static string GetXamlOfTaskBody(WorkflowDesigner rootDesigner, ModelItem taskItem)
        {
            TaskActivity taskActivity = taskItem.GetTaskActivity();
            WorkflowDesigner bodyDesigner = CompositeService.CreateWorkflowDesigner(taskActivity.TaskBody,
                new TaskAssignment() { TaskId = taskActivity.TaskId }.GetFriendlyName(((ActivityBuilder)rootDesigner.GetRoot().GetCurrentValue()).Name));
            ModelItem rootItem = rootDesigner.GetRoot();
            ModelItem bodyItem = bodyDesigner.GetRoot();

            ArgumentService.AddArguments(bodyItem, rootItem);
            List<Variable> variables = ArgumentService.GetAvailableVariables(taskItem).ToList();
            ArgumentService.AddArguments(bodyItem,
                variables.Select(v => new DynamicActivityProperty(){
                    Name = v.Name,
                    Type = typeof(InOutArgument<>).MakeGenericType(v.Type),
                }));

            return bodyDesigner.CompilableXaml();
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:18,代码来源:MultipleAuthorService.cs

示例6: GetLastVersionActivity

        private static ModelItem GetLastVersionActivity(ModelItem source, WorkflowEditorViewModel workflowItem)
        {
            TaskActivity task = source.GetTaskActivity();
            var result = TaskService.GetLastVersionTaskActivityDC(task.TaskId);

            workflowItem.DownloadTaskDependency(result);

            return CompositeService.CreateActivity(result.Activity.Xaml);
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:9,代码来源:MultipleAuthorService.cs

示例7: UnassignTask

        public static void UnassignTask(ModelItem source)
        {
            Contract.Requires(source != null);

            var updatedBody = source.GetTaskActivity().TaskBody;
            if (updatedBody != null)
            {
                CompositeService.UpdateModelItem(source, updatedBody);
            }
            else
            {
                CompositeService.DeleteModelItem(source);
            }
        }
开发者ID:barbarossia,项目名称:CWF,代码行数:14,代码来源:MultipleAuthorService.cs


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