• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# NativeActivityMetadata类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



NativeActivityMetadata类属于命名空间,在下文中一共展示了NativeActivityMetadata类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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

 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);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:35,代码来源:StateMachine.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

        /// <summary>
        /// The cache metadata.
        /// </summary>
        /// <param name="metadata">
        /// The metadata.
        /// </param>
        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            metadata.RequireExtension<IMessagingStub>();

            var parametersContent = this.Content as ReceiveParametersContent;

            if (parametersContent != null)
            {
                foreach (var pair in parametersContent.Parameters)
                {
                    var argument = new RuntimeArgument(pair.Key, pair.Value.ArgumentType, ArgumentDirection.Out);
                    metadata.Bind(pair.Value, argument);
                    metadata.AddArgument(argument);
                }
            }

            var messageContent = this.Content as ReceiveMessageContent;
            if (messageContent != null)
            {
                var runtimeArgumentType = (messageContent.Message == null) ? typeof(object) : messageContent.Message.ArgumentType;
                var argument = new RuntimeArgument("Message", runtimeArgumentType, ArgumentDirection.Out);
                metadata.Bind(messageContent.Message, argument);
                metadata.AddArgument(argument);
            }

            // Note: Not adding other properties here as arguments
        }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:33,代码来源:ReceiveStubBase.cs


示例5: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     base.CacheMetadata(metadata);
     metadata.AddImplementationVariable(notificationIds);
     metadata.AddImplementationVariable(nodeIds);
     metadata.AddImplementationVariable(counter);
 }
开发者ID:maxpavlov,项目名称:FlexNet,代码行数:7,代码来源:WaitForMultipleContentChanged.cs


示例6: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     if (this.branchBodies == null)
     {
         this.branchBodies = new Collection<Activity>();
     }
     else
     {
         this.branchBodies.Clear();
     }
     foreach (PickBranch branch in this.Branches)
     {
         if (branch.Trigger == null)
         {
             metadata.AddValidationError(System.Activities.SR.PickBranchRequiresTrigger(branch.DisplayName));
         }
         PickBranchBody item = new PickBranchBody {
             Action = branch.Action,
             DisplayName = branch.DisplayName,
             Trigger = branch.Trigger,
             Variables = branch.Variables
         };
         this.branchBodies.Add(item);
     }
     metadata.SetChildrenCollection(this.branchBodies);
     metadata.AddImplementationVariable(this.pickStateVariable);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:27,代码来源:Pick.cs


示例7: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     if (this.Result != null)
     {
         RuntimeArgument argument = new RuntimeArgument("Result", this.Result.ArgumentType, ArgumentDirection.In);
         metadata.Bind(this.Result, argument);
         metadata.AddArgument(argument);
     }
     if (this.parameters != null)
     {
         int num = 0;
         foreach (InArgument argument2 in this.parameters)
         {
             RuntimeArgument argument3 = new RuntimeArgument("Parameter" + num++, argument2.ArgumentType, ArgumentDirection.In);
             metadata.Bind(argument2, argument3);
             metadata.AddArgument(argument3);
         }
     }
     RuntimeArgument argument4 = new RuntimeArgument("Message", System.ServiceModel.Activities.Constants.MessageType, ArgumentDirection.Out, true);
     metadata.Bind(this.Message, argument4);
     metadata.AddArgument(argument4);
     RuntimeArgument argument5 = new RuntimeArgument("CorrelatesWith", System.ServiceModel.Activities.Constants.CorrelationHandleType, ArgumentDirection.In);
     metadata.Bind(this.CorrelatesWith, argument5);
     metadata.AddArgument(argument5);
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:25,代码来源:ToReply.cs


示例8: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            RuntimeArgument subInstanceArgument = new RuntimeArgument("Scope", typeof(BookmarkScope), ArgumentDirection.In);
            metadata.Bind(this.Scope, subInstanceArgument);

            metadata.SetArgumentsCollection(new Collection<RuntimeArgument> { subInstanceArgument });
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:7,代码来源:DeleteBookmarkScope.cs


示例9: 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


