1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle
.ActiveRecord
.Framework
18 using Castle
.Core
.Configuration
;
21 /// Abstracts the source of configuration for the framework.
23 public interface IConfigurationSource
26 /// Implementors should return the type that implements
27 /// the interface <see cref="IThreadScopeInfo"/>
29 Type ThreadScopeInfoImplementation { get; }
32 /// Implementors should return the type that implements
33 /// the interface <see cref="ISessionFactoryHolder"/>
35 Type SessionFactoryHolderImplementation { get; }
38 /// Implementors should return the type that implements
39 /// the interface NHibernate.Cfg.INamingStrategy
41 Type NamingStrategyImplementation { get; }
44 /// Implementors should return an <see cref="IConfiguration"/>
47 /// <param name="type"></param>
48 /// <returns></returns>
49 IConfiguration
GetConfiguration(Type type
);
52 /// Gets a value indicating whether this <see cref="IConfigurationSource"/> produce debug information
54 /// <value><c>true</c> if debug; otherwise, <c>false</c>.</value>
58 /// Gets a value indicating whether the entities should be lazy by default.
61 /// <c>true</c> if entities should be lazy by default; otherwise, <c>false</c>.
63 bool IsLazyByDefault { get; }
66 /// Gets a value indicating whether table names are assumed plural by default.
69 /// <c>true</c> if table names should be pluralized by default; otherwise, <c>false</c>.
71 bool PluralizeTableNames { get; }
74 /// Gets or sets a value indicating whether the models should be verified against the db schema on Initialisation.
77 /// <c>true</c> if models should be verified; otherwise, <c>false</c>.
79 bool VerifyModelsAgainstDBSchema { get; }