forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIPropertyAccessor.cs
45 lines (43 loc) · 1.8 KB
/
IPropertyAccessor.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
namespace NHibernate.Properties
{
/// <summary>
/// Abstracts the notion of a "property". Defines a strategy for accessing the
/// value of a mapped property.
/// </summary>
public interface IPropertyAccessor
{
/// <summary>
/// When implemented by a class, create a "getter" for the mapped property.
/// </summary>
/// <param name="theClass">The <see cref="System.Type"/> to find the Property in.</param>
/// <param name="propertyName">The name of the mapped Property to get.</param>
/// <returns>
/// The <see cref="IGetter"/> to use to get the value of the Property from an
/// instance of the <see cref="System.Type"/>.</returns>
/// <exception cref="PropertyNotFoundException" >
/// Thrown when a Property specified by the <c>propertyName</c> could not
/// be found in the <see cref="System.Type"/>.
/// </exception>
IGetter GetGetter(System.Type theClass, string propertyName);
/// <summary>
/// When implemented by a class, create a "setter" for the mapped property.
/// </summary>
/// <param name="theClass">The <see cref="System.Type"/> to find the Property in.</param>
/// <param name="propertyName">The name of the mapped Property to set.</param>
/// <returns>
/// The <see cref="ISetter"/> to use to set the value of the Property on an
/// instance of the <see cref="System.Type"/>.
/// </returns>
/// <exception cref="PropertyNotFoundException" >
/// Thrown when a Property specified by the <c>propertyName</c> could not
/// be found in the <see cref="System.Type"/>.
/// </exception>
ISetter GetSetter(System.Type theClass, string propertyName);
#region NH specific
/// <summary>
/// Allow embedded and custom accessors to define if the ReflectionOptimizer can be used.
/// </summary>
bool CanAccessThroughReflectionOptimizer { get; }
#endregion
}
}