Fixing an issue with output parameters that are of type IntPtr
[castle.git] / ActiveRecord / Castle.ActiveRecord / Framework / Internal / Model / HasManyModel.cs
blobc6aa3520c7c1ecdccbdf53924e2477c1ea633657
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;
20 /// <summary>
21 /// Model to represent a HasMany ( one to many ) association
22 /// </summary>
23 [Serializable]
24 public class HasManyModel : IVisitable
26 private readonly PropertyInfo propInfo;
27 private readonly HasManyAttribute hasManyAtt;
28 private DependentObjectModel dependentObjectModel;
30 /// <summary>
31 /// Initializes a new instance of the <see cref="HasManyModel"/> class.
32 /// </summary>
33 /// <param name="propInfo">The prop info.</param>
34 /// <param name="hasManyAtt">The has many att.</param>
35 public HasManyModel(PropertyInfo propInfo, HasManyAttribute hasManyAtt)
37 this.hasManyAtt = hasManyAtt;
38 this.propInfo = propInfo;
41 /// <summary>
42 /// Gets the property.
43 /// </summary>
44 /// <value>The property.</value>
45 public PropertyInfo Property
47 get { return propInfo; }
50 /// <summary>
51 /// Gets the has many attribute
52 /// </summary>
53 /// <value>The has many att.</value>
54 public HasManyAttribute HasManyAtt
56 get { return hasManyAtt; }
59 /// <summary>
60 /// Gets/Sets the the dependent object model
61 /// </summary>
62 /// <value>The dependent object model.</value>
63 public DependentObjectModel DependentObjectModel
65 get { return dependentObjectModel; }
66 set { dependentObjectModel = value; }
69 #region IVisitable Members
71 /// <summary>
72 /// Accepts the specified visitor and call the relevant IVisitor.Visit***() method
73 /// </summary>
74 /// <param name="visitor">The visitor.</param>
75 public void Accept(IVisitor visitor)
77 visitor.VisitHasMany(this);
80 #endregion