PoshMethod.ps1xml

<?xml version="1.0" encoding="utf-8"?>
<Configuration>
    <ViewDefinitions>
        <View>
            <Name>PoshMethod</Name>
            <ViewSelectedBy>
                <TypeName>MG.PowerShell.Types.PoshMethod</TypeName>
            </ViewSelectedBy>
            <ListControl>
                <ListEntries>
                    <ListEntry>
                        <ListItems>
                            <ListItem>
                                <Label>Definition</Label>
                                <ScriptBlock>
                                    $prms = $_.GetParameters();
                                    if ($prms.Length -gt 0)
                                    {
                                        $strs = @();
                                        foreach ($p in $prms)
                                        {
                                            $strs += "{0} {1}" -f $([MG.PowerShell.Types.BaseObject]::GetTypeAlias($true, $p.ParameterType)), $p.Name;
                                        }
                                        if ($strs.Count -gt 0)
                                        {
                                            $strs = $strs -join ', ';
                                        }
                                    }
                                    else
                                    {
                                        $strs = [string]::Empty;
                                    }
                                    "{0} {1}({2})" -f $([MG.PowerShell.Types.BaseObject]::GetTypeAlias($true, $_.ReturnType)), $_.Name, $strs;
                                </ScriptBlock>
                            </ListItem>
                            <ListItem>
                                <Label>IsGeneric</Label>
                                <PropertyName>IsGenericMethod</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>IsPublic</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>IsStatic</PropertyName>
                            </ListItem>
                            <ListItem>
                                <PropertyName>Name</PropertyName>
                            </ListItem>
                            <ListItem>
                                <Label>Returns</Label>
                                <!-- <PropertyName>ReturnType</PropertyName> -->
                                <ScriptBlock>[MG.PowerShell.Types.BaseObject]::GetTypeAlias($true, $_.ReturnType)</ScriptBlock>
                            </ListItem>
                            <ListItem>
                                <Label>TypeDeclared</Label>
                                <!--<PropertyName>DeclaringType</PropertyName>-->
                                <ScriptBlock>[MG.PowerShell.Types.BaseObject]::GetTypeAlias($true, $_.DeclaringType)</ScriptBlock>
                            </ListItem>
                            <ListItem>
                                <Label>TypeReflected</Label>
                                <!--<PropertyName>ReflectedType</PropertyName>-->
                                <ScriptBlock>[MG.PowerShell.Types.BaseObject]::GetTypeAlias($true, $_.ReflectedType)</ScriptBlock>
                            </ListItem>
                        </ListItems>
                    </ListEntry>
                </ListEntries>
            </ListControl>
            <!-- <TableControl>
                <TableHeaders>
                    <TableColumnHeader>
                        <Label>Method</Label>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Type</Label>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>Returns</Label>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>IsGeneric</Label>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                    <TableColumnHeader>
                        <Label>HasParameters</Label>
                        <Alignment>Left</Alignment>
                    </TableColumnHeader>
                </TableHeaders>
                <TableRowEntries>
                    <TableRowEntry>
                        <TableColumnItems>
                            <TableColumnItem>
                                <PropertyName>Name</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>DeclaringType</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>ReturnType</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IsStatic</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <PropertyName>IsGenericMethod</PropertyName>
                            </TableColumnItem>
                            <TableColumnItem>
                                <ScriptBlock>$_.GetParameters().Length -gt 0</ScriptBlock>
                            </TableColumnItem>
                        </TableColumnItems>
                    </TableRowEntry>
                </TableRowEntries>
            </TableControl> -->
        </View>
    </ViewDefinitions>
</Configuration>