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


C# Cfg.SetProperty方法代码示例

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


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

示例1: Configure

		protected override void Configure(Cfg.Configuration configuration)
		{
			configuration.SetProperty(Cfg.Environment.BatchSize, "10");

			configuration.SetProperty(	Cfg.Environment.SqlExceptionConverter,
										typeof (MSSQLExceptionConverterExample).AssemblyQualifiedName);
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:7,代码来源:Fixture.cs

示例2: Configure

		//protected override bool AppliesTo(Dialect.Dialect dialect)
		//{
		//  // this test work only with Field interception (NH-1618)
		//  return FieldInterceptionHelper.IsInstrumented( new Person() );
		//}
		protected override void Configure(Cfg.Configuration configuration)
		{
			configuration.SetProperty(Environment.ProxyFactoryFactoryClass,
										typeof(NHibernate.ByteCode.Castle.ProxyFactoryFactory).AssemblyQualifiedName);
			configuration.SetProperty(Environment.MaxFetchDepth, "2");
			configuration.SetProperty(Environment.UseSecondLevelCache, "false");
		}
开发者ID:juanplopes,项目名称:nhibernate,代码行数:12,代码来源:LazyOneToOneTest.cs

示例3: Configure

		protected override void Configure(Cfg.Configuration configuration)
		{
			if(Dialect is MsSql2000Dialect)
			{
				configuration.SetProperty(
					Cfg.Environment.SqlExceptionConverter,
					typeof(MSSQLExceptionConverterExample).AssemblyQualifiedName);
			}

			if (Dialect is Oracle8iDialect)
			{
				configuration.SetProperty(
					Cfg.Environment.SqlExceptionConverter,
					typeof(OracleClientExceptionConverterExample).AssemblyQualifiedName);
			}

			if (Dialect is PostgreSQLDialect)
			{
				configuration.SetProperty(
					Cfg.Environment.SqlExceptionConverter,
					typeof(PostgresExceptionConverterExample).AssemblyQualifiedName);
			}

			if (Dialect is FirebirdDialect)
			{
				configuration.SetProperty(
					Cfg.Environment.SqlExceptionConverter,
					typeof(FbExceptionConverterExample).AssemblyQualifiedName);
			}
		}
开发者ID:nhibernate,项目名称:nhibernate-core,代码行数:30,代码来源:SQLExceptionConversionTest.cs

示例4: Config

        public void Config(IPersistenceUnitCfg puCfg, Cfg.Configuration configuration)
        {
           if(puCfg.Name ==  MockPersistenceUnitCfg.MockPUName )
           {
                
               configuration.SetProperty("connection.provider", "NHibernate.Connection.DriverConnectionProvider");
               configuration.SetProperty("connection.driver_class", "NHibernate.Driver.SqlClientDriver");
               configuration.SetProperty("connection.connection_string", "Server=(local);initial catalog=NHibernateBurrow;Integrated Security=SSPI");
               configuration.SetProperty("dialect", "NHibernate.Dialect.MsSql2005Dialect");

            configuration.SetProperty("adonet.batch_size", testAdoBatchSize.ToString());
         
           }
        }
开发者ID:hazzik,项目名称:NHibernate.Burrow,代码行数:14,代码来源:ConfiguratorFixture.cs

示例5: AddMappings

		protected override void AddMappings(Cfg.Configuration configuration)
		{
			// Set some properties that must be set before the mappings are added.
			// (The overridable Configure(cfg) is called AFTER AddMappings(cfg).)
			configuration.SetProperty(Cfg.Environment.PreferPooledValuesLo, _preferLo.ToString().ToLower());

			base.AddMappings(configuration);
		}
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:8,代码来源:DefaultOptimizedSequenceTest.cs

示例6: Configure

		protected override void Configure(Cfg.Configuration configuration)
		{
			configuration.SetProperty(Cfg.Environment.GenerateStatistics, "true");
		}
开发者ID:kstenson,项目名称:NHibernate.Search,代码行数:4,代码来源:StatsFixture.cs

示例7: Configure

		protected override void Configure(Cfg.Configuration configuration)
		{
			configuration.SetProperty(Cfg.Environment.ShowSql, "true");
			base.Configure(configuration);
		}
开发者ID:prime,项目名称:nshibernate,代码行数:5,代码来源:WhereSubqueryTests.cs

示例8: Configure

 protected override void Configure(Cfg.Configuration configuration)
 {
     //get rid of the overhead supporting distr trans
     configuration.SetProperty(Cfg.Environment.TransactionStrategy, typeof(AdoNetTransactionFactory).FullName);
 }
开发者ID:marchlud,项目名称:nhibernate-core,代码行数:5,代码来源:PerfTest.cs

示例9: Configure

		//protected override bool AppliesTo(Dialect.Dialect dialect)
		//{
		//  // this test work only with Field interception (NH-1618)
		//  return FieldInterceptionHelper.IsInstrumented( new Person() );
		//}
		protected override void Configure(Cfg.Configuration configuration)
		{
			configuration.SetProperty(Environment.MaxFetchDepth, "2");
			configuration.SetProperty(Environment.UseSecondLevelCache, "false");
		}
开发者ID:Ruhollah,项目名称:nhibernate-core,代码行数:10,代码来源:LazyOneToOneTest.cs


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