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


C# NativeActivityMetadata.AddImplementationChild方法代码示例

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


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

示例1: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            // The Body introduces another layer of scope. Method metadata.AddImplementationChild
            // (instead of metadata.AddChild) enable access to LoopVariable from the inner
            // block scope of Body.
            if (this.Body != null && this.Body.Handler != null)
            {
                this.invokeBody.Action = this.Body;
                metadata.AddImplementationChild(this.invokeBody);
            }

            // Need to bind the arguments to the custom activity variables explicitly
            // and then add them to the metadata.
            RuntimeArgument startArg = new RuntimeArgument("Start", typeof(int), ArgumentDirection.In, true);
            metadata.Bind(this.Start, startArg);
            metadata.AddArgument(startArg);
            RuntimeArgument stopArg = new RuntimeArgument("Stop", typeof(int), ArgumentDirection.In, true);
            metadata.Bind(this.Stop, stopArg);
            metadata.AddArgument(stopArg);
            RuntimeArgument stepArg = new RuntimeArgument("Step", typeof(int), ArgumentDirection.In, true);
            metadata.Bind(this.Step, stepArg);
            metadata.AddArgument(stepArg);

            // Register variables used in the custom activity.
            metadata.AddImplementationVariable(this.loopVariable);
        }
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:26,代码来源:RangeEnumeration.cs

示例2: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.AddImplementationVariable(outputText);
     this.output = new WriteLine { Text = new InArgument<string>(outputText) };
     metadata.AddImplementationChild(this.output);
     metadata.SetArgumentsCollection(metadata.GetArgumentsWithReflection());
 }
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:7,代码来源:EchoPrompt.cs

示例3: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     base.CacheMetadata(metadata);
     metadata.AddImplementationVariable(playUrl);
     metadata.AddImplementationVariable(loop);
     metadata.AddImplementationChild(play);
 }
开发者ID:wasabii,项目名称:twilio-net,代码行数:7,代码来源:PlayResource.cs

示例4: CacheMetadata

            protected override void CacheMetadata(NativeActivityMetadata metadata)
            {
                RuntimeArgument activityArgument = new RuntimeArgument("Activity", typeof(InvokeDelegate), ArgumentDirection.In, true);
                metadata.Bind(this.Activity, activityArgument);
                metadata.SetArgumentsCollection(new Collection<RuntimeArgument> { activityArgument });

                metadata.AddImplementationChild(this.ShowWarning);
                metadata.AddImplementationChild(this.ShowError);
                metadata.AddImplementationVariable(this.WarningMessageVariable);
                metadata.AddImplementationVariable(this.ErrorMessageVariable);
            }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:11,代码来源:InvokeDelegateValidationFeature.cs

示例5: CacheMetadata

 /// <summary>
 /// CacheMetadata
 /// </summary>
 /// <param name="metadata"></param>
 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     base.CacheMetadata(metadata);
     metadata.AddImplementationChild(this.persistActivity);
     metadata.AddImplementationVariable(restartActivityContext);
 }
开发者ID:40a,项目名称:PowerShell,代码行数:10,代码来源:RestartComputerActivity.cs

示例6: CacheMetadata

 /// <summary>
 /// The cache metadata.
 /// </summary>
 /// <param name="metadata">
 /// The metadata.
 /// </param>
 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.AddArgument(new RuntimeArgument("UntilDate", typeof(DateTime), ArgumentDirection.In, true));
     metadata.AddImplementationChild(this.delay);
     metadata.AddImplementationVariable(this.delayInterval);
 }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:12,代码来源:DelayUntilDateTime.cs

示例7: 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)
 {
     this.delay = new Delay { Duration = StubDuration };
     metadata.AddImplementationChild(this.delay);
     base.CacheMetadata(metadata);
 }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:10,代码来源:DelayStub.cs

示例8: CacheMetadata

 /// <summary>
 /// The cache metadata.
 /// </summary>
 /// <param name="metadata">
 /// The metadata.
 /// </param>
 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.RequireExtension<IHttpWorkflowHostContext>();
     metadata.AddDelegate(this.Body);
     metadata.AddImplementationVariable(this.noPersistHandle);
     metadata.AddImplementationChild(this.persist);
 }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:13,代码来源:HttpReceive.cs

