Created
June 12, 2019 18:42
-
-
Save chriskuech/3a5dc8ae3816d4a54ad89bb439631f78 to your computer and use it in GitHub Desktop.
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 Requirement { | |
[string] $Name | |
[scriptblock] $Test | |
[scriptblock] $Set | |
} | |
$mySystem = [System.Collections.ArrayList]::new() | |
$requirements = [Requirement[]]@( | |
@{ | |
Name = "Resource 1" | |
Test = {$mySystem -contains 1} | |
Set = {$mySystem.Add(1); Start-Sleep 1} | |
}, | |
@{ | |
Name = "Resource 2" | |
Test = {$mySystem -contains 2} | |
Set = {$mySystem.Add(2); Start-Sleep 1} | |
}, | |
@{ | |
Name = "Resource 3" | |
Test = {$mySystem -contains 3} | |
Set = {$mySystem.Add(3); Start-Sleep 1} | |
}, | |
@{ | |
Name = "Resource 4" | |
Test = {$mySystem -contains 4} | |
Set = {$mySystem.Add(4); Start-Sleep 1} | |
}, | |
@{ | |
Name = "Resource 5" | |
Test = {$mySystem -contains 5} | |
Set = {$mySystem.Add(5); Start-Sleep 1} | |
} | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment