See Also

IProxyTypeBuilder Interface  | IProxyTypeBuilder Members

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

Language

Visual Basic

C#

Show All

See Also Languages Spring.Core Send comments on this topic.

MemberAttributes Property

Spring.Proxy Namespace > IProxyTypeBuilder Interface : MemberAttributes Property (IProxyTypeBuilder)

The custom Attributes that the proxy members must be decorated with.

[Visual Basic]
Overridable Property MemberAttributes As IDictionary
[C#]
virtual IDictionary MemberAttributes {get; set;}

Remarks

This dictionary must use simple Strings for keys (denoting the member names that the attributes are to be applied to), with the corresponding values being ILists.

The key may be wildcarded using the '*' character... if so, then those proxy members that match against the key will be decorated with the attendant list of Attributes. This naturally implies that using the '*' character as a key will result in the attendant list of Attributes being applied to every member of the proxied class.

Example

The following code snippets show examples of how to decorate the members of a proxied class with one or more Attributes.

[C#] 

// get a concrete implementation of an IProxyTypeBuilder... 
IProxyTypeBuilder builder = ... ; 
builder.TargetType = typeof( ... ); 
 
IDictionary memAtts = new Hashtable(); 
builder.MemberAttributes = memAtts; 
 
// applies a single Attribute to all members of the proxied class... 
memAtts ["*"] = new Attribute[] { new MyCustomAttribute() }); 
 
// applies a number of Attributes to all members of the proxied class... 
memAtts ["*"] = new Attribute[] 
    { 
        new MyCustomAttribute(), 
        new AnotherAttribute(), 
    }); 
 
// applies a single Attribute to those members of the proxied class 
//     that have identifiers starting with 'Do' ... 
memAtts ["Do*"] = new Attribute[] { new MyCustomAttribute() }); 
 
// applies a number of Attributes to those members of the proxied class 
//     that have identifiers starting with 'Do' ... 
memAtts ["Do*"] = new Attribute[] 
    { 
        new MyCustomAttribute(), 
        new AnotherAttribute(), 
    });

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

IProxyTypeBuilder Interface  | IProxyTypeBuilder Members

 

 


© 2004-2006 Spring.NET Authors. All Rights Reserved.