Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More doc fix-ups #4173

Merged
merged 1 commit into from
Jul 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ public class FakeRedactorOptions
/// <summary>
/// Gets or sets a value indicating how to format redacted data.
/// </summary>
/// <value>The default is "{0}".</value>
/// <remarks>
/// This is a composite format string that determines how redacted data looks like.
/// Defaults to {0}.
/// This is a composite format string that determines how redacted data looks.
/// </remarks>
[Required]
[StringSyntax(StringSyntaxAttribute.CompositeFormat)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static IHealthChecksBuilder AddApplicationLifecycleHealthCheck(this IHeal
/// <param name="builder">The builder to add the provider to.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddApplicationLifecycleHealthCheck(this IHealthChecksBuilder builder, IEnumerable<string> tags)
=> Throw.IfNull(builder)
.AddCheck<ApplicationLifecycleHealthCheck>("ApplicationLifecycle", tags: Throw.IfNull(tags));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static partial class CommonHealthChecksExtensions
/// <param name="builder">The builder to add the provider to.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddManualHealthCheck(this IHealthChecksBuilder builder, params string[] tags)
=> Throw.IfNull(builder)
.AddManualHealthCheckDependencies()
Expand All @@ -28,7 +28,7 @@ public static IHealthChecksBuilder AddManualHealthCheck(this IHealthChecksBuilde
/// <param name="builder">The builder to add the provider to.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="tags"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddManualHealthCheck(this IHealthChecksBuilder builder, IEnumerable<string> tags)
=> Throw.IfNull(builder)
.AddManualHealthCheckDependencies()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC
/// <param name="services">The dependency injection container to add the publisher to.</param>
/// <param name="section">Configuration for <see cref="TelemetryHealthCheckPublisherOptions"/>.</param>
/// <returns>The value of <paramref name="services"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="section"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="section"/> is <see langword="null" />.</exception>
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, IConfigurationSection section)
=> Throw.IfNull(services)
Expand All @@ -43,7 +43,7 @@ public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceC
/// <param name="services">The dependency injection container to add the publisher to.</param>
/// <param name="configure">Configuration for <see cref="TelemetryHealthCheckPublisherOptions"/>.</param>
/// <returns>The value of <paramref name="services"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="configure"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="services" /> or <paramref name="configure"/> is <see langword="null" />.</exception>
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
public static IServiceCollection AddTelemetryHealthCheckPublisher(this IServiceCollection services, Action<TelemetryHealthCheckPublisherOptions> configure)
=> Throw.IfNull(services)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(this IHealt
/// <param name="builder">The builder to add the provider to.</param>
/// <param name="section">Configuration for <see cref="ResourceUtilizationHealthCheckOptions"/>.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="section"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="section"/> is <see langword="null" />.</exception>
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, typeof(ResourceUtilizationHealthCheckOptions))]
[UnconditionalSuppressMessage(
"Trimming",
Expand All @@ -80,7 +80,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
/// <param name="section">Configuration section holding an instance of <see cref="ResourceUtilizationHealthCheckOptions"/>.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="section"/> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="section"/> or <paramref name="tags"/> is <see langword="null" />.</exception>
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, typeof(ResourceUtilizationHealthCheckOptions))]
[UnconditionalSuppressMessage(
"Trimming",
Expand All @@ -106,7 +106,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
/// <param name="section">Configuration section holding an instance of <see cref="ResourceUtilizationHealthCheckOptions"/>.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="section"/> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="section"/> or <paramref name="tags"/> is <see langword="null" />.</exception>
[DynamicDependency(DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.PublicParameterlessConstructor, typeof(ResourceUtilizationHealthCheckOptions))]
[UnconditionalSuppressMessage(
"Trimming",
Expand All @@ -131,7 +131,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
/// <param name="builder">The builder to add the provider to.</param>
/// <param name="configure">Configuration callback.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="configure"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" /> or <paramref name="configure"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
this IHealthChecksBuilder builder,
Action<ResourceUtilizationHealthCheckOptions> configure)
Expand All @@ -150,7 +150,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
/// <param name="configure">Configuration callback.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="configure"/> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="configure"/> or <paramref name="tags"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
this IHealthChecksBuilder builder,
Action<ResourceUtilizationHealthCheckOptions> configure,
Expand All @@ -171,7 +171,7 @@ public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
/// <param name="configure">Configuration callback.</param>
/// <param name="tags">A list of tags that can be used to filter health checks.</param>
/// <returns>The value of <paramref name="builder"/>.</returns>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="configure"/> or <paramref name="tags"/> are <see langword="null" />.</exception>
/// <exception cref="ArgumentNullException"><paramref name="builder" />, <paramref name="configure"/> or <paramref name="tags"/> is <see langword="null" />.</exception>
public static IHealthChecksBuilder AddResourceUtilizationHealthCheck(
this IHealthChecksBuilder builder,
Action<ResourceUtilizationHealthCheckOptions> configure,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public EnumStringsAttribute()
/// </summary>
/// <param name="enumType">The type of the enum to work with.</param>
/// <remarks>
/// Use this overload when applying the attribute at the assembly-level when working with an enum declared in a
/// Use this overload when applying the attribute at the assembly level when working with an enum declared in a
/// different assembly.
/// </remarks>
/// <example>
Expand All @@ -52,34 +52,30 @@ public EnumStringsAttribute(Type enumType)
/// <summary>
/// Gets or sets the namespace of the generated class.
/// </summary>
/// <value>The default is <see langword="null" />.</value>
/// <remarks>
/// If this is <see langword="null"/>, then the class is generated in the same namespace as the enum.
/// Defaults to <see langword="null"/>.
/// If <see langword="null"/>, then the class is generated in the same namespace as the enum.
/// </remarks>
public string? ExtensionNamespace { get; set; }

/// <summary>
/// Gets or sets the name of the generated class.
/// </summary>
/// <value>The default is <see langword="null"/>.</value>
/// <remarks>
/// If this is <see langword="null"/>, then the class name is generated by appending <c>Extensions</c> to the enum type name.
/// Defaults to <see langword="null"/>.
/// If <see langword="null"/>, then the class name is generated by appending <c>Extensions</c> to the enum type name.
/// </remarks>
public string? ExtensionClassName { get; set; }

/// <summary>
/// Gets or sets the name of the generated extension method.
/// </summary>
/// <remarks>
/// Defaults to <c>ToInvariantString</c>.
/// </remarks>
/// <value>The default is <c>ToInvariantString</c>.</value>
public string ExtensionMethodName { get; set; } = "ToInvariantString";

/// <summary>
/// Gets or sets the modifiers to apply to the generated class.
/// </summary>
/// <remarks>
/// Defaults to <c>internal static</c>.
/// </remarks>
/// <value>The default is <c>internal static</c>.</value>
public string ExtensionClassModifiers { get; set; } = "internal static";
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,25 @@ namespace Microsoft.Extensions.Hosting.Testing;
public class FakeHostOptions
{
/// <summary>
/// Gets or sets time limit for host to start.
/// Gets or sets the time limit for the host to start.
/// </summary>
/// <remarks>Default is 5 seconds. This limit is used if no cancellation token is used by user.</remarks>
/// <value>The default value is 5 seconds.</value>
/// <remarks>This limit is used if there's no cancellation token.</remarks>
public TimeSpan StartUpTimeout { get; set; } = TimeSpan.FromSeconds(5);

/// <summary>
/// Gets or sets time limit for host to shut down.
/// Gets or sets the time limit for the host to shut down.
/// </summary>
/// <remarks>Default is 10 seconds. This limit is used if no cancellation token is used by user.</remarks>
/// <value>The default value is 10 seconds.</value>
/// <remarks>This limit is used if there's no cancellation token.</remarks>
public TimeSpan ShutDownTimeout { get; set; } = TimeSpan.FromSeconds(10);

/// <summary>
/// Gets or sets time limit for host to be up.
/// Gets or sets the time limit for the host to be up.
/// </summary>
/// <value>The default is 30 seconds.</value>
/// <remarks>
/// Default is 30 seconds.
/// Value -1 millisecond means infinite time to live.
/// -1 millisecond means infinite time to live.
/// TimeToLive is not enforced when debugging.
/// </remarks>
public TimeSpan TimeToLive { get; set; } = TimeSpan.FromSeconds(30);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public static IServiceCollection AddFaultInjection(this IServiceCollection servi
/// The <see cref="Context"/> so that additional calls can be chained.
/// </returns>
/// <exception cref="ArgumentNullException">
/// Any of the parameters are <see langword="null"/>.
/// Any argument is <see langword="null"/>.
/// </exception>
public static Context WithFaultInjection(this Context context, string groupName)
{
Expand All @@ -123,7 +123,7 @@ public static Context WithFaultInjection(this Context context, string groupName)
/// The <see cref="Context"/> so that additional calls can be chained.
/// </returns>
/// <exception cref="ArgumentNullException">
/// Any of the parameters are <see langword="null"/>.
/// Any argument is <see langword="null"/>.
/// </exception>
[Experimental(diagnosticId: "TBD", UrlFormat = WarningDefinitions.SharedUrlFormat)]
public static Context WithFaultInjection(this Context context, FaultPolicyWeightAssignmentsOptions weightAssignments)
Expand All @@ -146,7 +146,7 @@ public static Context WithFaultInjection(this Context context, FaultPolicyWeight
/// The <see cref="ChaosPolicyOptionsGroup"/> if registered; <see langword="null"/> if it isn't.
/// </returns>
/// <exception cref="ArgumentNullException">
/// Any of the parameters are <see langword="null"/>.
/// Any argument is <see langword="null"/>.
/// </exception>
public static string? GetFaultInjectionGroupName(this Context context)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ internal sealed class ExceptionRegistry : IExceptionRegistry
/// The <see cref="IOptionsMonitor{TOptions}"/> instance to retrieve <see cref="FaultInjectionExceptionOptions"/> from.
/// </param>
/// <exception cref="ArgumentNullException">
/// Any of the parameters are <see langword="null"/>.
/// Any argument is <see langword="null"/>.
/// </exception>
public ExceptionRegistry(IOptionsMonitor<FaultInjectionExceptionOptions> options)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal sealed class FaultInjectionOptionsProvider : IFaultInjectionOptionsProv
/// The options monitor instance to retrieve chaos policy related configurations from.
/// </param>
/// <exception cref="ArgumentNullException">
/// Any of the parameters are <see langword="null"/>.
/// Any argument is <see langword="null"/>.
/// </exception>
public FaultInjectionOptionsProvider(IOptionsMonitor<FaultInjectionOptions> optionsMonitor)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public RequestMetadata()
/// <remarks>
/// The <see cref="DependencyName"/> property is initialized to <c>"unknown"</c>.
/// </remarks>
/// <exception cref="ArgumentNullException">Any of the parameters are <see langword="null"/>.</exception>
/// <exception cref="ArgumentNullException">Any argument is <see langword="null"/>.</exception>
public RequestMetadata(string methodType, string requestRoute, string requestName = TelemetryConstants.Unknown)
{
MethodType = Throw.IfNull(methodType);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public void Clear()
/// <summary>
/// Gets the records that are held by the collector.
/// </summary>
/// <param name="clear">Setting this to <see langword="true"/> will atomically clear the set of accumulated log records.</param>
/// <param name="clear"><see langword="true" /> to atomically clear the set of accumulated log records; otherwise, <see langword="false" />.</param>
/// <returns>
/// The list of records tracked to date by the collector.
/// </returns>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,19 @@ namespace Microsoft.Extensions.Telemetry.Testing.Logging;
public class FakeLogCollectorOptions
{
/// <summary>
/// Gets or sets the logger categories for whom records are collected.
/// Gets or sets the logger categories for which records are collected.
/// </summary>
/// <value>The default is an empty set.</value>
/// <remarks>
/// Defaults to an empty set, which doesn't filter any records.
/// If not empty, only records coming from loggers in these categories will be collected by the fake logger.
/// </remarks>
public ISet<string> FilteredCategories { get; set; } = new HashSet<string>();

/// <summary>
/// Gets or sets the logging levels for whom records are collected.
/// Gets or sets the logging levels for which records are collected.
/// </summary>
/// <value>The default is an empty set.</value>
/// <remarks>
/// Defaults to an empty set, which doesn't filter any records.
/// If not empty, only records with the given level will be collected by the fake logger.
Expand All @@ -36,24 +38,23 @@ public class FakeLogCollectorOptions
/// Gets or sets a value indicating whether to collect records that are logged when the associated log level is currently disabled.
/// </summary>
/// <value>
/// Defaults to <see langword="true"/>.
/// <see langword="true" /> if records that are logged when the associated log level is
/// disabled are collected. The default is <see langword="true" />.
/// </value>
public bool CollectRecordsForDisabledLogLevels { get; set; } = true;

/// <summary>
/// Gets or sets the time provider to use when time-stamping log records.
/// </summary>
/// <remarks>
/// Defaults to <see cref="TimeProvider.System"/>.
/// </remarks>
/// <value>The default is <see cref="TimeProvider.System" />.</value>
public TimeProvider TimeProvider { get; set; } = TimeProvider.System;

/// <summary>
/// Gets or sets an output sink where every record harvested by the collector is sent.
/// </summary>
/// <value>The default is <see langword="null" />.</value>
/// <remarks>
/// By setting this property, you can have all log records harvested by the collector be copied somewhere convenient.
/// Defaults to <see langword="null"/>.
/// </remarks>
public Action<string>? OutputSink { get; set; }

Expand Down
Loading