comparison Source/Aspects/OverloadAttribute.cs @ 0:f990fcb411a9

Копия текущей версии из github
author cin
date Thu, 27 Mar 2014 21:46:09 +0400
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:f990fcb411a9
1 using System;
2 using BLToolkit.TypeBuilder.Builders;
3
4 namespace BLToolkit.Aspects
5 {
6 /// <summary>
7 /// http://www.bltoolkit.net/Doc/Aspects/index.htm
8 /// </summary>
9 [AttributeUsage(AttributeTargets.Method)]
10 public sealed class OverloadAttribute : AbstractTypeBuilderAttribute
11 {
12 private readonly string _overloadedMethodName;
13 private readonly Type[] _parameterTypes;
14
15 public OverloadAttribute()
16 {
17 }
18
19 public OverloadAttribute(string overloadedMethodName): this(overloadedMethodName, null)
20 {
21 }
22
23 public OverloadAttribute(params Type[] parameterTypes): this(null, parameterTypes)
24 {
25 }
26
27 public OverloadAttribute(string overloadedMethodName, params Type[] parameterTypes)
28 {
29 _overloadedMethodName = overloadedMethodName;
30 _parameterTypes = parameterTypes;
31 }
32
33 public override IAbstractTypeBuilder TypeBuilder
34 {
35 get { return new Builders.OverloadAspectBuilder(_overloadedMethodName, _parameterTypes); }
36 }
37 }
38 }