-
Notifications
You must be signed in to change notification settings - Fork 29
/
ApiGeneratorOptions.cs
49 lines (44 loc) · 1.8 KB
/
ApiGeneratorOptions.cs
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
43
44
45
46
47
48
49
using System;
namespace PublicApiGenerator
{
/// <summary>
/// Options to influence the ApiGenerator
/// </summary>
public class ApiGeneratorOptions
{
/// <summary>
/// Allows to control which types of the generated assembly should be included. If this option is specified all other types found in the assembly that are not present here will be exclude.
/// </summary>
public Type[]? IncludeTypes { get; set; }
/// <summary>
/// Instructs the generator to include assembly level attributes.
/// </summary>
/// <remarks>Defaults to true</remarks>
public bool IncludeAssemblyAttributes { get; set; } = true;
/// <summary>
/// Allows to whitelist certain namespace prefixes. For example by default types found in Microsoft or System namespaces are not treated as part of the public API.
/// </summary>
/// <example>
/// <code>
/// var options = new DefaultApiGeneratorOptions
/// {
/// WhitelistedNamespacePrefixes = new[] {"Microsoft.Whitelisted" }
/// };
/// </code>
/// </example>
public string[] WhitelistedNamespacePrefixes { get; set; } = DefaultWhitelistedNamespacePrefixes;
/// <summary>
/// Allows to exclude attributes by specifying the fullname of the attribute to exclude.
/// </summary>
/// <example>
///<code>
/// var options = new DefaultApiGeneratorOptions
/// {
/// ExcludeAttributes = new[] { "PublicApiGeneratorTests.Examples.SimpleAttribute" }
/// };
/// </code>
/// </example>
public string[]? ExcludeAttributes { get; set; }
static readonly string[] DefaultWhitelistedNamespacePrefixes = Array.Empty<string>();
}
}