https://github.com/netfabric/netfabric
Defines .NET classes and structs common to other NetFabric projects
https://github.com/netfabric/netfabric
csharp dotnet
Last synced: about 1 month ago
JSON representation
Defines .NET classes and structs common to other NetFabric projects
- Host: GitHub
- URL: https://github.com/netfabric/netfabric
- Owner: NetFabric
- License: mit
- Created: 2023-05-26T06:26:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-04T22:14:02.000Z (over 2 years ago)
- Last Synced: 2025-10-13T23:35:01.424Z (9 months ago)
- Topics: csharp, dotnet
- Language: C#
- Homepage: https://netfabric.github.io/NetFabric/
- Size: 5.36 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# NetFabric
Defines classes and structs common to other NetFabric projects.
## Throw
Defines a set of static methods to throw exceptions.
Methods that throw exceptions cannot be inlined by the JIT compiler. Only if thrown within a called method.
Using the methods in this class allows exceptions to be thrown and still let the method be a candidate to be inlined.
```csharp
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ReadOnlyListWrapper AsReadOnlyList(T[] source)
=> source switch
{
null => Throw.ArgumentNullException>(nameof(source)),
_ => new ReadOnlyListWrapper(source)
};
```
## Credits
The following open-source projects are used to build and test this project:
- [.NET](https://github.com/dotnet)
- [BenchmarkDotNet](https://github.com/dotnet/BenchmarkDotNet)
- [coverlet](https://github.com/coverlet-coverage/coverlet)
- [NetFabric.Assertive](https://github.com/NetFabric/NetFabric.Assertive)
- [NetFabric.Hyperlinq.Analyzer](https://github.com/NetFabric/NetFabric.Hyperlinq.Analyzer)
- [xUnit](https://github.com/xunit/xunit)
## License
This project is licensed under the MIT license. See the [LICENSE](LICENSE) file for more info.