Last active
December 12, 2016 07:32
-
-
Save OCram85/0e0feb3a558df95096938f2dd6ae3ca6 to your computer and use it in GitHub Desktop.
Posh5 class test with external class definition
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Import-Module ClassTest -Verbose -Force | |
using module ClassTest | |
$test = [ClassTest]::new() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Class ClassTest { | |
static [string]$prop1 = "foobar" | |
static [int]$prop2 = 43 | |
ClassTest() { | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$item = Join-Path -Path $PSScriptRoot -ChildPath 'ClassTest.ps1' | |
Write-Host $item | |
. $item | |
Export-ModuleMember * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment