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

Add ShapeFactory extensions #16715

Merged
merged 9 commits into from
Sep 16, 2024
Merged

Add ShapeFactory extensions #16715

merged 9 commits into from
Sep 16, 2024

Conversation

MikeAlhayek
Copy link
Member

@MikeAlhayek MikeAlhayek commented Sep 12, 2024

Adding the following extensions:

  • ValueTask<IShape> CreateAsync<TModel>(this IShapeFactory factory, Action<TModel> initialize = null)
  • ValueTask<IShape> CreateAsync<TModel>(this IShapeFactory factory, Func<TModel, ValueTask> initializeAsync)

@hishamco
Copy link
Member

Sorry I updated the branch I thought it's mine :)

@hishamco
Copy link
Member

Please check the parameters, then we can merge

@MikeAlhayek
Copy link
Member Author

@hishamco anything else here? If not please approve

@hishamco
Copy link
Member

I will do the null checks if you don't have time

@MikeAlhayek
Copy link
Member Author

Which null check?

/// </summary>
public static ValueTask<IShape> CreateAsync(this IShapeFactory factory, string shapeType, INamedEnumerable<object> parameters)
{
if (parameters == null || parameters == Arguments.Empty)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the shapeType

@MikeAlhayek
Copy link
Member Author

@hishamco I added the null check

@MikeAlhayek MikeAlhayek enabled auto-merge (squash) September 16, 2024 05:27
@MikeAlhayek MikeAlhayek merged commit bed7bbf into main Sep 16, 2024
11 checks passed
@MikeAlhayek MikeAlhayek deleted the ma/add-shape-extension branch September 16, 2024 05:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants