using System.ComponentModel; using System.Linq.Expressions; namespace HopFrame.Web.Admin.Generators; public interface IAdminPageGenerator { /// /// Sets the title of the Admin Page /// /// the specified title /// IAdminPageGenerator Title(string title); /// /// Sets the description of the Admin Page /// /// the specified description /// IAdminPageGenerator Description(string description); /// /// Sets the permission needed to view the Admin Page /// /// the specified permission /// IAdminPageGenerator ReadPermission(string permission); /// /// Sets the permission needed to create a new Entry /// /// the specified permission /// IAdminPageGenerator CreatePermission(string permission); /// /// Sets the permission needed to update an Entry /// /// the specified permission /// IAdminPageGenerator UpdatePermission(string permission); /// /// Sets the permission needed to delete an Entry /// /// the specified permission /// IAdminPageGenerator DeletePermission(string permission); /// /// Enables or disables the create button /// /// the specified state /// IAdminPageGenerator ShowCreateButton(bool show); /// /// Enables or disables the delete button /// /// the specified state /// IAdminPageGenerator ShowDeleteButton(bool show); /// /// Enables or disables the update button /// /// the specified state /// IAdminPageGenerator ShowUpdateButton(bool show); /// /// Specifies the default sort property and direction /// /// Which property should be sorted /// In which direction should be sorted /// IAdminPageGenerator DefaultSort(Expression> propertyExpression, ListSortDirection direction); /// /// Specifies the repository provider for the page /// /// The specified provider /// IAdminPageGenerator ConfigureProvider() where TRepository : ModelProvider; /// /// Returns the generator of the specified property /// /// The property /// IAdminPropertyGenerator Property(Expression> propertyExpression); /// /// Specifies the default property that should be displayed as a property in other listings /// /// The property /// IAdminPageGenerator ListingProperty(Expression> propertyExpression); }