PageRenderTime 45ms CodeModel.GetById 42ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 1ms

/src/Otis/IMappingDescriptionProvider.cs

http://otis-lib.googlecode.com/
C# | 38 lines | 11 code | 1 blank | 26 comment | 0 complexity | e59a9d1f4055e9eddb17bbbda83b6072 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Text;
 4using Otis.Providers;
 5
 6namespace Otis
 7{
 8	/// <summary>
 9	/// This interface is used to provide <see cref="Configuration"/> object with mapping information
10	/// </summary>
11	/// <remarks>
12	/// Configuration class can be configured from various sources: XML data, directly from the assembly which
13	/// contains mapped types, etc. Internally, <c>Configuration</c> class accesses this information through
14	/// instances of <see cref="IMappingDescriptorProvider"/> interface. For every supported source type, 
15	/// there is an implementation of <c>IMappingDescriptorProvider</c>. E.g. XML data is processed using
16	/// <see cref="XmlMappingDescriptionProvider"/> class, while assembly metadata is processed using
17	/// <see cref="AssemblyResourceMappingDescriptorProvider"/>. To provide support for custom mapping info
18	/// sources, client applications need to provide an implementation of <c>IMappingDescriptorProvider</c>
19	/// and call <see cref="Configuration.AddProvider"/>.
20	/// <example>
21	/// Example:
22	/// <code>
23	/// 	Configuration cfg = new Configuration();
24	///     // CustomMappingProvider is an imaginary class which reads mapping info from web service
25	/// 	IMappingDescriptorProvider provider = new CustomMappingProvider("http://server/get_mappings.asmx");
26	/// 	cfg.AddProvider(provider);
27	/// </code>
28	/// </example>
29	/// </remarks>
30	public interface IMappingDescriptorProvider
31	{
32		/// <summary>
33		/// Returns a list of mapping descriptors. For each tranformation type, there is an
34		/// <see cref="ClassMappingDescriptor"/> instance in the list
35		/// </summary>
36		IList<ClassMappingDescriptor> ClassDescriptors { get; }
37	}
38}