jbomhold3 / BlazorSortableJS

BlazorSortable JS
https://jbomhold3.github.io/BlazorSortableJS/
18 stars 10 forks source link

Cleaned up some code: #3

Closed VeithBuergerhoff closed 4 years ago

VeithBuergerhoff commented 4 years ago
Naming/Codestyle rules:
    Async-Methods should always have the Async-Suffix
    Properties should begin with an uppercase letter
    If-statements should always have curly braces
    Private Properties can be replaced with fields if the getter and setter do not add logic
    Fixed a bunch of typos like Distroy->Destroy
    Commented out code blocks that serve no purpose were deleted
Optimizations:
    Linq queries can be optimized by replacing FirstOrDefault with Find
    Empty if-statements are redundant and can be replaced with one inverted if
    Properties can be assigned directly, so no need to do it in the constructor
    bool == true is redundant
    When a function only wants to enumerate something don't force others to pass a List<T>; use Enumerable<T> instead (list will still work but so will Arrays, etc.)