-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Cleanup IContentManager #16077
Cleanup IContentManager #16077
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build is failing.
src/OrchardCore.Modules/OrchardCore.ContentFields/Controllers/ContentPickerAdminController.cs
Outdated
Show resolved
Hide resolved
Awesome! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sebastienros can I get your second opinion, specifically on using VersionOptions options = null
, i.e. an optional parameter instead of overloads with and without?
I think this is good but I'm wondering if I'm missing something. It's source-compatible but perhaps not binary-compatible, but 2.0 is breaking anyway, you have to recompile, it doesn't matter. Overloads are preferred instead of optional parameters if you need compatibility with all .NET languages, but that doesn't matter for us either. Anything else?
src/OrchardCore/OrchardCore.ContentManagement/DefaultContentManager.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore/OrchardCore.ContentManagement/DefaultContentManager.cs
Outdated
Show resolved
Hide resolved
…nager.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
…nager.cs Co-authored-by: Zoltán Lehóczky <[email protected]>
…ub.com/OrchardCMS/OrchardCore into ma/remove-options-from-content-manager
src/OrchardCore.Modules/OrchardCore.Contents/Razor/ContentRazorHelperExtensions.cs
Outdated
Show resolved
Hide resolved
/// <example>GetContentItemByIdAsync("4xxxxxxxxxxxxxxxx").</example> | ||
/// <returns>A content item with the specific id, or <c>null</c> if it doesn't exist.</returns> | ||
public static Task<ContentItem> GetContentItemByIdAsync(this IOrchardHelper orchardHelper, string contentItemId, bool latest = false) | ||
public static Task<ContentItem> GetContentItemByIdAsync(this IOrchardHelper orchardHelper, string contentItemId, VersionOptions option = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= null
, why not the actual default value that is documented? I know this is what will be used internally but that would make more sense. If the other default changes for instance.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VersionOptions is a class. How can we provide a default value to the argument?
Cleanup the
IContentManager
Fix #16027