Skip to content

Commit 75ecb1a

Browse files
ViktorHofertarekghadityamandaleekacarlossanlop
authored
Create docs transport package and turn on extensions source of truth (#89312)
* Create docs ref+xml transport package Contributes to #996. Add a nuget package that contains all the reference assemblies and source-of-truth API docs XML files for the current release. * Turn on source of truth for Microsoft.Extensions.* Make the source of truth for API docs for the Microsoft.Extensions.* libraries dotnet/runtime instead of the intellisense package. Disable the few projects that aren't yet documented. Same for libraries that are already effectively source-of-truth in runtime but which aren't documented. * Add missing triple slash docs in Primitives * Fill in missing keyed DI doc comments. * Add memory cache triple slash docs * Add more missing docs * Add more missing docs * More missing docs * More docs * More * Add Microsoft.Extensions.Logging.Console docs * Microsoft.Extensions.Hosting docs * Exclude Microsoft.Bcl.* * Update src/libraries/Microsoft.Internal.Runtime.DotNetApiDocs.Transport/src/Microsoft.Internal.Runtime.DotNetApiDocs.Transport.proj Co-authored-by: Carlos Sánchez López <[email protected]> --------- Co-authored-by: Tarek Mahmoud Sayed <[email protected]> Co-authored-by: Aditya Mandaleeka <[email protected]> Co-authored-by: Carlos Sánchez López <[email protected]>
1 parent fa9ad22 commit 75ecb1a

File tree

46 files changed

+608
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+608
-25
lines changed

eng/intellisense.targets

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,46 @@
1-
<Project InitialTargets="VerifyAssemblySupportsDocsXmlGeneration">
1+
<Project>
22

33
<PropertyGroup>
4-
<UseIntellisensePackageDocXmlFile Condition="'$(UseIntellisensePackageDocXmlFile)' == ''">true</UseIntellisensePackageDocXmlFile>
4+
<UseCompilerGeneratedDocXmlFile Condition="'$(UseCompilerGeneratedDocXmlFile)' == '' and $(MSBuildProjectName.StartsWith('Microsoft.Extensions.'))">true</UseCompilerGeneratedDocXmlFile>
55
</PropertyGroup>
66

7-
<Target Name="VerifyAssemblySupportsDocsXmlGeneration"
8-
Condition="'$(UseIntellisensePackageDocXmlFile)' != 'true'">
9-
<Error Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for partial facade assemblies: $(AssemblyName)"
10-
Condition="'$(IsPartialFacadeAssembly)' == 'true'" />
11-
<Error Text="The 'UseIntellisensePackageDocXmlFile' property is not supported for assemblies that throw PlatformNotSupportedException: $(AssemblyName)"
12-
Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''" />
13-
</Target>
14-
15-
<PropertyGroup Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true'">
7+
<PropertyGroup Condition="'$(UseCompilerGeneratedDocXmlFile)' != 'true'">
168
<IntellisensePackageXmlRootFolder>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles'))</IntellisensePackageXmlRootFolder>
179
<IntellisensePackageXmlFilePathFromNetFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromNetFolder>
1810
<IntellisensePackageXmlFilePathFromDotNetPlatExtFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'dotnet-plat-ext', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromDotNetPlatExtFolder>
1911
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath>
2012
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath>
13+
14+
<!-- If the intellisense package doesn't provide an XML, use the compiler generated one instead. -->
15+
<UseCompilerGeneratedDocXmlFile Condition="'$(IntellisensePackageXmlFilePath)' == '' and '$(GenerateDocumentationFile)' == 'true'">true</UseCompilerGeneratedDocXmlFile>
16+
2117
<!-- Suppress "CS1591 - Missing XML comment for publicly visible type or member" compiler errors if
2218
- the intellisense package xml file is used or
2319
- the assembly is private (i.e. System.Private.Uri) or
2420
- the assembly is a PNSE assembly. -->
25-
<NoWarn Condition="'$(IntellisensePackageXmlFilePath)' != '' or
21+
<NoWarn Condition="'$(UseCompilerGeneratedDocXmlFile)' != 'true' or
2622
'$(IsPrivateAssembly)' == 'true' or
2723
'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);1591</NoWarn>
2824
</PropertyGroup>
2925

26+
<!-- Flow these properties to consuming projects for Microsoft.Internal.Runtime.DotNetApiDocs.Transport.proj to only
27+
include the source of truth compiler generated documentation files. -->
28+
<ItemDefinitionGroup>
29+
<TargetPathWithTargetPlatformMoniker>
30+
<UseCompilerGeneratedDocXmlFile>$(UseCompilerGeneratedDocXmlFile)</UseCompilerGeneratedDocXmlFile>
31+
<IsPartialFacadeAssembly>$(IsPartialFacadeAssembly)</IsPartialFacadeAssembly>
32+
<IsPlatformNotSupportedAssembly Condition="'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">true</IsPlatformNotSupportedAssembly>
33+
</TargetPathWithTargetPlatformMoniker>
34+
</ItemDefinitionGroup>
35+
3036
<ItemGroup>
3137
<PackageDownload Include="Microsoft.Private.Intellisense" Version="[$(MicrosoftPrivateIntellisenseVersion)]" />
3238
</ItemGroup>
3339

3440
<!-- Replace the compiler generated xml file in the obj folder with the one that comes from the intellisense package. -->
3541
<Target Name="ChangeDocumentationFileForPackaging"
3642
BeforeTargets="CopyFilesToOutputDirectory;DocumentationProjectOutputGroup"
37-
Condition="'$(IntellisensePackageXmlFilePath)' != ''">
43+
Condition="'$(UseCompilerGeneratedDocXmlFile)' != 'true' and '$(IntellisensePackageXmlFilePath)' != ''">
3844
<ItemGroup>
3945
<DocFileItem Remove="@(DocFileItem)" />
4046
<DocFileItem Include="$(IntellisensePackageXmlFilePath)" />

src/libraries/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<DisableArcadeTestFramework>true</DisableArcadeTestFramework>
44
<!-- Enabling this rule will cause build failures on undocumented public APIs.
5-
We cannot add it in eng/Versions.props because src/coreclr does not have access to UseIntellisensePackageDocXmlFile, which ensures
5+
We cannot add it in eng/Versions.props because src/coreclr does not have access to UseCompilerGeneratedDocXmlFile, which ensures
66
we only enable it in specific projects. so to avoid duplicating this property in coreclr, we can first scope it to src/libraries.
77
This property needs to be declared before the ..\..\Directory.Build.props import. -->
88
<SkipArcadeNoWarnCS1591>true</SkipArcadeNoWarnCS1591>

src/libraries/Microsoft.Bcl.AsyncInterfaces/src/Microsoft.Bcl.AsyncInterfaces.csproj

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFrameworks>netstandard2.0;$(NetFrameworkMinimum);netstandard2.1</TargetFrameworks>
45
<IsPackable>true</IsPackable>
@@ -9,10 +10,14 @@ Commonly Used Types:
910
System.IAsyncDisposable
1011
System.Collections.Generic.IAsyncEnumerable
1112
System.Collections.Generic.IAsyncEnumerator</PackageDescription>
13+
<!-- This library uses IsPartialFacadeAssembly for which the compiler doesn't produce any XML documentation. -->
14+
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
1215
</PropertyGroup>
16+
1317
<PropertyGroup>
1418
<IsPartialFacadeAssembly Condition="'$(TargetFramework)' == 'netstandard2.1'">true</IsPartialFacadeAssembly>
1519
</PropertyGroup>
20+
1621
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
1722
<Compile Include="System\Threading\Tasks\Sources\ManualResetValueTaskSourceCore.cs" />
1823
<Compile Include="System\Runtime\CompilerServices\AsyncIteratorMethodBuilder.cs" />
@@ -40,8 +45,10 @@ System.Collections.Generic.IAsyncEnumerator</PackageDescription>
4045
<Compile Include="$(CoreLibSharedDir)\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs">
4146
<Link>System.Private.CoreLib\System\Runtime\CompilerServices\EnumeratorCancellationAttribute.cs</Link>
4247
</Compile>
48+
4349
</ItemGroup>
4450
<ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
4551
<PackageReference Include="System.Threading.Tasks.Extensions" Version="$(SystemThreadingTasksExtensionsVersion)" />
4652
</ItemGroup>
53+
4754
</Project>

src/libraries/Microsoft.Bcl.Cryptography/src/Microsoft.Bcl.Cryptography.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<Project Sdk="Microsoft.NET.Sdk">
2+
23
<PropertyGroup>
34
<TargetFrameworks>$(NetCoreAppCurrent);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
45
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
@@ -11,6 +12,8 @@
1112

1213
Commonly Used Types:
1314
System.Security.Cryptography.SP800108HmacCounterKdf</PackageDescription>
15+
<!-- This library uses IsPartialFacadeAssembly for which the compiler doesn't produce any XML documentation. -->
16+
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
1417
</PropertyGroup>
1518

1619
<PropertyGroup>
@@ -72,4 +75,5 @@ System.Security.Cryptography.SP800108HmacCounterKdf</PackageDescription>
7275
<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'">
7376
<PackageReference Include="System.Memory" Version="$(SystemMemoryVersion)" />
7477
</ItemGroup>
78+
7579
</Project>

src/libraries/Microsoft.Bcl.TimeProvider/src/Microsoft.Bcl.TimeProvider.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
Commonly Used Types:
1313
System.TimeProvider
1414
System.ITimer</PackageDescription>
15+
<!-- This library uses IsPartialFacadeAssembly for which the compiler doesn't produce any XML documentation. -->
16+
<UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
1517
</PropertyGroup>
1618

1719
<PropertyGroup>

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheEntryExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77

88
namespace Microsoft.Extensions.Caching.Memory
99
{
10+
/// <summary>
11+
/// Provide extensions methods for <see cref="ICacheEntry"/> operations.
12+
/// </summary>
1013
public static class CacheEntryExtensions
1114
{
1215
/// <summary>

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/CacheItemPriority.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,24 @@ namespace Microsoft.Extensions.Caching.Memory
99
/// </summary>
1010
public enum CacheItemPriority
1111
{
12+
/// <summary>
13+
/// The cache entry should be removed as soon as possible during memory pressure triggered cleanup.
14+
/// </summary>
1215
Low,
16+
17+
/// <summary>
18+
/// The cache entry should be removed if there is no other low priority cache entries during memory pressure triggered cleanup.
19+
/// </summary>
1320
Normal,
21+
22+
/// <summary>
23+
/// The cache entry should be removed only when there is no other low or normal priority cache entries during memory pressure triggered cleanup.
24+
/// </summary>
1425
High,
26+
27+
/// <summary>
28+
/// The cache entry should never be removed during memory pressure triggered cleanup.
29+
/// </summary>
1530
NeverRemove,
1631
}
1732
}

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/DistributedCacheEntryExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55

66
namespace Microsoft.Extensions.Caching.Distributed
77
{
8+
/// <summary>
9+
/// Extension methods for <see cref="DistributedCacheEntryOptions"/> operations.
10+
/// </summary>
811
public static class DistributedCacheEntryExtensions
912
{
1013
/// <summary>

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/EvictionReason.cs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,38 @@
33

44
namespace Microsoft.Extensions.Caching.Memory
55
{
6+
/// <summary>
7+
/// Specify the reasons why an entry was evicted from the cache.
8+
/// </summary>
69
public enum EvictionReason
710
{
11+
/// <summary>
12+
/// The item was not removed from the cache.
13+
/// </summary>
814
None,
915

1016
/// <summary>
11-
/// Manually
17+
/// The item was removed from the cache manually.
1218
/// </summary>
1319
Removed,
1420

1521
/// <summary>
16-
/// Overwritten
22+
/// The item was removed from the cache because it was overwritten.
1723
/// </summary>
1824
Replaced,
1925

2026
/// <summary>
21-
/// Timed out
27+
/// The item was removed from the cache because it timed out.
2228
/// </summary>
2329
Expired,
2430

2531
/// <summary>
26-
/// Event
32+
/// The item was removed from the cache because its token expired.
2733
/// </summary>
2834
TokenExpired,
2935

3036
/// <summary>
31-
/// Overflow
37+
/// The item was removed from the cache because it exceeded its capacity.
3238
/// </summary>
3339
Capacity,
3440
}

src/libraries/Microsoft.Extensions.Caching.Abstractions/src/MemoryCacheEntryExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
namespace Microsoft.Extensions.Caching.Memory
88
{
9+
/// <summary>
10+
/// Provide extensions methods for <see cref="MemoryCacheEntryOptions"/> operations.
11+
/// </summary>
912
public static class MemoryCacheEntryExtensions
1013
{
1114
/// <summary>

0 commit comments

Comments
 (0)