Skip to content

Commit bc8bafa

Browse files
Port documentation for .NET 7.0 Preview3 (#8004)
* Microsoft.Extensions.Hosting * System (Numerics) * System.CommandLine * System.CommandLine.Binding * System.CommandLine.Help * System.CommandLine.IO * System.CommandLine.Parsing * System.Composition.Hosting * System.Data.Common * System.Diagnostics * System.Runtime.CompilerServices * System.Runtime.InteropServices * System.Security.Cryptography.X509Certificates * System.Text.RegularExpressions * System.Threading.Tasks * System.Web.DynamicData * Fix code example * Address Host.xml comments * Fix HostApplicationBuilder table * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> * Apply suggestions from code review Co-authored-by: Genevieve Warren <[email protected]> Co-authored-by: carlossanlop <[email protected]> Co-authored-by: Genevieve Warren <[email protected]>
1 parent bc25f26 commit bc8bafa

File tree

34 files changed

+955
-560
lines changed

34 files changed

+955
-560
lines changed

xml/Microsoft.Extensions.Hosting/Host.xml

Lines changed: 60 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
</Base>
1919
<Interfaces />
2020
<Docs>
21-
<summary>Provides convenience methods for creating instances of <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder" /> with pre-configured defaults.</summary>
21+
<summary>Provides convenience methods for creating instances of <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder" /> with preconfigured defaults.</summary>
2222
<remarks>To be added.</remarks>
2323
</Docs>
2424
<Members>
@@ -39,9 +39,21 @@
3939
</ReturnValue>
4040
<Parameters />
4141
<Docs>
42-
<summary>To be added.</summary>
43-
<returns>To be added.</returns>
44-
<remarks>To be added.</remarks>
42+
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostApplicationBuilder" /> class with preconfigured defaults.</summary>
43+
<returns>A new <see cref="T:Microsoft.Extensions.Hosting.HostApplicationBuilder" /> instance.</returns>
44+
<remarks>The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
45+
<list type="bullet">
46+
<item><description>Set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath"/> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory"/>.</description></item>
47+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from "DOTNET_" prefixed environment variables.</description></item>
48+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from supplied command line arguments.</description></item>
49+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/>].json'.</description></item>
50+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly.</description></item>
51+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from environment variables.</description></item>
52+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from supplied command line arguments.</description></item>
53+
<item><description>Configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> to log to the console, debug, and event source output.</description></item>
54+
<item><description>Enable scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/> is 'Development'.</description></item>
55+
</list>
56+
</remarks>
4557
</Docs>
4658
</Member>
4759
<Member MemberName="CreateApplicationBuilder">
@@ -63,10 +75,23 @@
6375
<Parameter Name="args" Type="System.String[]" Index="0" FrameworkAlternate="dotnet-plat-ext-7.0" />
6476
</Parameters>
6577
<Docs>
66-
<param name="args">To be added.</param>
67-
<summary>To be added.</summary>
68-
<returns>To be added.</returns>
69-
<remarks>To be added.</remarks>
78+
<param name="args">The command line arguments.</param>
79+
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostApplicationBuilder" /> class with preconfigured defaults.</summary>
80+
<returns>A new <see cref="T:Microsoft.Extensions.Hosting.HostApplicationBuilder" /> instance.</returns>
81+
<remarks>
82+
The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
83+
<list type="bullet">
84+
<item><description>Set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath"/> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory"/>.</description></item>
85+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from "DOTNET_" prefixed environment variables.</description></item>
86+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from supplied command line arguments.</description></item>
87+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/>].json'.</description></item>
88+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/> is 'Development' using the entry assembly.</description></item>
89+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from environment variables.</description></item>
90+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration"/> from supplied command line arguments.</description></item>
91+
<item><description>Configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory"/> to log to the console, debug, and event source output.</description></item>
92+
<item><description>Enable scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName"/> is 'Development'.</description></item>
93+
</list>
94+
</remarks>
7095
</Docs>
7196
</Member>
7297
<Member MemberName="CreateDefaultBuilder">
@@ -90,11 +115,19 @@
90115
</ReturnValue>
91116
<Parameters />
92117
<Docs>
93-
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" /> class with pre-configured defaults.</summary>
118+
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" /> class with preconfigured defaults.</summary>
94119
<returns>The initialized <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder" />.</returns>
95-
<remarks>
96-
The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
97-
<list type="bullet"><item><description>set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath" /> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory" /></description></item><item><description>load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from "DOTNET_" prefixed environment variables</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" />].json'</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development' using the entry assembly</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from environment variables</description></item><item><description>configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" /> to log to the console, debug, and event source output</description></item><item><description>enables scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development'</description></item></list></remarks>
120+
<remarks>The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
121+
<list type="bullet">
122+
<item><description>Set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath" /> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</description></item>
123+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from "DOTNET_" prefixed environment variables.</description></item>
124+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" />].json'.</description></item>
125+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development' using the entry assembly.</description></item>
126+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from environment variables.</description></item>
127+
<item><description>Configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" /> to log to the console, debug, and event source output.</description></item>
128+
<item><description>Enable scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development'.</description></item>
129+
</list>
130+
</remarks>
98131
</Docs>
99132
</Member>
100133
<Member MemberName="CreateDefaultBuilder">
@@ -120,12 +153,22 @@
120153
<Parameter Name="args" Type="System.String[]" />
121154
</Parameters>
122155
<Docs>
123-
<param name="args">The command line args.</param>
124-
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" /> class with pre-configured defaults.</summary>
156+
<param name="args">The command line arguments.</param>
157+
<summary>Initializes a new instance of the <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" /> class with preconfigured defaults.</summary>
125158
<returns>The initialized <see cref="T:Microsoft.Extensions.Hosting.IHostBuilder" />.</returns>
126-
<remarks>
127-
The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
128-
<list type="bullet"><item><description>set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath" /> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory" /></description></item><item><description>load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from "DOTNET_" prefixed environment variables</description></item><item><description>load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from supplied command line args</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" />].json'</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development' using the entry assembly</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from environment variables</description></item><item><description>load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from supplied command line args</description></item><item><description>configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" /> to log to the console, debug, and event source output</description></item><item><description>enables scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development'</description></item></list></remarks>
159+
<remarks>The following defaults are applied to the returned <see cref="T:Microsoft.Extensions.Hosting.HostBuilder" />:
160+
<list type="bullet">
161+
<item><description>Set the <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.ContentRootPath" /> to the result of <see cref="M:System.IO.Directory.GetCurrentDirectory" />.</description></item>
162+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from "DOTNET_" prefixed environment variables.</description></item>
163+
<item><description>Load host <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from supplied command line arguments.</description></item>
164+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from 'appsettings.json' and 'appsettings.[<see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" />].json'.</description></item>
165+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from User Secrets when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development' using the entry assembly.</description></item>
166+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from environment variables.</description></item>
167+
<item><description>Load app <see cref="T:Microsoft.Extensions.Configuration.IConfiguration" /> from supplied command line arguments.</description></item>
168+
<item><description>Configure the <see cref="T:Microsoft.Extensions.Logging.ILoggerFactory" /> to log to the console, debug, and event source output.</description></item>
169+
<item><description>Enable scope validation on the dependency injection container when <see cref="P:Microsoft.Extensions.Hosting.IHostEnvironment.EnvironmentName" /> is 'Development'.</description></item>
170+
</list>
171+
</remarks>
129172
</Docs>
130173
</Member>
131174
</Members>

0 commit comments

Comments
 (0)