Skip to content

Commit

Permalink
- code linting
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <[email protected]>
  • Loading branch information
baywet committed Oct 30, 2023
1 parent 0b75243 commit e0b5c36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/serialization/DeserializationHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ private static ParsableFactory<T> GetFactoryFromType<T>() where T : IParsable
#endif
{
var type = typeof(T);
var factoryMethod = type.GetMethods().FirstOrDefault(static x => x.IsStatic && "CreateFromDiscriminatorValue".Equals(x.Name, StringComparison.OrdinalIgnoreCase)) ??
var factoryMethod = Array.Find(type.GetMethods(), static x => x.IsStatic && "CreateFromDiscriminatorValue".Equals(x.Name, StringComparison.OrdinalIgnoreCase)) ??
throw new InvalidOperationException($"No factory method found for type {type.Name}");
return (ParsableFactory<T>)factoryMethod.CreateDelegate(typeof(ParsableFactory<T>));
}
Expand Down

0 comments on commit e0b5c36

Please sign in to comment.