Fixing an issue with output parameters that are of type IntPtr
[castle.git] / ActiveRecord / Castle.ActiveRecord / Framework / Internal / Model / HasAndBelongsToManyModel.cs
blob8d20d95cbce9e1ce70cc49cbf12dc8f5298838e0
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 to HasAndBelongsToMany, which is used to model a many to many assoication.
23 /// </summary>
24 [Serializable]
25 public class HasAndBelongsToManyModel : IVisitable
27 private readonly PropertyInfo propInfo;
28 private readonly HasAndBelongsToManyAttribute hasManyAtt;
29 private CollectionIDModel collectionID;
31 /// <summary>
32 /// Initializes a new instance of the <see cref="HasAndBelongsToManyModel"/> class.
33 /// </summary>
34 /// <param name="propInfo">The prop info.</param>
35 /// <param name="hasManyAtt">The has many att.</param>
36 public HasAndBelongsToManyModel( PropertyInfo propInfo, HasAndBelongsToManyAttribute hasManyAtt )
38 this.hasManyAtt = hasManyAtt;
39 this.propInfo = propInfo;
42 /// <summary>
43 /// Gets the property.
44 /// </summary>
45 /// <value>The property.</value>
46 public PropertyInfo Property
48 get { return propInfo; }
51 /// <summary>
52 /// Gets the has many attribute
53 /// </summary>
54 /// <value>The has many att.</value>
55 public HasAndBelongsToManyAttribute HasManyAtt
57 get { return hasManyAtt; }
60 /// <summary>
61 /// Gets or sets the collection ID.
62 /// </summary>
63 /// <value>The collection ID.</value>
64 public CollectionIDModel CollectionID
66 get { return collectionID; }
67 set { collectionID = value; }
70 #region IVisitable Members
72 /// <summary>
73 /// Accepts the specified visitor and call the relevant IVisitor.Visit***() method
74 /// </summary>
75 /// <param name="visitor">The visitor.</param>
76 public void Accept(IVisitor visitor)
78 visitor.VisitHasAndBelongsToMany(this);
81 #endregion