Skip to content

Commit

Permalink
from function to companion object
Browse files Browse the repository at this point in the history
Co-authored-by: Andrii Rublov <[email protected]>
  • Loading branch information
Alls-DeV and seclerp authored Sep 4, 2023
1 parent 4eca76a commit 23ebc89
Showing 1 changed file with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,17 @@ import com.jetbrains.rider.plugins.efcore.features.shared.QuickActionsGroup
class EFCoreShellCommandHandler : TerminalShellCommandHandler {

// Define dotnet ef commands
private fun knownEfCommands() = setOf(
KnownEfCommands.Migrations.add,
KnownEfCommands.Database.drop,
KnownEfCommands.Database.update,
KnownEfCommands.DbContext.scaffold,
KnownEfCommands.Migrations.remove,
KnownEfCommands.DbContext.script
)
companion object {
private val knownEfCommands = setOf(
KnownEfCommands.Migrations.add,
KnownEfCommands.Database.drop,
KnownEfCommands.Database.update,
KnownEfCommands.DbContext.scaffold,
KnownEfCommands.Migrations.remove,
KnownEfCommands.DbContext.script
)
}


// Check if input command matches known commands
override fun matches(project: Project, workingDirectory: String?, localSession: Boolean, command: String): Boolean {
Expand Down

0 comments on commit 23ebc89

Please sign in to comment.