PublicApiReadOptions Class
Options for PublicApi.ReadAssembly.
public sealed class PublicApiReadOptionsConstructors
| Name | Description |
|---|---|
| PublicApiReadOptions() |
PublicApiReadOptions()
public PublicApiReadOptions()No documentation is available.
Properties
| Name | Description |
|---|---|
| IncludeInternalSymbols | Gets or sets a value indicating whether the internal types and members are part of the model, in addition to the ones that are visible outside the assembly. Use it for the assemblies whose internal symbols are an API, such as an assembly compiled from the C# files of a source package. |
| InputIdentity | Gets or sets an identity for the input, such as a package identity and the path of the assembly in the package (e.g. MyPackage/1.0.0/lib/net8.0/MyLibrary.dll). When set, it is used as the scope of the symbol identities (see PublicApiAssembly.Scope). Avoid machine-specific values such as absolute file paths. |
| TargetFramework | Gets or sets the target framework of the assembly (e.g. net8.0 or .NETCoreApp,Version=v8.0). The value is kept as provided. When it is not set, it is inferred from the TargetFrameworkAttribute of the assembly. |
IncludeInternalSymbols
PublicApiReadOptions.csGets or sets a value indicating whether the internal types and members are part of the model, in addition to the ones that are visible outside the assembly. Use it for the assemblies whose internal symbols are an API, such as an assembly compiled from the C# files of a source package.
public bool IncludeInternalSymbols { get; set; }Property value
Remarks
When it is true, the model contains the types, members and accessors whose accessibility is internal or protected internal, the types nested in internal types, the interfaces implemented by a type and the explicit implementations of the members of internal interfaces. PublicApiSymbol.Accessibility reports PublicApiAccessibility.Internal, so PublicApiFormatter writes internal (e.g. public int Value { get; internal set; }). A member that hides an internal member inherited from a type of the same assembly is reported as new.
private and private protected symbols are never included, nor are the internal types generated by the compiler (e.g. the embedded NullableAttribute, <PrivateImplementationDetails> or the types declared with the file modifier). The internal members of the types declared in other assemblies are not considered, even when the assembly is listed in their InternalsVisibleToAttribute.
The default value is false: only the symbols that are visible outside the assembly are read.
InputIdentity
PublicApiReadOptions.csGets or sets an identity for the input, such as a package identity and the path of the assembly in the package (e.g. MyPackage/1.0.0/lib/net8.0/MyLibrary.dll). When set, it is used as the scope of the symbol identities (see PublicApiAssembly.Scope). Avoid machine-specific values such as absolute file paths.
public string? InputIdentity { get; set; }