1 // Copyright 2004-2007 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
.DynamicProxy
.Generators
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
;
28 /// Initializes a new instance of the <see cref="EventToGenerate"/> class.
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; }