NetFabric.CodeAnalysis
4.2.1
Prefix Reserved
See the version list below for details.
dotnet add package NetFabric.CodeAnalysis --version 4.2.1
NuGet\Install-Package NetFabric.CodeAnalysis -Version 4.2.1
<PackageReference Include="NetFabric.CodeAnalysis" Version="4.2.1" />
<PackageVersion Include="NetFabric.CodeAnalysis" Version="4.2.1" />
<PackageReference Include="NetFabric.CodeAnalysis" />
paket add NetFabric.CodeAnalysis --version 4.2.1
#r "nuget: NetFabric.CodeAnalysis, 4.2.1"
#:package NetFabric.CodeAnalysis@4.2.1
#addin nuget:?package=NetFabric.CodeAnalysis&version=4.2.1
#tool nuget:?package=NetFabric.CodeAnalysis&version=4.2.1
NetFabric.CodeAnalysis
This package extends the API provided by Roslyn. It can be used in the development of Roslyn Analyzers and Source Generators.
IsEnumerable() and IsAsyncEnumerable()
To find if a type is enumerable, it's not enough to check if it implements IEnumerable, IEnumerable<>, or IAsyncEnumerable<>. foreach and await foreach support several other cases. Use the methods IsEnumerable and IsAsyncEnumerable instead:
using NetFabric.CodeAnalysis;
var isEnumerable = typeSymbol.IsEnumerable(compilation, out var enumerableSymbols, out var errors);
var isAsyncEnumerable = typeSymbol.IsAsyncEnumerable(compilation, out var asyncEnumerableSymbols, out var errors);
The methods return a boolean value indicating if it's an enumerable or enumerator accepted by foreach. It supports the cases where GetEnumerator() or GetAsyncEnumerator() are provided as extension methods.
If true, the first output parameter contains IMethodSymbol for the method GetEnumerator/GetAsynEnumerator of the enumerable, the property Current and the method MoveNext/MoveNextAsync of the enumerator, following the precedences used by Roslyn for the foreach and await foreach keywords. It may also contain for methods Reset and Dispose/DisposeAsync if defined.
If false, the second output parameter indicates what error was found. It can be a missing GetEnumerator(), missing Current, or missing MoveNext().
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 is compatible. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETFramework 4.7.2
- Microsoft.CodeAnalysis.Common (>= 3.3.1)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 3.3.1)
-
.NETStandard 2.0
- Microsoft.CodeAnalysis.Common (>= 3.3.1)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 3.3.1)
-
net6.0
- Microsoft.CodeAnalysis.Common (>= 3.3.1)
- Microsoft.CodeAnalysis.CSharp.Workspaces (>= 3.3.1)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on NetFabric.CodeAnalysis:
| Package | Downloads |
|---|---|
|
Symtech.M5
The core classes of the M5 system. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated | |
|---|---|---|---|
| 5.1.0 | 473 | 10/11/2023 | |
| 5.0.0 | 198 | 10/10/2023 | |
| 4.2.2 | 292 | 9/16/2023 | |
| 4.2.1 | 185 | 9/16/2023 | |
| 4.2.0 | 253 | 9/7/2023 | |
| 4.1.0 | 838 | 7/14/2023 | |
| 4.0.2 | 49,298 | 7/10/2021 | |
| 4.0.1 | 2,542 | 4/15/2021 | |
| 4.0.0 | 598 | 4/14/2021 | |
| 3.1.1 | 470 | 3/31/2021 | |
| 3.1.0 | 473 | 3/26/2021 | |
| 3.0.0 | 4,071 | 5/1/2020 | |
| 2.0.1 | 663 | 4/29/2020 | |
| 2.0.0 | 2,284 | 12/11/2019 | |
| 1.1.0 | 598 | 12/7/2019 | |
| 1.0.0 | 626 | 12/5/2019 |
Various small fixes