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
.Internal
18 using System
.Reflection
;
22 /// Model for a simple persistent property
25 public class PropertyModel
: IVisitable
27 private readonly PropertyInfo prop
;
28 private readonly PropertyAttribute att
;
31 /// Initializes a new instance of the <see cref="PropertyModel"/> class.
33 protected PropertyModel() {}
36 /// Initializes a new instance of the <see cref="PropertyModel"/> class.
38 /// <param name="prop">The prop.</param>
39 /// <param name="att">The att.</param>
40 public PropertyModel(PropertyInfo prop
, PropertyAttribute att
)
47 /// Gets the property.
49 /// <value>The property.</value>
50 public virtual PropertyInfo Property
56 /// Gets the property attribute
58 /// <value>The property att.</value>
59 public virtual PropertyAttribute PropertyAtt
64 #region IVisitable Members
67 /// Accepts the specified visitor and call the relevant IVisitor.Visit***() method
69 /// <param name="visitor">The visitor.</param>
70 public void Accept(IVisitor visitor
)
72 visitor
.VisitProperty(this);