示例10: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            RuntimeArgument targetArgument = new RuntimeArgument("Target", typeof(CompensationToken), ArgumentDirection.In);
            metadata.Bind(this.Target, targetArgument);

            metadata.SetArgumentsCollection(
                new Collection<RuntimeArgument>
                {
                    targetArgument
                });

            metadata.SetImplementationVariablesCollection(
                new Collection<Variable>
                {
                    this.currentCompensationToken
                });

            Fx.Assert(DefaultConfirmation != null, "DefaultConfirmation must be valid");
            Fx.Assert(InternalConfirm != null, "InternalConfirm must be valid");
            metadata.SetImplementationChildrenCollection(
                new Collection<Activity>
                {
                    DefaultConfirmation, 
                    InternalConfirm
                });
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:26,代码来源:Confirm.cs


示例11: Open

        // Returns true if this is the first time we've visited this node during this pass
        internal bool Open(Flowchart owner, NativeActivityMetadata metadata)
        {
            if (this.cacheId == owner.CacheId)
            {
                // We've already visited this node during this pass
                if (!object.ReferenceEquals(this.owner, owner))
                {
                    metadata.AddValidationError(SR.FlowNodeCannotBeShared(this.owner.DisplayName, owner.DisplayName));
                }

                // Whether we found an issue or not we don't want to change
                // the metadata during this pass.
                return false;
            }

            // if owner.ValidateUnconnectedNodes - Flowchart will be responsible for calling OnOpen for all the Nodes (connected and unconnected)
            if (!owner.ValidateUnconnectedNodes)
            {
                OnOpen(owner, metadata);
            }
            this.owner = owner;
            this.cacheId = owner.CacheId;
            this.Index = -1;

            return true;
        }
开发者ID:iskiselev,项目名称:JSIL.NetFramework,代码行数:27,代码来源:FlowNode.cs


示例12: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            if (GetBatchingStrategyFactory.IsNull()) metadata.AddValidationError("GetBatchingStrategyFactory function is expected.");
            if (GetNextVectors.IsNull()) metadata.AddValidationError("GetNextVectors function is expected.");
            if (ItemCount == null) metadata.AddValidationError("ItemCount expression expected.");

            metadata.AddDelegate(GetBatchingStrategyFactory);
            metadata.AddDelegate(GetNextVectors);
            metadata.AddDelegate(ReinitializeVectorProvider);

            RuntimeArgument arg;

            metadata.AddArgument(arg = new RuntimeArgument("LastResult", typeof(BatchExecutionResult), ArgumentDirection.In));
            metadata.Bind(LastResult, arg);

            metadata.AddArgument(arg = new RuntimeArgument("ReinitializationFrequency", typeof(int), ArgumentDirection.In));
            metadata.Bind(ReinitializationFrequency, arg);

            metadata.AddArgument(arg = new RuntimeArgument("UseCache", typeof(bool), ArgumentDirection.In));
            metadata.Bind(UseCache, arg);

            metadata.AddChild(ItemCount);

            metadata.AddImplementationVariable(cachedVectors);
            metadata.AddImplementationVariable(strategyHasJustInited);

            base.CacheMetadata(metadata);
        }
开发者ID:nagyistoce,项目名称:Neuroflow,代码行数:28,代码来源:UnorderedBatcher.cs


示例13: 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


示例14: CacheMetadata

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

            // declare the CompletionCondition as a child
            if (this.CompletionCondition != null)
            {
                metadata.SetChildrenCollection(new Collection<Activity> { this.CompletionCondition });
            }

            // declare the hasCompleted variable
            if (this.CompletionCondition != null)
            {
                if (this.hasCompleted == null)
                {
                    this.hasCompleted = new Variable<bool>();
                }

                metadata.AddImplementationVariable(this.hasCompleted);
            }

            metadata.AddDelegate(this.Body);
        }
开发者ID:tian1ll1,项目名称:WPF_Examples,代码行数:25,代码来源:ParallelForEach.cs


