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

[release/8.0] Add package readmes #92224

Merged
merged 60 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
a185c2a
Adding PACKAGE.md to System.Runtime.Caching package (#90701)
HongGit Aug 21, 2023
7dc1f6f
Update Package readme guidelines with new template (#90842)
MSDN-WhiteKnight Aug 21, 2023
5b4148d
Add package readmes
ViktorHofer Aug 28, 2023
66d7614
System.Diagnostics.EventLog
carlossanlop Sep 1, 2023
3b1268d
System.Diagnostics.PerformanceCounter
carlossanlop Sep 1, 2023
5cc655d
Add package readme for System.Speech
ericstj Sep 5, 2023
a8b30f8
Fill Microsoft.Extensions.Logging.Abstraction doc
tarekgh Sep 5, 2023
de6fd76
Fill Microsoft.Extensions.Logging doc
tarekgh Sep 5, 2023
0c4d908
Fill Microsoft.Extensions.Logging.Console doc
tarekgh Sep 5, 2023
9e084be
Fill Microsoft.Extensions.Logging.Debug doc
tarekgh Sep 5, 2023
030a4db
Add Microsoft.Bcl.Async package.md details
stephentoub Sep 5, 2023
00c8406
Add System.Threading.Channels package.md details
stephentoub Sep 5, 2023
9c0253d
Fill Microsoft.Extensions.Primitives doc
tarekgh Sep 5, 2023
685a213
Remove trailing spaces from Speech doc file
tarekgh Sep 5, 2023
57f6eed
Fill Microsoft.Extensions.Options doc
tarekgh Sep 5, 2023
e6202a7
Fill System.Text.Encoding.CodePages doc
tarekgh Sep 6, 2023
795122a
Add System.IO.Ports
krwq Sep 6, 2023
225186a
Add System.Net.Http.Json README
eiriktsarpalis Sep 6, 2023
0597c37
Readme for WinHttpHandler
antonfirsov Sep 6, 2023
f17e381
Fill Microsoft.Extensions.Options.ConfigurationExtensions doc
tarekgh Sep 6, 2023
c5653f7
Update Microsoft.Extensions.Http
CarnaViire Sep 6, 2023
dd2fa09
Fill Microsoft.Bcl.TimeProvider doc
tarekgh Sep 6, 2023
8856a04
Add Microsoft.Extensions.Caching.Memory package.md details
jozkee Sep 7, 2023
8f4b862
Add Microsoft.Extensions.DependencyInjection
steveharter Sep 7, 2023
124d40a
Add Microsoft.Extensions.DependencyInjections.Abstractions
steveharter Sep 7, 2023
a1ddb5e
Add Microsoft.Extensions.Hosting
steveharter Sep 7, 2023
eb7a5a7
Add Microsoft.Extensions.Hosting.WindowsServices
steveharter Sep 7, 2023
e343d81
Update PACKAGE.md for System.DirectoryServices
buyaa-n Sep 7, 2023
d7ad871
Apply suggestions from code review
buyaa-n Sep 7, 2023
7dd0d99
Update System.DirectoryServices.AccountManagement PACKAGE.md
buyaa-n Sep 7, 2023
bcb7661
Remove extra space
buyaa-n Sep 7, 2023
4d0f59e
space
danmoseley Sep 7, 2023
57a8f86
Add Microsoft.Extensions.Hosting.Abstractions
steveharter Sep 8, 2023
ebf742e
Update PACKAGE.md
steveharter Sep 8, 2023
43344fb
Update PACKAGE.md
steveharter Sep 8, 2023
56c8b14
Update Hosting
steveharter Sep 8, 2023
505ac80
Update Hosting
steveharter Sep 8, 2023
86b9aa5
Remove unnecessary brackets
buyaa-n Sep 8, 2023
ae6f006
add oledb and odbc
danmoseley Sep 8, 2023
0f8464c
tweak
danmoseley Sep 8, 2023
9bf79ce
Update src/libraries/System.Speech/src/PACKAGE.md
danmoseley Sep 8, 2023
066cade
Update src/libraries/Microsoft.Extensions.Http/src/PACKAGE.md
danmoseley Sep 8, 2023
f5e2b25
Update src/libraries/System.Speech/src/PACKAGE.md
danmoseley Sep 8, 2023
646b0f0
Apply suggestions from code review
danmoseley Sep 8, 2023
f107d05
Apply suggestions for System.Diagnostics.EventLog & PerformanceCounter
carlossanlop Sep 11, 2023
eca1ff8
added Bcl.Numerics
michaelgsharp Sep 13, 2023
5827567
Fill template for Microsoft.Extensions.Configuration & Abstractions
ericstj Sep 16, 2023
cf124a1
Add Microsoft.Extensions.Configuration.Binder readme.
ericstj Sep 16, 2023
3eba320
Remove undocumented P2 package readmes
ViktorHofer Sep 18, 2023
600a331
Update Feedback library name markdown style
ViktorHofer Sep 18, 2023
e819ea8
Remove en-US culture from links
ViktorHofer Sep 18, 2023
8890301
Replace important markdown tag with bold
ViktorHofer Sep 18, 2023
0b106c5
MathF PR feedback
ViktorHofer Sep 18, 2023
2cf3faf
Add System.Management packag readme
ViktorHofer Sep 18, 2023
dc9c012
Fix trailing whitespace
ViktorHofer Sep 18, 2023
c59bf65
Add ServiceController package readme
ViktorHofer Sep 18, 2023
21727ce
Clean-up
ViktorHofer Sep 18, 2023
ed430fc
More clean-up
ViktorHofer Sep 18, 2023
934eeea
ConfigurationManager clean-up
ViktorHofer Sep 18, 2023
f4d9074
Last clean-up
ViktorHofer Sep 18, 2023
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
42 changes: 39 additions & 3 deletions docs/coding-guidelines/libraries-packaging.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,47 @@ Packages can include a Markdown Readme file with a short usage documentation. To
The package Readme is displayed on the package details page on [NuGet gallery](https://nuget.org/). You can include the following content in it:

- A description of the package purpose.
- A list of package key features
- A code example that demostrates how to use the package.
- Information when package should be used. For example, if the library is included in the shared framework in .NET, but needs to be installed via NuGet on .NET Framework, it should be mentioned.
- Information on how to get started with the package.
- Links to related documentation.
- A list of common entry-point types for the package, with links to their API docs under [.NET API Browser](https://learn.microsoft.com/dotnet/api/).
- A short code example that demostrates the package usage.
- Links to related documentation.
- Information about how to provide feedback on the package and contribute to it.

Use the following Markdown template for a package Readme:

```
## About

<!-- A description of the package and where one can find more documentation -->

## Key Features

<!-- The key features of this package -->

## How to Use

<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

## Main Types

<!-- The main types provided in this library -->

## Additional Documentation

* [Conceptual documentation](...)
* [API documentation](...)

## Related Packages

<!-- The related packages associated with this package -->

## Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

ExamplePackage is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
```

For a list of supported Markdown features, see [NuGet documentation](https://learn.microsoft.com/nuget/nuget-org/package-readme-on-nuget-org#supported-markdown-features).

Expand Down
64 changes: 64 additions & 0 deletions src/libraries/Microsoft.Bcl.AsyncInterfaces/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
## About

As of C# 8, the C# language has support for producing and consuming asynchronous iterators. The library types in support of those features are available in .NET Core 3.0 and newer as well as in .NET Standard 2.1. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.

## Key Features

<!-- The key features of this package -->

* Enables the use of C# async iterators on older .NET platforms

## How to Use

<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

```C#
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

internal static class Program
{
private static async Task Main()
{
Console.WriteLine("Starting...");
await foreach (var value in GetValuesAsync())
{
Console.WriteLine(value);
}
Console.WriteLine("Finished!");

static async IAsyncEnumerable<int> GetValuesAsync()
{
for (int i = 0; i < 10; i++)
{
await Task.Delay(TimeSpan.FromSeconds(1));
yield return i;
}
}
}
}
```

## Main Types

<!-- The main types provided in this library -->

The main types provided by this library are:

* `IAsyncEnumerable<T>`
* `IAsyncEnumerator<T>`
* `IAsyncDisposable<T>`

## Additional Documentation

<!-- Links to further documentation. Remove conceptual documentation if not available for the library. -->

* [C# Feature Specification](https://learn.microsoft.com/dotnet/csharp/language-reference/proposals/csharp-8.0/async-streams)
* [Walkthrough article](https://learn.microsoft.com/archive/msdn-magazine/2019/november/csharp-iterating-with-async-enumerables-in-csharp-8)

## Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

Microsoft.Bcl.AsyncInterfaces is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
45 changes: 45 additions & 0 deletions src/libraries/Microsoft.Bcl.Numerics/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
## About

As of .NET Core 2.0 and .NET Standard 2.1, the C# language has support for math (System.MathF) functions with floats. This library provides the necessary definitions of those types to support these language features on .NET Framework and on .NET Standard 2.0. This library is not necessary nor recommended when targeting versions of .NET that include the relevant support.

## Key Features

<!-- The key features of this package -->

* Enables the use of MathF on older .NET platforms

## How to Use

<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

```C#
using System;

internal static class Program
{
private static async Task Main()
{
Console.WriteLine(MathF.Max(1f, 5f)); // returns 5f
}
}
```

## Main Types

<!-- The main types provided in this library -->

The main types provided by this library are:

* `System.MathF`

## Additional Documentation

<!-- Links to further documentation. Remove conceptual documentation if not available for the library. -->

* [API documentation](https://learn.microsoft.com/dotnet/api/system.mathf)

## Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

Microsoft.Bcl.Numerics is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
57 changes: 57 additions & 0 deletions src/libraries/Microsoft.Bcl.TimeProvider/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
## About

Microsoft.Bcl.TimeProvider provides time abstraction support for apps targeting .NET 7 and earlier, as well as those intended for the .NET Framework. For apps targeting .NET 8 and newer versions, referencing this package is unnecessary, as the types it contains are already included in the .NET 8 and higher platform versions.

## Key Features

* Provides a common abstraction for time-related operations.

## How to Use

```csharp
using System;

// A class that uses TimeProvider to get the current time in Utc coordinates
public class UtcClock
{
private readonly TimeProvider _timeProvider;

// Constructor that takes a TimeProvider as a dependency
public Clock(TimeProvider timeProvider)
{
_timeProvider = timeProvider;
}

// A method that returns the current time as a string
public string GetTime()
{
return _timeProvider.GetLocalNow().ToString("HH:mm:ss");
}
}

// A class that inherits from TimeProvider and overrides the GetLocalNow method
public class UtcTimeProvider : TimeProvider
{
// Override the GetLocalNow method to always return UTC time
public override DateTimeOffset GetLocalNow()
{
return TimeProvider.System.GetUtcNow();
}
}

```

## Main Types

The main types provided by this library are:

* `TimeProvider`
* `TimeProviderTaskExtensions`

## Additional Documentation

* [API documentation](https://learn.microsoft.com/dotnet/api/system.timeprovider)

## Feedback & Contributing

Microsoft.Bcl.TimeProvider is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
89 changes: 89 additions & 0 deletions src/libraries/Microsoft.Extensions.Caching.Memory/src/PACKAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
## About

<!-- A description of the package and where one can find more documentation -->

Provides implementations for local and distributed in-memory cache. It stores and retrieves data in a fast and efficient way.

## Key Features

<!-- The key features of this package -->

* A concrete implementation of the IMemoryCache interface, which represents a local in-memory cache that stores and retrieves data in a fast and efficient way
* A distributed cache that supports higher scale-out than local cache
* Expiration and eviction policies for its entries
* Entry prioritization for when the cache size limit is exceeded and needs to be compacted by entry eviction
* Track of cache statictics

## How to Use

<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

Use Microsoft.Extensions.Caching.Memory over System.Runtime.Caching when working with ASP.NET Core as it provides better integration support. For example, IMemoryCache works natively with ASP.NET Core dependency injection.

Local in-memory serialization:
```csharp
using Microsoft.Extensions.Caching.Memory;

using MemoryCache cache = new(new MemoryCacheOptions());

object valueToCache = new();
string key = "key";

using (ICacheEntry entry = cache.CreateEntry(key))
{
// Entries are committed after they are disposed therefore it does not exist yet.
Console.WriteLine($"Exists: {cache.TryGetValue(key, out _)}\n");

entry.Value = valueToCache;
entry.SlidingExpiration = TimeSpan.FromSeconds(2);
}

bool exists = cache.TryGetValue(key, out object? cachedValue);
Console.WriteLine($"Exists: {exists}" );
Console.WriteLine($"cachedValue is valueToCache? {object.ReferenceEquals(cachedValue, valueToCache)}\n");

Console.WriteLine("Wait for the sliding expiration...");
Thread.Sleep(TimeSpan.FromSeconds(2));

Console.WriteLine("Exists: " + cache.TryGetValue(key, out _));

// You can also use the acceleration extensions to set and get entries
string key2 = "key2";
object value2 = new();

cache.Set("key2", value2);

object? cachedValue2 = cache.Get(key2);
Console.WriteLine($"cachedValue2 is value2? {object.ReferenceEquals(cachedValue2, value2)}");
```

## Main Types

<!-- The main types provided in this library -->

The main types provided by this library are:

* `Microsoft.Extensions.Caching.Memory.MemoryCache`
* `Microsoft.Extensions.Caching.Memory.MemoryCacheOptions`
* `Microsoft.Extensions.Caching.Distributed.MemoryDistributedCache`
* `Microsoft.Extensions.Caching.Memory.MemoryDistributedCacheOptions`

## Additional Documentation

<!-- Links to further documentation. Remove conceptual documentation if not available for the library. -->

* [Conceptual documentation](https://learn.microsoft.com/dotnet/core/extensions/caching)
* [Cache in-memory in ASP.NET Core](https://learn.microsoft.com/aspnet/core/performance/caching/memory)
* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.caching.memory)

## Related Packages

<!-- The related packages associated with this package -->

[Microsoft.Extensions.Caching.Abstractions](https://www.nuget.org/packages/Microsoft.Extensions.Caching.Abstractions)

## Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

Microsoft.Extensions.Caching.Memory is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
## About

<!-- A description of the package and where one can find more documentation -->

Provides abstractions of key-value pair based configuration. Interfaces defined in this package are implemented by classes in [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration/) and other configuration packages.

Commonly used types:
## Key Features

<!-- The key features of this package -->

- [Microsoft.Extensions.Configuration.IConfiguration](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfiguration)
- [Microsoft.Extensions.Configuration.IConfigurationBuilder](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationbuilder)
- [Microsoft.Extensions.Configuration.IConfigurationProvider](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationprovider)
- [Microsoft.Extensions.Configuration.IConfigurationRoot](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationroot)
- [Microsoft.Extensions.Configuration.IConfigurationSection](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration.iconfigurationsection)
* Abstractions for string key-value pair configuration sources and sections
* Path conventions of keys establishing a heirachy of values
* Support for multiple configuration sources, aggregating and defining precdence for values
* Support for reload on change

For more information, see the documentation: [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration).
## How to Use

## Example
<!-- A compelling example on how to use this package with code, as well as any specific guidelines for when to use the package -->

The example below shows a small code sample using this library and trying out the `ConfigurationKeyName` attribute available since .NET 6:

Expand All @@ -39,3 +42,41 @@ var config = new ConfigurationBuilder()
var options = config.Get<MyClass>();
Console.WriteLine(options.NamedProperty); // returns "value for named property"
```

## Main Types

<!-- The main types provided in this library -->

The main types provided by this library are:

* `Microsoft.Extensions.Configuration.IConfiguration`
* `Microsoft.Extensions.Configuration.IConfigurationBuilder`
* `Microsoft.Extensions.Configuration.IConfigurationProvider`
* `Microsoft.Extensions.Configuration.IConfigurationRoot`
* `Microsoft.Extensions.Configuration.IConfigurationSection`

## Additional Documentation

<!-- Links to further documentation -->

* [Configuration in .NET](https://learn.microsoft.com/dotnet/core/extensions/configuration)
* [API documentation](https://learn.microsoft.com/dotnet/api/microsoft.extensions.configuration)

## Related Packages

<!-- The related packages associated with this package -->
* [Microsoft.Extensions.Configuration](https://www.nuget.org/packages/Microsoft.Extensions.Configuration)
* [Microsoft.Extensions.Configuration.Binder](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Binder)
* [Microsoft.Extensions.Configuration.CommandLine](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.CommandLine)
* [Microsoft.Extensions.Configuration.EnvironmentVariables](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.EnvironmentVariables)
* [Microsoft.Extensions.Configuration.FileExtensions](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.FileExtensions)
* [Microsoft.Extensions.Configuration.Ini](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Ini)
* [Microsoft.Extensions.Configuration.Json](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Json)
* [Microsoft.Extensions.Configuration.UserSecrets](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.UserSecrets)
* [Microsoft.Extensions.Configuration.Xml](https://www.nuget.org/packages/Microsoft.Extensions.Configuration.Xml)

## Feedback & Contributing

<!-- How to provide feedback on this package and contribute to it -->

Microsoft.Extensions.Caching.Abstractions is released as open source under the [MIT license](https://licenses.nuget.org/MIT). Bug reports and contributions are welcome at [the GitHub repository](https://github.com/dotnet/runtime).
Loading
Loading