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


C# IProviderConfiguration.GetIntProperty方法代码示例

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


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

示例1: PopulateFromProviderConfig

 public virtual void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     EventHubSettingsType = providerConfiguration.GetTypeProperty(EventHubConfigTypeName, null);
     if (string.IsNullOrWhiteSpace(StreamProviderName))
     {
         throw new ArgumentOutOfRangeException("providerConfiguration", "StreamProviderName not set.");
     }
     CacheSizeMb = providerConfiguration.GetIntProperty(CacheSizeMbName, DefaultCacheSizeMb);
 }
开发者ID:isurufonseka,项目名称:orleans,代码行数:9,代码来源:EventHubStreamProviderConfig.cs

示例2: PopulateFromProviderConfig

 /// <summary>
 /// Utility function to populate config from provider config
 /// </summary>
 /// <param name="providerConfiguration"></param>
 public virtual void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     GeneratorConfigType = providerConfiguration.GetTypeProperty(GeneratorConfigTypeName, null);
     if (string.IsNullOrWhiteSpace(StreamProviderName))
     {
         throw new ArgumentOutOfRangeException("providerConfiguration", "StreamProviderName not set.");
     }
     TotalQueueCount = providerConfiguration.GetIntProperty(TotalQueueCountName, TotalQueueCountDefault);
 }
开发者ID:Rejendo,项目名称:orleans,代码行数:13,代码来源:GeneratorAdapterConfig.cs

示例3: Init

        /// <summary> Init the factory.</summary>
        public virtual void Init(IProviderConfiguration config, string providerName, Logger logger, IServiceProvider serviceProvider)
        {
            if (config == null) throw new ArgumentNullException("config");
            if (!config.Properties.TryGetValue(DataConnectionStringPropertyName, out dataConnectionString))
                throw new ArgumentException(string.Format("{0} property not set", DataConnectionStringPropertyName));
            if (!config.Properties.TryGetValue(DeploymentIdPropertyName, out deploymentId))
                throw new ArgumentException(string.Format("{0} property not set", DeploymentIdPropertyName));

            cacheSize = SimpleQueueAdapterCache.ParseSize(config, CacheSizeDefaultValue);
            
            numQueues = config.GetIntProperty(NumQueuesPropertyName, NumQueuesDefaultValue);

            this.providerName = providerName;
            streamQueueMapper = new HashRingBasedStreamQueueMapper(numQueues, providerName);
            adapterCache = new SimpleQueueAdapterCache(cacheSize, logger);
            if (StreamFailureHandlerFactory == null)
            {
                StreamFailureHandlerFactory =
                    qid => Task.FromResult<IStreamFailureHandler>(new NoOpStreamDeliveryFailureHandler(false));
            }
        }
开发者ID:osjimenez,项目名称:orleans,代码行数:22,代码来源:SQSAdapterFactory.cs

示例4: PopulateFromProviderConfig

 /// <summary>
 /// Utility function to populate config from provider config
 /// </summary>
 /// <param name="providerConfiguration"></param>
 public virtual void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     ConnectionString = providerConfiguration.GetProperty(ConnectionStringName, null);
     if (string.IsNullOrWhiteSpace(ConnectionString))
     {
         throw new ArgumentOutOfRangeException("providerConfiguration", ConnectionStringName + " not set.");
     }
     ConsumerGroup = providerConfiguration.GetProperty(ConsumerGroupName, null);
     if (string.IsNullOrWhiteSpace(ConsumerGroup))
     {
         throw new ArgumentOutOfRangeException("providerConfiguration", ConsumerGroupName + " not set.");
     }
     Path = providerConfiguration.GetProperty(PathName, null);
     if (string.IsNullOrWhiteSpace(Path))
     {
         throw new ArgumentOutOfRangeException("providerConfiguration", PathName + " not set.");
     }
     PrefetchCount = providerConfiguration.GetIntProperty(PrefetchCountName, InvalidPrefetchCount);
     if (PrefetchCount == InvalidPrefetchCount)
     {
         PrefetchCount = null;
     }
 }
开发者ID:sbambach,项目名称:orleans,代码行数:27,代码来源:EventHubSettings.cs

示例5: PopulateFromProviderConfig

 /// <summary>
 /// Utility function to populate config from provider config
 /// </summary>
 /// <param name="providerConfiguration"></param>
 public void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     TotalQueueCount = providerConfiguration.GetIntProperty(TotalQueueCountName, TotalQueueCountDefault);
 }
开发者ID:osjimenez,项目名称:orleans,代码行数:8,代码来源:MemoryAdapterConfig.cs

示例6: PopulateFromProviderConfig

 /// <summary>
 /// Utility function to populate config from provider config
 /// </summary>
 /// <param name="providerConfiguration"></param>
 public void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     EventsInStream = providerConfiguration.GetIntProperty(EventsInStreamName, EventsInStreamDefault);
     StreamNamespace = providerConfiguration.GetProperty(StreamNamespaceName, null);
 }
开发者ID:sbambach,项目名称:orleans,代码行数:9,代码来源:SimpleGeneratorConfig.cs

示例7: ParseSize

 public static int ParseSize(IProviderConfiguration config, int defaultSize)
 {
     return config.GetIntProperty(CACHE_SIZE_PARAM, defaultSize);
 }
开发者ID:TerabyteX,项目名称:orleans,代码行数:4,代码来源:SimpleQueueAdapterCache.cs

示例8: PopulateFromProviderConfig

 /// <summary>
 /// Read settings from provider configuration.
 /// </summary>
 /// <param name="providerConfiguration"></param>
 public void PopulateFromProviderConfig(IProviderConfiguration providerConfiguration)
 {
     EventHubSettingsType = providerConfiguration.GetTypeProperty(EventHubConfigTypeName, null);
     CheckpointerSettingsType = providerConfiguration.GetTypeProperty(CheckpointerSettingsTypeName, null);
     if (string.IsNullOrWhiteSpace(StreamProviderName))
     {
         throw new ArgumentOutOfRangeException(nameof(providerConfiguration), "StreamProviderName not set.");
     }
     CacheSizeMb = providerConfiguration.GetIntProperty(CacheSizeMbName, DefaultCacheSizeMb);
     DataMinTimeInCache = providerConfiguration.GetTimeSpanProperty(DataMinTimeInCacheName, DefaultDataMinTimeInCache);
     DataMaxAgeInCache = providerConfiguration.GetTimeSpanProperty(DataMaxAgeInCacheName, DefaultDataMaxAgeInCache);
 }
开发者ID:osjimenez,项目名称:orleans,代码行数:16,代码来源:EventHubStreamProviderSettings.cs

示例9: ParseSize

 public static int ParseSize(IProviderConfiguration config, int defaultSize)
 {
     return config.GetIntProperty(CacheSizePropertyName, defaultSize);
 }
开发者ID:PaulNorth,项目名称:orleans,代码行数:4,代码来源:SimpleQueueAdapterCache.cs


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