#region Apache Notice
/*****************************************************************************
* $Revision: 408099 $
* $LastChangedDate$
* $LastChangedBy$
*
* iBATIS.NET Data Mapper
* Copyright (C) 2008/2005 - The Apache Software Foundation
*
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
********************************************************************************/
#endregion
using Apache.Ibatis.Common.Contracts;
namespace Apache.Ibatis.DataMapper.Configuration.Module
{
///
/// Base class for code configuration modules.
///
public abstract class Module : ModuleBuilder, IModule
{
///
/// Initializes a new instance of the class.
///
public Module()
{
}
///
/// Initializes a new instance of the class.
///
/// The name space.
public Module(string nameSpace)
: base(nameSpace)
{
}
///
/// Apply the module to the container.
///
/// The engine.
public void Configure(IConfigurationEngine engine)
{
Contract.Require.That(engine, Is.Not.Null).When("retrieving argument engine in Configure method");
Load();
Build(engine.ConfigurationStore);
}
///
/// Override to add code configuration mapping to the .
///
public abstract void Load();
}
}