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


C# NativeActivityMetadata.SetVariablesCollection方法代码示例

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


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

示例1: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.AddChild(this.Body);
     metadata.AddChild(this.CancellationHandler);
     metadata.SetVariablesCollection(this.Variables);
     metadata.AddImplementationVariable(this.suppressCancel);
 }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:CancellationScope.cs

示例2: CacheMetadata

        /// <summary>
        /// Creates and validates a description of the activity’s arguments, variables, child activities, and activity delegates.
        /// </summary>
        /// <param name="metadata">The activity’s metadata that encapsulates the activity’s arguments, variables, child activities, and activity delegates.</param>
        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            foreach (var kvp in this.Arguments)
            {
                metadata.AddArgument(new RuntimeArgument(kvp.Key, kvp.Value.ArgumentType, kvp.Value.Direction));
            }

            metadata.SetVariablesCollection(this.Variables);
            metadata.AddChild(this.StateMachine);
        }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:14,代码来源:StateMachineHost.cs

示例3: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.SetVariablesCollection(this.Variables);
     metadata.AddChild(this.Body);
     if (this.Condition == null)
     {
         metadata.AddValidationError(System.Activities.SR.WhileRequiresCondition(base.DisplayName));
     }
     else
     {
         metadata.AddChild(this.Condition);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:13,代码来源:While.cs

示例4: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     Collection<Activity> children = new Collection<Activity>();
     foreach (Activity activity in this.Branches)
     {
         children.Add(activity);
     }
     if (this.CompletionCondition != null)
     {
         children.Add(this.CompletionCondition);
     }
     metadata.SetChildrenCollection(children);
     metadata.SetVariablesCollection(this.Variables);
     if (this.CompletionCondition != null)
     {
         if (this.hasCompleted == null)
         {
             this.hasCompleted = new Variable<bool>();
         }
         metadata.AddImplementationVariable(this.hasCompleted);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:22,代码来源:Parallel.cs

示例5: CacheMetadata

        /// <summary>
        /// The cache metadata.
        /// </summary>
        /// <param name="metadata">
        /// The metadata.
        /// </param>
        /// <exception cref="ValidationException">
        /// The workflow is invalid
        /// </exception>
        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            if (
                this.Receives.Any(
                    r => !r.GetType().IsAssignableFrom(typeof(HttpReceive))))
            {
                throw new ValidationException(
                    "HttpWorkflowService can contain only HttpReceive activities");
            }

            metadata.SetChildrenCollection(this.Receives);
            metadata.SetVariablesCollection(this.Variables);
        }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:22,代码来源:HttpWorkflowService.cs

示例6: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.SetChildrenCollection(this.Activities);
     metadata.SetVariablesCollection(this.Variables);
     metadata.AddImplementationVariable(this.lastIndexHint);
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:6,代码来源:Sequence.cs

示例7: CacheMetadata

        /// <summary>
        /// Informs the runtime about our activity and the data
        /// </summary>
        /// <param name="metadata">The metadata</param>
        /// <remarks>
        /// The base class implementation
        /// will discover variables and child activities using reflection.  By overriding 
        /// CacheMetadata we avoid this and get improved performance.
        /// </remarks>
        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            /// implementation variables are variables that are 
            /// private to our workflow.
            metadata.AddImplementationVariable(lastIndexHint);
            metadata.AddImplementationVariable(preCompleted);
            metadata.AddImplementationVariable(bodyCompleted);

            metadata.SetVariablesCollection(Variables);

            metadata.AddChild(Pre);
            metadata.AddChild(Post);

            // Cannot use metadata.SetActivitiesCollection because of Pre/Post
            foreach (Activity activity in Activities)
            {
                metadata.AddChild(activity);
            }
        }
开发者ID:Helen1987,项目名称:edu,代码行数:28,代码来源:PrePostSequence.cs


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