CimHelp.format.ps1xml

<?xml version="1.0" encoding="utf-8" ?>
<Configuration>
  <Controls>
    <Control>
      <Name>CimNameSectionControl</Name>
        <CustomControl>
          <CustomEntries>
            <CustomEntry>
              <CustomItem>
                <Text AssemblyName="System.Management.Automation" BaseName="HelpDisplayStrings" ResourceId="Name"/>
                <NewLine/>
                <Frame>
                  <LeftIndent>4</LeftIndent>
                  <CustomItem>
                    <ExpressionBinding>
                      <PropertyName>Name</PropertyName>
                    </ExpressionBinding>
                    <NewLine/>
                    <NewLine/>
                  </CustomItem>
                </Frame>
              </CustomItem>
            </CustomEntry>
          </CustomEntries>
        </CustomControl>
    </Control>
    <Control>
      <Name>CimClassSectionControl</Name>
        <CustomControl>
          <CustomEntries>
            <CustomEntry>
              <CustomItem>
                <Text>CLASS</Text>
                <NewLine/>
                <Frame>
                  <LeftIndent>4</LeftIndent>
                  <CustomItem>
                    <ExpressionBinding>
                      <PropertyName>Namespace</PropertyName>
                    </ExpressionBinding>
                    <Text>:</Text>
                    <ExpressionBinding>
                      <PropertyName>Class</PropertyName>
                    </ExpressionBinding>
                    <NewLine/>
                    <NewLine/>
                  </CustomItem>
                </Frame>
                <Text>SUPERCLASS</Text>
                <NewLine/>
                <Frame>
                  <LeftIndent>4</LeftIndent>
                  <CustomItem>
                    <ExpressionBinding>
                      <PropertyName>SuperClass</PropertyName>
                    </ExpressionBinding>
                    <NewLine/>
                    <NewLine/>
                  </CustomItem>
                </Frame>
              </CustomItem>
            </CustomEntry>
          </CustomEntries>
        </CustomControl>
    </Control>
    <Control>
      <Name>CimIndentedDescriptionSectionControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Text AssemblyName="System.Management.Automation" BaseName="HelpDisplayStrings" ResourceId="DetailedDescription"/>
              <NewLine/>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Description</PropertyName>
                    <EnumerateCollection/>
                    <CustomControlName>CimDescriptionItemControl</CustomControlName>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
              <NewLine/>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
    <Control>
      <Name>CimDescriptionItemControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <EntrySelectedBy>
              <TypeName>CimParaTextItem</TypeName>
            </EntrySelectedBy>
            <CustomItem>
              <ExpressionBinding>
                <PropertyName>Text</PropertyName>
              </ExpressionBinding>
              <NewLine/>
              <NewLine/>
            </CustomItem>
          </CustomEntry>
          <CustomEntry>
            <EntrySelectedBy>
              <TypeName>CimOrderedListTextItem</TypeName>
            </EntrySelectedBy>
            <CustomItem>
              <Frame>
                <FirstLineHanging>4</FirstLineHanging>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Tag</PropertyName>
                  </ExpressionBinding>
                  <ExpressionBinding>
                    <PropertyName>Text</PropertyName>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
          <CustomEntry>
            <EntrySelectedBy>
              <TypeName>CimUnorderedListTextItem</TypeName>
            </EntrySelectedBy>
            <CustomItem>
              <Frame>
                <FirstLineHanging>2</FirstLineHanging>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Tag</PropertyName>
                  </ExpressionBinding>
                  <ExpressionBinding>
                    <PropertyName>Text</PropertyName>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
          <CustomEntry>
            <EntrySelectedBy>
              <TypeName>CimDefinitionTextItem</TypeName>
            </EntrySelectedBy>
            <CustomItem>
              <ExpressionBinding>
                <PropertyName>Term</PropertyName>
              </ExpressionBinding>
              <NewLine/>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Definition</PropertyName>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
          <CustomEntry>
            <CustomItem>
              <Text> </Text>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
    <Control>
      <Name>CimPropertyItemControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Name</PropertyName>
                  </ExpressionBinding>
                  <Text> [</Text>
                  <ExpressionBinding>
                    <PropertyName>Type</PropertyName>
                  </ExpressionBinding>
                  <Text>]</Text>
                  <NewLine/>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
    <Control>
      <Name>CimMethodSyntaxItemControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Name</PropertyName>
                  </ExpressionBinding>
                  <Text>(</Text>
                  <ExpressionBinding>
                    <ScriptBlock>
                      $Parameters = foreach ($Parameter in $_.Parameters.Values | Where-Object {$_.In} | Sort-Object ID) {
                        '[{0}] ${1}' -f $Parameter.Type,$Parameter.Name
                      }
                      $Parameters -join ", "
                    </ScriptBlock>
                  </ExpressionBinding>
                  <Text>)</Text>
                  <ExpressionBinding>
                    <ScriptBlock>
                      if ($_.Static) {
                        ' &lt;Static&gt;'
                      }
                    </ScriptBlock>
                  </ExpressionBinding>
                  <NewLine/>
                </CustomItem>
              </Frame>
              <NewLine/>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
    <Control>
      <Name>CimParameterItemControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Name</PropertyName>
                  </ExpressionBinding>
                  <Text> &lt;</Text>
                  <ExpressionBinding>
                    <ScriptBlock>if ($_.In) {"in"} else {"out"}</ScriptBlock>
                  </ExpressionBinding>
                  <Text>&gt;</Text>
                  <NewLine/>
                </CustomItem>
              </Frame>
              <Frame>
                <LeftIndent>8</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Description</PropertyName>
                    <EnumerateCollection/>
                    <CustomControlName>CimDescriptionItemControl</CustomControlName>
                  </ExpressionBinding>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
    <Control>
      <Name>CimSyntaxSectionControl</Name>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <EntrySelectedBy>
              <TypeName>ObjectHelpInfo#Cim#Method</TypeName>
            </EntrySelectedBy>
            <CustomItem>
              <Text AssemblyName="System.Management.Automation" BaseName="HelpDisplayStrings" ResourceId="Syntax"/>
              <NewLine/>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimMethodSyntaxItemControl</CustomControlName>
              </ExpressionBinding>
            </CustomItem>
          </CustomEntry>
          <CustomEntry>
            <CustomItem>
              <Text AssemblyName="System.Management.Automation" BaseName="HelpDisplayStrings" ResourceId="Syntax"/>
              <NewLine/>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <Text>Get-CimObject </Text>
                  <ExpressionBinding>
                    <PropertyName>Name</PropertyName>
                  </ExpressionBinding>
                  <Text> -Namespace </Text>
                  <ExpressionBinding>
                    <PropertyName>Namespace</PropertyName>
                  </ExpressionBinding>
                  <NewLine/>
                  <NewLine/>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </Control>
  </Controls>
  <!-- ################ VIEW DEFINITIONS ################ -->
  <ViewDefinitions>
    <View>
      <!-- This view is used when Get-ObjectHelp is called w/ no parameters on a command. -->
      <Name>DefaultCimHelp</Name>
      <ViewSelectedBy>
        <TypeName>ObjectHelpInfo#Cim</TypeName>
      </ViewSelectedBy>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimNameSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimSyntaxSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimIndentedDescriptionSectionControl</CustomControlName>
              </ExpressionBinding>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </View>
    <View>
      <!-- This view is used when Get-ObjectHelp is called on a command and passed -Detailed. -->
      <Name>DetailedCimHelp</Name>
      <ViewSelectedBy>
        <TypeName>ObjectHelpInfo#Cim#DetailedView</TypeName>
      </ViewSelectedBy>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimNameSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimClassSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimSyntaxSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimIndentedDescriptionSectionControl</CustomControlName>
              </ExpressionBinding>
              <Text>PROPERTIES</Text>
              <NewLine/>
              <ExpressionBinding>
                <ScriptBlock>$_.Properties.Values | Sort-Object Name</ScriptBlock>
                <EnumerateCollection/>
                <CustomControlName>CimPropertyItemControl</CustomControlName>
              </ExpressionBinding>
              <Text>METHODS</Text>
              <NewLine/>
              <ExpressionBinding>
                <ScriptBlock>$_.Methods.Values | Sort-Object Name</ScriptBlock>
                <EnumerateCollection/>
                <CustomControlName>CimMethodSyntaxItemControl</CustomControlName>
              </ExpressionBinding>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </View>
    <View>
      <!-- This view is used when Get-ObjectHelp is called on a command and passed -Property. -->
      <Name>PropertyCimHelp</Name>
      <ViewSelectedBy>
        <TypeName>ObjectHelpInfo#Cim#PropertyDetail</TypeName>
      </ViewSelectedBy>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimNameSectionControl</CustomControlName>
              </ExpressionBinding>
              <Text>TYPE</Text>
              <NewLine/>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <PropertyName>Type</PropertyName>
                  </ExpressionBinding>
                  <NewLine/>
                  <NewLine/>
                </CustomItem>
              </Frame>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimClassSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimIndentedDescriptionSectionControl</CustomControlName>
              </ExpressionBinding>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </View>
    <View>
      <!-- This view is used when Get-ObjectHelp is called on a command and passed -Method. -->
      <Name>MethodsCimHelp</Name>
      <ViewSelectedBy>
        <TypeName>ObjectHelpInfo#Cim#MethodDetail</TypeName>
      </ViewSelectedBy>
      <CustomControl>
        <CustomEntries>
          <CustomEntry>
            <CustomItem>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimNameSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimIndentedDescriptionSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <ScriptBlock>$_</ScriptBlock>
                <CustomControlName>CimSyntaxSectionControl</CustomControlName>
              </ExpressionBinding>
              <ExpressionBinding>
                <PropertyName>Details</PropertyName>
                <CustomControlName>CimClassSectionControl</CustomControlName>
              </ExpressionBinding>
              <Text>PARAMETERS</Text>
              <NewLine/>
              <Frame>
                <LeftIndent>4</LeftIndent>
                <CustomItem>
                  <ExpressionBinding>
                    <ScriptBlock>$_.Parameters.Values | Sort-Object ID</ScriptBlock>
                    <EnumerateCollection/>
                    <CustomControlName>CimParameterItemControl</CustomControlName>
                  </ExpressionBinding>
                </CustomItem>
              </Frame>
            </CustomItem>
          </CustomEntry>
        </CustomEntries>
      </CustomControl>
    </View>
  </ViewDefinitions>
</Configuration>