PSSharp.ModuleFactory.format.ps1xml

<?xml version="1.0"?>
<Configuration>
    <Controls>
        <Control>
            <Name>TypeName</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <Text>&lt;</Text>
                            <ExpressionBinding>
                                <ScriptBlock>$_.Split('.+'.ToCharArray())[-1]</ScriptBlock>
                            </ExpressionBinding>
                            <Text>&gt;</Text>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
        <Control>
            <Name>ParameterName</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <Text>-</Text>
                            <ExpressionBinding>
                                <ScriptBlock>$_</ScriptBlock>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
        <Control>
            <Name>Parameter</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <ScriptBlock>!$_.IsMandatory</ScriptBlock>
                                </ItemSelectionCondition>
                                <ScriptBlock>"["</ScriptBlock>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <PropertyName>Name</PropertyName>
                                <CustomControlName>ParameterName</CustomControlName>
                            </ExpressionBinding>
                            <Text> </Text>
                            <ExpressionBinding>
                                <PropertyName>TypeName</PropertyName>
                                <CustomControlName>TypeName</CustomControlName>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <ScriptBlock>!$_.IsMandatory</ScriptBlock>
                                </ItemSelectionCondition>
                                <ScriptBlock>"]"</ScriptBlock>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
        <Control>
            <Name>PSSharp.ModuleFactory.ParameterFingerprint</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <CustomControlName>Parameter</CustomControlName>
                            </ExpressionBinding>
                            <NewLine />
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
        <Control>
            <Name>PSSharp.ModuleFactory.ParameterSetFingerprint</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <Text>Parameter Set: </Text>
                            <ExpressionBinding>
                                <PropertyName>Name</PropertyName>
                            </ExpressionBinding>
                            <NewLine />
                            <Frame>
                                <LeftIndent>4</LeftIndent>
                                <CustomItem>
                                    <ExpressionBinding>
                                        <ScriptBlock>$_.GetParameters() | Sort-Object -Property { $_.Position -eq [int]::MinValue ? [int]::MaxValue : $_.Position }</ScriptBlock>
                                        <EnumerateCollection>true</EnumerateCollection>
                                        <CustomControlName>PSSharp.ModuleFactory.ParameterFingerprint</CustomControlName>
                                    </ExpressionBinding>
                                </CustomItem>
                            </Frame>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
        <Control>
            <Name>PSSharp.ModuleFactory.CommandFingerprint</Name>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <Text>Command: </Text>
                            <ExpressionBinding>
                                <PropertyName>Name</PropertyName>
                            </ExpressionBinding>
                            <NewLine />
                            <Frame>
                                <LeftIndent>4</LeftIndent>
                                <CustomItem>
                                    <ExpressionBinding>
                                        <ScriptBlock>$_.GetParameterSets()</ScriptBlock>
                                        <EnumerateCollection>true</EnumerateCollection>
                                        <CustomControlName>PSSharp.ModuleFactory.ParameterSetFingerprint</CustomControlName>
                                    </ExpressionBinding>
                                </CustomItem>
                            </Frame>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </Control>
    </Controls>
    <ViewDefinitions>
        <View>
            <Name>PSSharp.ModuleFactory.ModuleFingerprint</Name>
            <ViewSelectedBy>
                <TypeName>PSSharp.ModuleFactory.ModuleFingerprint</TypeName>
            </ViewSelectedBy>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <Text>Module Fingerprint:</Text>
                            <NewLine />
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <PropertyName>PSModuleName</PropertyName>
                                </ItemSelectionCondition>
                                <CustomControl>
                                    <CustomEntries>
                                        <CustomEntry>
                                            <CustomItem>
                                                <Text>PSModuleName: </Text>
                                                <ExpressionBinding>
                                                    <PropertyName>PSModuleName</PropertyName>
                                                </ExpressionBinding>
                                                <NewLine />
                                            </CustomItem>
                                        </CustomEntry>
                                    </CustomEntries>
                                </CustomControl>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ItemSelectionCondition>
                                    <PropertyName>FilePath</PropertyName>
                                </ItemSelectionCondition>
                                <CustomControl>
                                    <CustomEntries>
                                        <CustomEntry>
                                            <CustomItem>
                                                <Text>Imported from FilePath: </Text>
                                                <ExpressionBinding>
                                                    <PropertyName>FilePath</PropertyName>
                                                </ExpressionBinding>
                                                <NewLine />
                                            </CustomItem>
                                        </CustomEntry>
                                    </CustomEntries>
                                </CustomControl>
                            </ExpressionBinding>
                            <ExpressionBinding>
                                <ScriptBlock>$_.GetCommands()</ScriptBlock>
                                <EnumerateCollection>true</EnumerateCollection>
                                <CustomControlName>PSSharp.ModuleFactory.CommandFingerprint</CustomControlName>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </View>
        <View>
            <Name>PSSharp.ModuleFactory.ParameterFingerprint</Name>
            <ViewSelectedBy>
                <TypeName>PSSharp.ModuleFactory.ParameterFingerprint</TypeName>
            </ViewSelectedBy>
            <CustomControl>
                <CustomEntries>
                    <CustomEntry>
                        <CustomItem>
                            <ExpressionBinding>
                                <ScriptBlock>$_</ScriptBlock>
                                <CustomControlName>Parameter</CustomControlName>
                            </ExpressionBinding>
                        </CustomItem>
                    </CustomEntry>
                </CustomEntries>
            </CustomControl>
        </View>
    </ViewDefinitions>
</Configuration>