示例15: OnOpen

 internal override void OnOpen(Flowchart owner, NativeActivityMetadata metadata)
 {
     if (this.Condition == null)
     {
         metadata.AddValidationError(SR.FlowDecisionRequiresCondition(owner.DisplayName));
     }
 }
开发者ID:nlh774,项目名称:DotNetReferenceSource,代码行数:7,代码来源:FlowDecision.cs


示例16: CacheMetadata

        protected override void CacheMetadata(NativeActivityMetadata metadata)
        {
            RuntimeArgument argument;

            argument = new RuntimeArgument("JobGuid", typeof(Guid), ArgumentDirection.In);
            metadata.Bind(this.JobGuid, argument);
            metadata.AddArgument(argument);

            argument = new RuntimeArgument("UserGuid", typeof(Guid), ArgumentDirection.In);
            metadata.Bind(this.UserGuid, argument);
            metadata.AddArgument(argument);

            if (this.Try != null)
            {
                metadata.AddChild(this.Try);
            }
            if (this.Finally != null)
            {
                metadata.AddChild(this.Finally);
            }

            argument = new RuntimeArgument("MaxRetries", typeof(int), ArgumentDirection.In);
            metadata.Bind(this.MaxRetries, argument);
            metadata.AddArgument(argument);

            metadata.AddImplementationVariable(this.retries);
        }
开发者ID:skyquery,项目名称:graywulf,代码行数:27,代码来源:Retry.cs


示例17: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     //call base.CacheMetadata to add the Activities and Variables to this activity's metadata
     base.CacheMetadata(metadata);
     //add the private implementation variable: currentIndex 
     metadata.AddImplementationVariable(this.currentIndex);
 }
开发者ID:blacklensama,项目名称:1709,代码行数:7,代码来源:ParallelActivity.cs


示例18: ProcessChildStates

 /// <summary>
 /// Create internal states
 /// </summary>
 public static void ProcessChildStates(NativeActivityMetadata metadata, Collection<State> childStates,
     Collection<InternalState> internalStates, Collection<ActivityFunc<string, StateMachineEventManager, string>> internalStateFuncs)
 {
     foreach (State state in childStates)
     {
         InternalState internalState = state.InternalState;
         internalStates.Add(internalState);
         DelegateInArgument<string> toStateId = new DelegateInArgument<string>();
         DelegateInArgument<StateMachineEventManager> eventManager = new DelegateInArgument<StateMachineEventManager>();
         internalState.ToState = toStateId;
         internalState.EventManager = eventManager;
         ActivityFunc<string, StateMachineEventManager, string> activityFunc = new ActivityFunc<string, StateMachineEventManager, string>
         {
             Argument1 = toStateId,
             Argument2 = eventManager,
             Handler = internalState,
         };
         if (state.Reachable)
         {
             //If this state is not reached, we should not add it as child because it's even not well validated.
             metadata.AddDelegate(activityFunc);
         }
         internalStateFuncs.Add(activityFunc);
     }
 }
开发者ID:xiluo,项目名称:document-management,代码行数:28,代码来源:StateMachineHelper..cs


示例19: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     RuntimeArgument argument = new RuntimeArgument("Target", typeof(CompensationToken), ArgumentDirection.In);
     metadata.Bind(this.Target, argument);
     metadata.SetArgumentsCollection(new Collection<RuntimeArgument> { argument });
     metadata.SetImplementationVariablesCollection(new Collection<Variable> { this.toConfirmToken });
     metadata.SetImplementationChildrenCollection(new Collection<Activity> { this.Body });
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:8,代码来源:DefaultConfirmation.cs


示例20: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.RequireExtension<ICountModel>();
     var currentCountArg = new RuntimeArgument(
         "CurrentCount", typeof(Int32), ArgumentDirection.In);
     metadata.AddArgument(currentCountArg);
     metadata.Bind(this.CurrentCount, currentCountArg);
 }
开发者ID:mac10688,项目名称:PublicWorkspace,代码行数:8,代码来源:NotifyCountUpdated.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# NativeLibrary类代码示例发布时间:2022-05-24
下一篇:
C# NativeActivityContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap