本文整理汇总了C#中Configuration.SetProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Configuration.SetProperty方法的具体用法?C# Configuration.SetProperty怎么用?C# Configuration.SetProperty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Configuration
的用法示例。
在下文中一共展示了Configuration.SetProperty方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ApplyAdditionalConfiguration
private void ApplyAdditionalConfiguration(Configuration c)
{
c.SetProperty(global::NHibernate.Cfg.Environment.UseProxyValidator, bool.FalseString);
#if DEBUG
// write generated sql to the VS Output
c.SetInterceptor(new SqlStatementInterceptor());
#endif
}
示例2: Configure
protected override void Configure(Configuration configuration)
{
configuration
.SetProperty(Environment.UseSecondLevelCache, "true")
.SetProperty(Environment.CacheProvider, typeof (HashtableCacheProvider).AssemblyQualifiedName);
}
示例3: Expose
private static void Expose(Configuration cfg)
{
cfg.SetProperty(Environment.GenerateStatistics, "true");
}
示例4: ExtendConfiguration
private static void ExtendConfiguration(Configuration c)
{
c.SetProperty("generate_statistics", "true");
}
示例5: WithSql
public void WithSql(Configuration cfg)
{
cfg.SetProperty("generate_statistics", "true");
cfg.SetProperty(Environment.ConnectionDriver, typeof(MiniProfilerSql2008ClientDriver).AssemblyQualifiedName);
}
示例6: AddProperties
/// <summary>
/// Adds properties to the configuration object. Default property added is
/// <see cref="SessionContextName"/> as the Session Context class to use.
/// </summary>
/// <param name="configuration"></param>
protected virtual void AddProperties(Configuration configuration) {
if (!configuration.Properties.ContainsKey("current_session_context_class")) {
configuration.SetProperty("current_session_context_class", SessionContextName);
}
}
示例7: ApplyAdditionalConfiguration
private void ApplyAdditionalConfiguration(Configuration c)
{
c.SetProperty(global::NHibernate.Cfg.Environment.UseProxyValidator, bool.FalseString);
}