Fixing an issue with output parameters that are of type IntPtr
[castle.git] / ActiveRecord / Castle.ActiveRecord / Framework / Internal / Model / PropertyModel.cs
blobd623ee93c74812a82add3ba9b1b4f7f846817a05
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
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
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
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
17 using System;
18 using System.Reflection;
21 /// <summary>
22 /// Model for a simple persistent property
23 /// </summary>
24 [Serializable]
25 public class PropertyModel : IVisitable
27 private readonly PropertyInfo prop;
28 private readonly PropertyAttribute att;
30 /// <summary>
31 /// Initializes a new instance of the <see cref="PropertyModel"/> class.
32 /// </summary>
33 protected PropertyModel() {}
35 /// <summary>
36 /// Initializes a new instance of the <see cref="PropertyModel"/> class.
37 /// </summary>
38 /// <param name="prop">The prop.</param>
39 /// <param name="att">The att.</param>
40 public PropertyModel(PropertyInfo prop, PropertyAttribute att)
42 this.prop = prop;
43 this.att = att;
46 /// <summary>
47 /// Gets the property.
48 /// </summary>
49 /// <value>The property.</value>
50 public virtual PropertyInfo Property
52 get { return prop; }
55 /// <summary>
56 /// Gets the property attribute
57 /// </summary>
58 /// <value>The property att.</value>
59 public virtual PropertyAttribute PropertyAtt
61 get { return att; }
64 #region IVisitable Members
66 /// <summary>
67 /// Accepts the specified visitor and call the relevant IVisitor.Visit***() method
68 /// </summary>
69 /// <param name="visitor">The visitor.</param>
70 public void Accept(IVisitor visitor)
72 visitor.VisitProperty(this);
75 #endregion