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


C# MutableConfiguration.Attribute方法代码示例

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


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

示例1: Build

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public IConfiguration Build()
		{
			var facilityConfiguraiton = new MutableConfiguration("facility");
			facilityConfiguraiton.Attribute("id", this.id);
			facilityConfiguraiton.Attribute("type", typeof(NHibernateFacility).FullName);
			foreach (var factoryConfiguration in factoryConfigurations)
			{
				var config=factoryConfiguration.Build();
				facilityConfiguraiton.Children.Add(config);
			}

			return facilityConfiguraiton;
		}
开发者ID:cprieto,项目名称:Castle.Facilities.NHibernateIntegration,代码行数:17,代码来源:NHFacilityConfiguration.cs

示例2: PopulateBusConfiguration

        protected override void PopulateBusConfiguration(MutableConfiguration busConfig)
        {
            base.PopulateBusConfiguration(busConfig);

            if (string.IsNullOrEmpty(Path) == false)
                busConfig.Attribute("path", Path);
        }
开发者ID:helge,项目名称:rhino-esb,代码行数:7,代码来源:RhinoQueuesHostConfiguration.cs

示例3: InvalidProtocol_throws

 public void InvalidProtocol_throws() {
     var configStore = new DefaultConfigurationStore();
     var configuration = new MutableConfiguration("facility");
     configuration.Attribute("type", typeof(SolrNetFacility).AssemblyQualifiedName);
     configuration.CreateChild("solrURL", "ftp://localhost");
     configStore.AddFacilityConfiguration(typeof(SolrNetFacility).FullName, configuration);
     new WindsorContainer(configStore);
 }
开发者ID:Jo1nes,项目名称:SolrNet,代码行数:8,代码来源:CastleFixture.cs

示例4: Ping_Query

        public void Ping_Query()
        {
            var configStore = new DefaultConfigurationStore();
            var configuration = new MutableConfiguration("facility");
            configuration.Attribute("type", typeof(SolrNetFacility).AssemblyQualifiedName);
            configuration.CreateChild("solrURL", "http://localhost:8983/solr");
            configStore.AddFacilityConfiguration(typeof(SolrNetFacility).FullName, configuration);
            var container = new WindsorContainer(configStore);

            var solr = container.Resolve<ISolrOperations<CastleFixture.Document>>();
            solr.Ping();
            Console.WriteLine(solr.Query(SolrQuery.All).Count);
        }
开发者ID:FilipVV,项目名称:SolrNet,代码行数:13,代码来源:CastleIntegrationFixture.cs

示例5: GetFacilityConfig

        private MutableConfiguration GetFacilityConfig(IApplication application)
        {
            var currentEnvironment = EnumHelper.GetKey(application.Environment);
            var allEnvironments = EnumHelper.GetKeys<Environment>();

            var facilityConfig = new MutableConfiguration("facility");
            if (HttpContext.Current != null)
            {
                facilityConfig.Attribute("isWeb", bool.TrueString);
            }

            foreach (var config in application.DatabaseConfiguration)
            {
                if (complexConfigurationPattern.IsMatch(config.Key))
                {
                    var match = complexConfigurationPattern.Match(config.Key);
                    var environment = match.Groups[1].Value;
                    var alias = match.Groups[2].Value;

                    if (currentEnvironment.Equals(environment))
                    {
                        AddFactory(facilityConfig, alias);
                    }
                }
                else
                {
                    if (currentEnvironment.Equals(config.Key))
                    {
                        AddDefaultFactory(facilityConfig);
                    }
                    else
                    {
                        if (!Enumerable.Contains(allEnvironments, config.Key))
                        {
                            var alias = config.Key;
                            var environmentSpecific = String.Format(EnvironmentSpecificTemplate, currentEnvironment, alias);
                            if (!application.DatabaseConfiguration.ContainsKey(environmentSpecific))
                            {
                                AddFactory(facilityConfig, alias);
                            }
                        }
                    }
                }
            }

            return facilityConfig;
        }
开发者ID:coreframework,项目名称:Core-Framework,代码行数:47,代码来源:ConfigureNHibernateFacility.cs

示例6: PopulateBusConfiguration

        protected virtual void PopulateBusConfiguration(MutableConfiguration busConfig)
        {
            busConfig
                .Attribute("endpoint", Endpoint)
                .Attribute("threadCount", ThreadCount.ToString())
                .Attribute("numberOfRetries", NumberOfRetries.ToString());

            if (string.IsNullOrEmpty(Name) == false)
                busConfig.Attribute("name", Name);

            if (string.IsNullOrEmpty(LoadBalancerEndpoint) == false)
                busConfig.Attribute("loadBalancerEndpoint", LoadBalancerEndpoint);

            if (string.IsNullOrEmpty(LogEndpoint) == false)
                busConfig.Attribute("logEndpoint", LogEndpoint);
        }
开发者ID:helge,项目名称:rhino-esb,代码行数:16,代码来源:HostConfiguration.cs


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