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 Media Cache Handler #16992

Merged
merged 2 commits into from
Nov 11, 2024
Merged

Fix Media Cache Handler #16992

merged 2 commits into from
Nov 11, 2024

Conversation

MikeAlhayek
Copy link
Member

No description provided.

Copy link
Member

@sebastienros sebastienros left a comment

Choose a reason for hiding this comment

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

Interestingly this could have been done on purpose.


return Task.CompletedTask;
}
=> _mediaFileStoreCacheFileProvider.TryDeleteDirectoryAsync(context.Path);
Copy link
Member

Choose a reason for hiding this comment

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

I think we accepted the rule to use block body for methods, ctor and conversions. Only use expression body for properties and indexers.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think there was an objection into using expression for one line like this.

Copy link
Member

Choose a reason for hiding this comment

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

I looked at the editor config and watched the meeting. You are correct, for methods we "can" use expression bodies when it is on a single line.

@MikeAlhayek
Copy link
Member Author

Interestingly this could have been done on purpose.

Like fire and forget? If so, that would be done at the higher level not here. I don't think there is a reason to execute a task and return a completed task. Maybe I am missing something here

@MikeAlhayek MikeAlhayek merged commit 8ff1695 into main Nov 11, 2024
22 checks passed
@MikeAlhayek MikeAlhayek deleted the ma/fix-media-cache-handler branch November 11, 2024 20:11
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