@@ -52,12 +52,10 @@ function ConvertFrom-Plist {
52
52
# note: keys are forced to [string], insures a $null key is accepted
53
53
$collection [[string ][plistreader ]::processTree ($currnode.FirstChild )] = [plistreader ]::processTree($currnode.NextSibling )
54
54
$currnode = $currnode.NextSibling.NextSibling # skip the next sibling because it was the value of the property
55
- }
56
- else {
55
+ } else {
57
56
throw " Dictionary property value missing!"
58
57
}
59
- }
60
- else {
58
+ } else {
61
59
throw " Non 'key' element found in dictionary: <$ ( $currnode.Name ) >!"
62
60
}
63
61
}
@@ -79,15 +77,13 @@ function ConvertFrom-Plist {
79
77
# must be an integer type value element, return its value
80
78
[plistreader ]::processTree($node.FirstChild ).foreach {
81
79
# try to determine what size of interger to return this value as
82
- if ([int ]::TryParse( $_ , [ref ]$null )) {
80
+ if ([int ]::TryParse($_ , [ref ]$null )) {
83
81
# a 32bit integer seems to work
84
82
$_ -as [int ]
85
- }
86
- elseif ([int64 ]::TryParse( $_ , [ref ]$null )) {
83
+ } elseif ([int64 ]::TryParse($_ , [ref ]$null )) {
87
84
# a 64bit integer seems to be needed
88
85
$_ -as [int64 ]
89
- }
90
- else {
86
+ } else {
91
87
# try an unsigned 64bit interger, the largest available here.
92
88
$_ -as [uint64 ]
93
89
}
@@ -114,8 +110,7 @@ function ConvertFrom-Plist {
114
110
throw " Unhandled PLIST property type <$ ( $node.Name ) >!"
115
111
}
116
112
}
117
- }
118
- else {
113
+ } else {
119
114
# return simple element value (need to check for Boolean datatype, and process value accordingly)
120
115
switch ($node.Name ) {
121
116
true { $true ; continue } # return a Boolean TRUE value
0 commit comments