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

Fix typos #81

Merged
merged 1 commit into from
Aug 15, 2024
Merged
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
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@
- Non-Public Constructor Support
- No Generic Constraints
- Compatible with .NET Standard 2.0
- Multiple backend implementations.
- Multiple backend implementations
- Heavily tested on Win/Mac/Linux

- 🪛 **Modern** Compiler Integration
- Source Generator v2 (Incremental Generator)
- Highly Configurable ([Props](https://github.com/Nyrest/FastGenericNew/wiki/SourceGenerator-Options))
- Multi-threaded Generation

- 🔥 **Lastest** C#/.NET Features Support
- 🔥 **Latest** C#/.NET Features Support
- [C# 8 Nullable](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/nullable-reference-types) Support
- [C# 10 Parameterless struct constructors](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-10.0/parameterless-struct-constructors) Support (Both invokes or not)
- WebAssembly Support
Expand Down Expand Up @@ -76,7 +76,7 @@ var obj2 = FastNew.CreateInstance<T, string>("text");
var obj3 = FastNew.CreateInstance<T, string, int>("text", 0);

// Try pattern
// NOTE: Try pattern will only check the constructor could be called (exist & callable)
// NOTE: The try pattern will only check if the constructor can be called.
// It will not catch or handle any exceptions thrown in the constructor.
if (FastNew.TryCreateInstance<T, string>("arg0", out T result));
{
Expand All @@ -90,8 +90,8 @@ if (FastNew.TryCreateInstance<T, string>("arg0", out T result));
> the constraint is `where T : new()` but appears to **ignore the parameterless constructor if the constraint is `where T : struct`**.
> **But `FastNew.CreateInstance<T>()` will always invoke the parameterless constructor if it's available.**
>
> If you don't want to invoke the parameterless constructor of **ValueType**.
> Consider to use `FastNew.NewOrDefault<T>()` which **will never invoke the parameterless constructor of `ValueType`**
> If you don't want to invoke the parameterless constructor of **ValueType**,
> consider using `FastNew.NewOrDefault<T>()` which **will never invoke the parameterless constructor of `ValueType`**

## 🚀 Benchmark

Expand Down