2
2
using System . Collections . Generic ;
3
3
using System . Data ;
4
4
using System . Linq ;
5
- using NHibernate . Bytecode ;
6
5
using NHibernate . Connection ;
7
6
using NHibernate . Dialect ;
8
7
using NHibernate . Driver ;
@@ -35,8 +34,6 @@ public abstract class PersistenceConfiguration<TThisConfiguration, TConnectionSt
35
34
protected const string DriverClassKey = NHibEnvironment . ConnectionDriver ;
36
35
protected const string ConnectionStringKey = NHibEnvironment . ConnectionString ;
37
36
protected const string IsolationLevelKey = NHibEnvironment . Isolation ;
38
- protected const string ProxyFactoryFactoryClassKey = "proxyfactory.factory_class" ;
39
- protected const string DefaultProxyFactoryFactoryClassName = "NHibernate.ByteCode.Castle.ProxyFactoryFactory, NHibernate.ByteCode.Castle" ;
40
37
protected const string AdoNetBatchSizeKey = NHibEnvironment . BatchSize ;
41
38
protected const string CurrentSessionContextClassKey = "current_session_context_class" ;
42
39
@@ -49,7 +46,6 @@ public abstract class PersistenceConfiguration<TThisConfiguration, TConnectionSt
49
46
protected PersistenceConfiguration ( )
50
47
{
51
48
values [ ConnectionProviderKey ] = DefaultConnectionProviderClassName ;
52
- values [ ProxyFactoryFactoryClassKey ] = DefaultProxyFactoryFactoryClassName ;
53
49
connectionString = new TConnectionString ( ) ;
54
50
}
55
51
@@ -73,9 +69,6 @@ static IEnumerable<string> OverridenDefaults(IDictionary<string,string> settings
73
69
{
74
70
if ( settings [ ConnectionProviderKey ] != DefaultConnectionProviderClassName )
75
71
yield return ConnectionProviderKey ;
76
-
77
- if ( settings [ ProxyFactoryFactoryClassKey ] != DefaultProxyFactoryFactoryClassName )
78
- yield return ProxyFactoryFactoryClassKey ;
79
72
}
80
73
81
74
private static IEnumerable < string > KeysToPreserve ( NHibConfiguration nhibernateConfig , IDictionary < string , string > settings )
@@ -300,25 +293,6 @@ public TThisConfiguration ConnectionString(string value)
300
293
return ( TThisConfiguration ) this ;
301
294
}
302
295
303
- /// <summary>
304
- /// Configure caching.
305
- /// </summary>
306
- /// <example>
307
- /// Cache(x =>
308
- /// {
309
- /// x.UseQueryCache();
310
- /// x.UseMinimalPuts();
311
- /// });
312
- /// </example>
313
- /// <param name="cacheExpression">Closure for configuring caching</param>
314
- /// <returns>Configuration builder</returns>
315
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().Cache(...))" ) ]
316
- public TThisConfiguration Cache ( Action < CacheSettingsBuilder > cacheExpression )
317
- {
318
- cacheExpression ( cache ) ;
319
- return ( TThisConfiguration ) this ;
320
- }
321
-
322
296
/// <summary>
323
297
/// Sets a raw property on the NHibernate configuration. Use this method
324
298
/// if there isn't a specific option available in the API.
@@ -332,82 +306,6 @@ public TThisConfiguration Raw(string key, string value)
332
306
return ( TThisConfiguration ) this ;
333
307
}
334
308
335
- /// <summary>
336
- /// Sets the collectiontype.factory_class property.
337
- /// NOTE: NHibernate 2.1 only
338
- /// </summary>
339
- /// <param name="collectionTypeFactoryClass">factory class</param>
340
- /// <returns>Configuration</returns>
341
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().CollectionTypeFactory(...))" ) ]
342
- public TThisConfiguration CollectionTypeFactory ( string collectionTypeFactoryClass )
343
- {
344
- values [ CollectionTypeFactoryClassKey ] = collectionTypeFactoryClass ;
345
- return ( TThisConfiguration ) this ;
346
- }
347
-
348
- /// <summary>
349
- /// Sets the collectiontype.factory_class property.
350
- /// NOTE: NHibernate 2.1 only
351
- /// </summary>
352
- /// <param name="collectionTypeFactoryClass">factory class</param>
353
- /// <returns>Configuration</returns>
354
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().CollectionTypeFactory(...))" ) ]
355
- public TThisConfiguration CollectionTypeFactory ( Type collectionTypeFactoryClass )
356
- {
357
- values [ CollectionTypeFactoryClassKey ] = collectionTypeFactoryClass . AssemblyQualifiedName ;
358
- return ( TThisConfiguration ) this ;
359
- }
360
-
361
- /// <summary>
362
- /// Sets the collectiontype.factory_class property.
363
- /// NOTE: NHibernate 2.1 only
364
- /// </summary>
365
- /// <typeparam name="TCollectionTypeFactory">factory class</typeparam>
366
- /// <returns>Configuration</returns>
367
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().CollectionTypeFactory(...))" ) ]
368
- public TThisConfiguration CollectionTypeFactory < TCollectionTypeFactory > ( ) where TCollectionTypeFactory : ICollectionTypeFactory
369
- {
370
- return CollectionTypeFactory ( typeof ( TCollectionTypeFactory ) ) ;
371
- }
372
-
373
- /// <summary>
374
- /// Sets the proxyfactory.factory_class property.
375
- /// NOTE: NHibernate 2.1 only
376
- /// </summary>
377
- /// <param name="proxyFactoryFactoryClass">factory class</param>
378
- /// <returns>Configuration</returns>
379
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().ProxyFactoryFactory(...))" ) ]
380
- public TThisConfiguration ProxyFactoryFactory ( string proxyFactoryFactoryClass )
381
- {
382
- values [ ProxyFactoryFactoryClassKey ] = proxyFactoryFactoryClass ;
383
- return ( TThisConfiguration ) this ;
384
- }
385
-
386
- /// <summary>
387
- /// Sets the proxyfactory.factory_class property.
388
- /// NOTE: NHibernate 2.1 only
389
- /// </summary>
390
- /// <param name="proxyFactoryFactory">factory class</param>
391
- /// <returns>Configuration</returns>
392
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().ProxyFactoryFactory(...))" ) ]
393
- public TThisConfiguration ProxyFactoryFactory ( Type proxyFactoryFactory )
394
- {
395
- values [ ProxyFactoryFactoryClassKey ] = proxyFactoryFactory . AssemblyQualifiedName ;
396
- return ( TThisConfiguration ) this ;
397
- }
398
-
399
- /// <summary>
400
- /// Sets the proxyfactory.factory_class property.
401
- /// NOTE: NHibernate 2.1 only
402
- /// </summary>
403
- /// <typeparam name="TProxyFactoryFactory">factory class</typeparam>
404
- /// <returns>Configuration</returns>
405
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().ProxyFactoryFactory(...))" ) ]
406
- public TThisConfiguration ProxyFactoryFactory < TProxyFactoryFactory > ( ) where TProxyFactoryFactory : IProxyFactoryFactory
407
- {
408
- return ProxyFactoryFactory ( typeof ( TProxyFactoryFactory ) ) ;
409
- }
410
-
411
309
/// <summary>
412
310
/// Sets the adonet.batch_size property.
413
311
/// </summary>
@@ -419,29 +317,6 @@ public TThisConfiguration AdoNetBatchSize(int size)
419
317
return ( TThisConfiguration ) this ;
420
318
}
421
319
422
- /// <summary>
423
- /// Sets the current_session_context_class property.
424
- /// </summary>
425
- /// <param name="currentSessionContextClass">current session context class</param>
426
- /// <returns>Configuration</returns>
427
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().CurrentSessionContext(...))" ) ]
428
- public TThisConfiguration CurrentSessionContext ( string currentSessionContextClass )
429
- {
430
- values [ CurrentSessionContextClassKey ] = currentSessionContextClass ;
431
- return ( TThisConfiguration ) this ;
432
- }
433
-
434
- /// <summary>
435
- /// Sets the current_session_context_class property.
436
- /// </summary>
437
- /// <typeparam name="TSessionContext">Implementation of ICurrentSessionContext to use</typeparam>
438
- /// <returns>Configuration</returns>
439
- [ Obsolete ( "Moved to FluentConfiguration (Fluently.Configure().CurrentSessionContext(...))" ) ]
440
- public TThisConfiguration CurrentSessionContext < TSessionContext > ( ) where TSessionContext : NHibernate . Context . ICurrentSessionContext
441
- {
442
- return CurrentSessionContext ( typeof ( TSessionContext ) . AssemblyQualifiedName ) ;
443
- }
444
-
445
320
/// <summary>
446
321
/// Sets the connection isolation level. NHibernate setting: connection.isolation
447
322
/// </summary>
0 commit comments