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


C# NativeActivityMetadata.RequireExtension方法代码示例

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


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

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

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

示例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);
        }
开发者ID:miguelhasse,项目名称:Workflow-Activities,代码行数:18,代码来源:SubscribeFileChanges.cs

示例4: 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));
        }
开发者ID:miguelhasse,项目名称:Workflow-Activities,代码行数:19,代码来源:FileCopy.cs

示例5: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     base.CacheMetadata(metadata);
     metadata.RequireExtension<ITwilioContext>();
 }
开发者ID:wasabii,项目名称:twilio-net,代码行数:5,代码来源:TwilioActivity.cs

示例6: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.AddImplementationVariable(timerExpiredBookmark);
     metadata.RequireExtension<TimerExtension>();
     base.CacheMetadata(metadata);
 }
开发者ID:lmagyar,项目名称:Orleans.Activities,代码行数:6,代码来源:TimeoutBase.cs

示例7: CacheMetadata

 /// <summary>
 /// The cache metadata.
 /// </summary>
 /// <param name="metadata">
 /// The metadata. 
 /// </param>
 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.RequireExtension<SpinNotify>();
     base.CacheMetadata(metadata);
 }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:11,代码来源:TaskNativeSpinWaiter.cs

示例8: CacheMetadata

 protected override void CacheMetadata(NativeActivityMetadata metadata)
 {
     metadata.RequireExtension<ICountModel>();
 }
开发者ID:mac10688,项目名称:PublicWorkspace,代码行数:4,代码来源:NotifyCountCompleted.cs

示例9: 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);
        }
开发者ID:IcodeNet,项目名称:cleansolution,代码行数:17,代码来源:WaitForCacheBulkNotification.cs

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


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