0
|
1 using System;
|
|
2
|
|
3 namespace BLToolkit.Reflection.Extension
|
|
4 {
|
|
5 public class MemberExtension
|
|
6 {
|
|
7 public MemberExtension()
|
|
8 {
|
|
9 _attributes = new AttributeNameCollection();
|
|
10 }
|
|
11
|
|
12 private MemberExtension(AttributeNameCollection attributes)
|
|
13 {
|
|
14 _attributes = attributes;
|
|
15 }
|
|
16
|
|
17 public string Name { get; set; }
|
|
18
|
|
19 public AttributeExtensionCollection this[string attributeName]
|
|
20 {
|
|
21 get { return _attributes[attributeName]; }
|
|
22 }
|
|
23
|
|
24 private readonly AttributeNameCollection _attributes;
|
|
25 public AttributeNameCollection Attributes
|
|
26 {
|
|
27 get { return _attributes; }
|
|
28 }
|
|
29
|
|
30 private static readonly MemberExtension _null = new MemberExtension(AttributeNameCollection.Null);
|
|
31 public static MemberExtension Null
|
|
32 {
|
|
33 get { return _null; }
|
|
34 }
|
|
35 }
|
|
36 }
|