本文整理汇总了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);
}
示例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());
}
示例3: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
base.CacheMetadata(metadata);
metadata.AddImplementationVariable(playUrl);
metadata.AddImplementationVariable(loop);
metadata.AddImplementationChild(play);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}