Azure / Azure/azure-functions-dotnet-worker

Engineering: Introduce shared project with language shims

Open
#1,737 0 comments 0 reactions 1 assignee Claimed by @jviau View on GitHub
area: engineering team-issue
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

Part of #1655

Using the `SharedReference.targets` system we have in place, we will introduce a shared projects which contains the following:

## 1. Common

This common shared project depends only on the BCL, no nuget dependencies.

1. CSharp language compat shims, giving us access to `init`, record types, nullable attributes, and other language extensions (ie: `KeyValuePair` deconstructor) not available in netstandard2.0 or netfx.
2. Argument validation and other exception helpers: [ThrowHelper](https://github.com/dotnet/runtime/blob/main/src/libraries/Common/src/System/ThrowHelper.cs)
- `ArgumentNullException.ThrowIfNull` and other helpers are not available until latter languages.
- We will recreate these helpers (but in a different static class) for use in lower languages.

## 2. Specialized

We will introduce shared projects that rely on nuget dependencies as appropriate. An example is a `Channels` shared project, which relies on `System.Threading.Channels` and introduces the `ReadAllAsync` extension method to `NETSTANDARD2_0`

These will be introduced over time as necessary.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.