forked from nhibernate/nhibernate-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUnwrapProxyPropertyDescriptor.cs
52 lines (47 loc) · 1.07 KB
/
UnwrapProxyPropertyDescriptor.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
46
47
48
49
50
51
52
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NHibernate.Type;
namespace NHibernate.Bytecode
{
/// <summary>
/// Descriptor for a property which is mapped as lazy="no-proxy"
/// </summary>
[Serializable]
public class UnwrapProxyPropertyDescriptor
{
public static UnwrapProxyPropertyDescriptor From(
Mapping.Property property,
int propertyIndex)
{
return new UnwrapProxyPropertyDescriptor(
propertyIndex,
property.Name,
property.Type
);
}
private UnwrapProxyPropertyDescriptor(
int propertyIndex,
string name,
IType type)
{
PropertyIndex = propertyIndex;
Name = name;
Type = type;
}
/// <summary>
/// Access to the index of the property in terms of its position in the entity persister
/// </summary>
public int PropertyIndex { get; }
/// <summary>
/// Access to the name of the property
/// </summary>
public string Name { get; }
/// <summary>
/// Access to the property's type
/// </summary>
public IType Type { get; }
}
}