SciProfile_Scripts.ps1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# =========================================================================== # SciProfile_Scripts.psm1 ----------------------------------------------- # =========================================================================== # import ------------------------------------------------------------------ # --------------------------------------------------------------------------- $path = Join-Path -Path $(Split-Path -Path $MyInvocation.MyCommand.Path -Parent) -ChildPath "Modules" Get-Childitem -Path $path -Directory | Select-Object -ExpandProperty FullName | ForEach-Object { Import-Module -Name $_ -Scope Local } # validation --------------------------------------------------------------- # ---------------------------------------------------------------------------- Class ValidatePapisProject: System.Management.Automation.IValidateSetValuesGenerator { [String[]] GetValidValues() { return [String[]] (Get-ValidateProjectType -Type "Papis") } } # validation --------------------------------------------------------------- # ---------------------------------------------------------------------------- Class ValidateVirtualEnv: System.Management.Automation.IValidateSetValuesGenerator { [String[]] GetValidValues() { return [String[]] (Get-ValidateVirtualEnv) } } |