NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Reflection Support

Reflection supports returning custom attributes defined directly on a member (non-inherited) thought the ICustomAttributeProvider interface. This interface is defined on MemberInfo, ParamaterInfo, Module and Assembly.

interface ICustomAttributeProvider
{
public object[] GetCustomAttributes(Type attributeType);
public object[] GetCustomAttributes();
public bool IsDefined (Type attributeType);
}

GetCustomAttriubtes (Type)

Returns an array of instances of customAttributeType or null if non-exists on this member. If customAttributeType is a base class or interface this method will return any implementation of that type. Throws an AmbiguousMatchException if there is more than one attribute of type customAttributeType defined on this member. Does NOT do any inheritance walk. The array returned must be an array of the type specified.

GetCustomAttriubtes

Returns an instance of each custom attribute defined on the given on this member or an empty array if non-exists. If customAttributeType is a base class or interface this method will return any implementation of that type. Does NOT do any inheritance walk.

IsDefined

Returns true if one or more instance of attributeType is defined on this member.