Created
January 30, 2013 12:28
-
-
Save zippy1981/4672958 to your computer and use it in GitHub Desktop.
Some TFS Enumerations to help me figurte out Stan's question http://social.msdn.microsoft.com/Forums/en-US/tfsversioncontrol/thread/09cc6ecb-500c-4a9e-ab3f-8cecfbaae8ff/
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
$assemblyPath = 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\ReferenceAssemblies\v2.0\Microsoft.TeamFoundation.VersionControl.Common.dll' | |
$types = Add-Type -Path $assemblyPath -PassThru | |
$enums = $types | where { $_.BaseType -eq [System.Enum] } | |
#<# | |
$enums | %{ | |
$curEnum = $_ | |
[enum]::getvalues([type]$curEnum) | % { | |
#$curEnum::Format($curEnum, $_, 'x') | |
[PSCustomObject] @{ | |
Enum = $curEnum.Name; | |
Name = $_; | |
Value = $_.value__; | |
Hex = "{0:x4}" -f $_.value__ | |
} | |
} | |
} | ogv | |
##> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment