本文整理汇总了C#中NativeActivityMetadata.AddDefaultExtensionProvider方法的典型用法代码示例。如果您正苦于以下问题:C# NativeActivityMetadata.AddDefaultExtensionProvider方法的具体用法?C# NativeActivityMetadata.AddDefaultExtensionProvider怎么用?C# NativeActivityMetadata.AddDefaultExtensionProvider使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NativeActivityMetadata
的用法示例。
在下文中一共展示了NativeActivityMetadata.AddDefaultExtensionProvider方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
this.internalStateFuncs.Clear();
this.internalStates.Clear();
this.PassNumber++;
this.TraverseViaTransitions(new Action<System.Activities.Statements.State>(StateMachine.ClearState), new Action<Transition>(StateMachine.ClearTransition));
this.PassNumber++;
bool checkReached = false;
this.TraverseStates((m, states) => ClearStates(states), (m, state) => ClearTransitions(state), metadata, checkReached);
this.PassNumber++;
bool flag2 = false;
this.TraverseStates(new Action<NativeActivityMetadata, Collection<System.Activities.Statements.State>>(this.MarkStatesViaChildren), (m, state) => MarkTransitionsInState(state), metadata, flag2);
this.PassNumber++;
this.TraverseViaTransitions(state => MarkStateViaTransition(state), null);
this.PassNumber++;
Action<Transition> actionForTransition = null;
this.TraverseViaTransitions(state => ValidateTransitions(metadata, state), actionForTransition);
this.PassNumber++;
NativeActivityMetadata metadata2 = metadata;
bool flag3 = true;
this.TraverseStates(new Action<NativeActivityMetadata, Collection<System.Activities.Statements.State>>(StateMachine.ValidateStates), delegate (NativeActivityMetadata m, System.Activities.Statements.State state) {
if (!state.Reachable)
{
ValidateTransitions(m, state);
}
}, metadata2, flag3);
this.ValidateStateMachine(metadata);
this.ProcessStates(metadata);
metadata.AddImplementationVariable(this.eventManager);
foreach (Variable variable in this.Variables)
{
metadata.AddVariable(variable);
}
metadata.AddDefaultExtensionProvider<StateMachineExtension>(getDefaultExtension);
}
示例2: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
RuntimeArgument argument = new RuntimeArgument("Duration", typeof(TimeSpan), ArgumentDirection.In, true);
metadata.Bind(this.Duration, argument);
metadata.SetArgumentsCollection(new Collection<RuntimeArgument> { argument });
metadata.AddImplementationVariable(this.timerBookmark);
metadata.AddDefaultExtensionProvider<TimerExtension>(getDefaultTimerExtension);
}
示例3: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
// Tell the runtime that we need this extension
metadata.RequireExtension(typeof(Hosting.FolderWatcherExtension));
// Provide a Func<T> to create the extension if it does not already exist
metadata.AddDefaultExtensionProvider(() => new Hosting.FolderWatcherExtension());
if (this.SubscriptionHandle == null)
{
metadata.AddValidationError(String.Format(
Properties.Resources.SubscriptionHandleCannotBeNull, base.DisplayName));
}
metadata.AddArgument(new RuntimeArgument("SubscriptionHandle", typeof(FileChangeSubscriptionHandle), ArgumentDirection.In, true));
metadata.AddArgument(new RuntimeArgument("WatchFolder", typeof(string), ArgumentDirection.In, true));
metadata.AddArgument(new RuntimeArgument("WatchPattern", typeof(string), ArgumentDirection.In));
metadata.AddImplementationVariable(this.bookmark);
}
示例4: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
base.CacheMetadata(metadata);
metadata.AddDefaultExtensionProvider<Helpers.WorkflowInstanceExtensionHelper>(() => new Helpers.WorkflowInstanceExtensionHelper());
}
示例5: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
// Tell the runtime that we need this extension
metadata.RequireExtension(typeof(Hosting.FileCopyExtension));
// Provide a Func<T> to create the extension if it does not already exist
metadata.AddDefaultExtensionProvider(() => new Hosting.FileCopyExtension());
if (this.StepIncrement < 0 || this.StepIncrement > 100)
metadata.AddValidationError(Properties.Resources.StepIncrementOutOfRange);
if (this.OnProgress != null) metadata.AddDelegate(this.OnProgress);
metadata.AddImplementationVariable(this.noPersistHandle);
metadata.AddImplementationVariable(this.bookmarkProgress);
metadata.AddArgument(new RuntimeArgument("Source", typeof(string), ArgumentDirection.In, true));
metadata.AddArgument(new RuntimeArgument("Target", typeof(string), ArgumentDirection.In, true));
}
示例6: 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)
{
metadata.AddDefaultExtensionProvider<IResumeBookmark>(() => new ResumeBookmarkExtension());
base.CacheMetadata(metadata);
}
示例7: CacheMetadata
protected override void CacheMetadata(NativeActivityMetadata metadata)
{
// Will use config to obtain cache information
metadata.RequireExtension(typeof (DataCacheFactory));
metadata.AddDefaultExtensionProvider(() => new DataCacheFactory());
metadata.RequireExtension(typeof (DataCacheNotificationExtension));
metadata.AddDefaultExtensionProvider(() => new DataCacheNotificationExtension());
metadata.AddArgument(new RuntimeArgument("CacheName", typeof (string), ArgumentDirection.In, false));
metadata.AddArgument(new RuntimeArgument("Operations", typeof (IEnumerable<DataCacheOperationDescriptor>),
ArgumentDirection.Out, false));
metadata.AddArgument(new RuntimeArgument("NotificationDescriptor", typeof (DataCacheNotificationDescriptor),
ArgumentDirection.Out, false));
metadata.AddImplementationVariable(_noPersistHandle);
}