Renamed RailsException to MonoRailException
[castle.git] / Tools / Castle.DynamicProxy2 / Castle.DynamicProxy / Generators / EventToGenerate.cs
blobd553df3e4250c7b851bcd94d96ed82bd2c82cb9a
1 // Copyright 2004-2007 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.DynamicProxy.Generators
17 using System;
18 using System.Reflection;
19 using Castle.DynamicProxy.Generators.Emitters;
21 public class EventToGenerate
23 private MethodInfo addMethod, removeMethod;
24 private EventEmitter emitter;
25 private EventAttributes attributes;
27 /// <summary>
28 /// Initializes a new instance of the <see cref="EventToGenerate"/> class.
29 /// </summary>
30 /// <param name="emitter">The emitter.</param>
31 /// <param name="addMethod">The add method.</param>
32 /// <param name="removeMethod">The remove method.</param>
33 /// <param name="attributes">The attributes.</param>
34 public EventToGenerate(EventEmitter emitter, MethodInfo addMethod, MethodInfo removeMethod, EventAttributes attributes)
36 this.addMethod = addMethod;
37 this.removeMethod = removeMethod;
38 this.emitter = emitter;
39 this.attributes = attributes;
42 public EventEmitter Emitter
44 get { return emitter; }
47 public MethodInfo AddMethod
49 get { return addMethod; }
50 set { addMethod = value; }
53 public MethodInfo RemoveMethod
55 get { return removeMethod; }
56 set { removeMethod = value; }
59 public EventAttributes Attributes
61 get { return attributes; }
62 set { attributes = value; }