GraphShell.format.ps1xml
|
<?xml version="1.0" encoding="utf-8"?> <Configuration><ViewDefinitions> <View><Name>GraphShell.Mapping.Default</Name><ViewSelectedBy><TypeName>GraphShell.Mapping</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('Cmdlet','ModuleName','Method','Endpoint','ApiVersion','Aliases','Variants','CommandAlias','Permissions','OutputType','ApiReferenceLink','MatchedPermission','RenamedFrom')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> <View><Name>GraphShell.Detail.Default</Name><ViewSelectedBy><TypeName>GraphShell.Detail</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('Cmdlet','ModuleName','Method','Endpoint','ApiVersion','Permissions','CommandAlias','Aliases','Variants','OutputType','ApiReferenceLink','RenamedFrom','RestEquivalent','RestNote')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> <View><Name>GraphShell.Permission.Default</Name><ViewSelectedBy><TypeName>GraphShell.Permission</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('Name','Type','DisplayName','Description','AdminConsentRequired','IsEnabled','Operations','Cmdlets','Endpoints')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> <View><Name>GraphShell.LegacyMapping.Default</Name><ViewSelectedBy><TypeName>GraphShell.LegacyMapping</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('LegacyCommand','GraphCommand','ModuleName','Method','Endpoint','ApiVersion','Permissions','Status')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> <View><Name>GraphShell.Parity.Default</Name><ViewSelectedBy><TypeName>GraphShell.Parity</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('Endpoint','Method','State','Comparison','OpenApiEvidence','ApiVersionCoverage','HasCmdlet','Cmdlets','EstimatedModule','RestEquivalent')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> <View><Name>GraphShell.ConnectionCommand.Default</Name><ViewSelectedBy><TypeName>GraphShell.ConnectionCommand</TypeName></ViewSelectedBy><CustomControl><CustomEntries><CustomEntry><CustomItem><ExpressionBinding><ScriptBlock>$record = $_ $lines = foreach ($name in @('Cmdlet','Endpoint','Method','ApiVersion','PermissionType','Scope','Command')) { $value = $record.$name if ($null -eq $value) { continue } if ($value -is [string] -and [string]::IsNullOrWhiteSpace($value)) { continue } if ($value -is [System.Collections.IEnumerable] -and $value -isnot [string]) { $items = @($value) if ($items.Count -eq 0) { continue } $value = ($items | ForEach-Object { if ($name -eq 'Permissions') { '{0} [{1}]' -f $_.Name, $_.PermissionType } else { [string]$_ } }) -join ', ' } '{0,-20} : {1}' -f $name, $value } $lines -join [Environment]::NewLine</ScriptBlock></ExpressionBinding><NewLine/></CustomItem></CustomEntry></CustomEntries></CustomControl></View> </ViewDefinitions></Configuration> |