示例9: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            RuntimeArgument correlatesWithArgument = new RuntimeArgument(Constants.CorrelatesWith, Constants.CorrelationHandleType, ArgumentDirection.In);
            if (this.CorrelatesWith == null)
            {
                this.CorrelatesWith = new InArgument<CorrelationHandle>();
            }
            metadata.Bind(this.CorrelatesWith, correlatesWithArgument);
            metadata.AddArgument(correlatesWithArgument);

            if (this.correlationInitializers != null)
            {
                int count = 0;
                foreach (CorrelationInitializer correlation in this.correlationInitializers)
                {
                    if (correlation.CorrelationHandle != null)
                    {
                        RuntimeArgument argument = new RuntimeArgument(Constants.Parameter + count,
                            correlation.CorrelationHandle.ArgumentType, correlation.CorrelationHandle.Direction, true);
                        metadata.Bind(correlation.CorrelationHandle, argument);
                        metadata.AddArgument(argument);
                        count++;
                    }
                }
            }

            RuntimeArgument receiveMessageArgument = new RuntimeArgument(Constants.Message, Constants.MessageType, ArgumentDirection.Out);
            if (this.Message == null)
            {
                this.Message = new OutArgument<Message>();
            }
            metadata.Bind(this.Message, receiveMessageArgument);
            metadata.AddArgument(receiveMessageArgument);

            RuntimeArgument noPersistHandleArgument = new RuntimeArgument(Constants.NoPersistHandle, Constants.NoPersistHandleType, ArgumentDirection.In);
            if (this.NoPersistHandle == null)
            {
                this.NoPersistHandle = new InArgument<NoPersistHandle>();
            }
            metadata.Bind(this.NoPersistHandle, noPersistHandleArgument);
            metadata.AddArgument(noPersistHandleArgument);

            metadata.AddImplementationVariable(this.receiveMessageInstance);
            metadata.AddImplementationVariable(this.extensionReceiveBookmark);

            metadata.AddImplementationChild(this.waitForReply);
        }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:47,代码来源:InternalReceiveMessage.cs

示例10: CacheMetadata

		protected override void CacheMetadata(NativeActivityMetadata metadata)
		{
			base.CacheMetadata(metadata);
			metadata.AddImplementationVariable(this.bookmarking);
			metadata.AddImplementationVariable(this.noPersistHandle);
			metadata.AddImplementationChild(this.cancelTimer);
			metadata.AddImplementationChild(this.terminateActivity);
			NativeActivityMetadata nativeActivityMetadataPointer = metadata;
			nativeActivityMetadataPointer.AddDefaultExtensionProvider<PSWorkflowInstanceExtension>(() => new PSWorkflowInstanceExtension());
			this.ParameterDefaults = new Variable<Dictionary<string, object>>();
			metadata.AddImplementationVariable(this.ParameterDefaults);
			string[] strArrays = new string[1];
			strArrays[0] = "not";
			this.Tracer.WriteMessage(base.GetType().Name, "CacheMetadata", Guid.Empty, "Adding PowerShell specific extensions to metadata, CommonParameters are {0} available.", strArrays);
			metadata.AddImplementationVariable(this.psActivityContextImplementationVariable);
		}
开发者ID:nickchal,项目名称:pash,代码行数:16,代码来源:PSActivity.cs

示例11: CacheMetadata

 /// <summary>
 /// Tells the workflow runtime that this activity also schedules the
 /// suspend activity (which it cannot automatically detect because it is not
 /// provided as a parameter).
 /// </summary>
 /// <param name="metadata">The metadata provided by the hosting application.</param>
 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     base.CacheMetadata(metadata);
     metadata.AddImplementationChild(this.suspendActivity);
 }
开发者ID:dhanzhang,项目名称:Windows-classic-samples,代码行数:11,代码来源:ContainerActivity.cs


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