Welcome to mirror list, hosted at ThFree Co, Russian Federation.

defaultmemberattribute.cs « reflection « system « mscorlib « referencesource « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 00d6ab38ed0957b31106ce3a60d741d32b082fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
// ==++==
// 
//   Copyright (c) Microsoft Corporation.  All rights reserved.
// 
// ==--==
////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////
//
// DefaultMemberAttribute is defines the Member of a Type that is the "default"
// 
// <OWNER>[....]</OWNER>
//    member used by Type.InvokeMember.  The default member is simply a name given
//    to a type.
//
// 
// 
//
namespace System.Reflection {
    
    using System;

[Serializable]
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface)]
[System.Runtime.InteropServices.ComVisible(true)]
    public sealed class DefaultMemberAttribute : Attribute
    {
        // The name of the member
        private String m_memberName;

        // You must provide the name of the member, this is required
        public DefaultMemberAttribute(String memberName) {
            m_memberName = memberName;
        }

        // A get accessor to return the name from the attribute.
        // NOTE: There is no setter because the name must be provided
        //    to the constructor.  The name is not optional.
        public String MemberName {
            get {return m_memberName;}
        }
    }
}