blob: ff99bef0a5bb4dbd9e92bdb88946a401de0e10fd (
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
|
// Copyright (c) Microsoft Corporation. All rights reserved.
//
using System;
using System.Compiler;
namespace Microsoft.Ddue.Tools.Reflection {
// exposes all APIs that are visible from outside the assembly
// this includes property and event accessors (e.g. get_), delegate methods (e.g. Invoke), as well as enumeration members
public class ExternalFilter : ApiFilter {
public override bool IsExposedMember(Member member) {
if (member == null) throw new ArgumentNullException("member");
// expose all visible members
return (member.IsVisibleOutsideAssembly);
}
// we are satistied with the default namespace expose test, so don't override it
public override bool IsExposedType(TypeNode type) {
if (type == null) throw new ArgumentNullException("type");
// expose all visible types
return (type.IsVisibleOutsideAssembly);
}
}
}
|