en-US/DependsOn-help.xml

<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml" xmlns="http://msh">
  <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
    <command:details>
      <command:name>Resolve-DependencyOrder</command:name>
      <command:verb>Resolve</command:verb>
      <command:noun>DependencyOrder</command:noun>
      <maml:description>
        <maml:para></maml:para>
      </maml:description>
    </command:details>
    <maml:description>
      <maml:para>Takes a list of objects that depend on each other and orders them.</maml:para>
    </maml:description>
    <command:syntax>
      <command:syntaxItem>
        <maml:name>Resolve-DependencyOrder</maml:name>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
          <maml:name>InputObject</maml:name>
          <maml:Description>
            <maml:para>{{Fill InputObject Description}}</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">PSObject[]</command:parameterValue>
          <dev:type>
            <maml:name>PSObject[]</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
        <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="2" aliases="none">
          <maml:name>Key</maml:name>
          <maml:Description>
            <maml:para>{{Fill Key Description}}</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
          <dev:type>
            <maml:name>ScriptBlock</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>{"$PSItem"}</dev:defaultValue>
        </command:parameter>
        <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="3" aliases="none">
          <maml:name>DependsOn</maml:name>
          <maml:Description>
            <maml:para>{{Fill DependsOn Description}}</maml:para>
          </maml:Description>
          <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
          <dev:type>
            <maml:name>ScriptBlock</maml:name>
            <maml:uri />
          </dev:type>
          <dev:defaultValue>None</dev:defaultValue>
        </command:parameter>
      </command:syntaxItem>
    </command:syntax>
    <command:parameters>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="3" aliases="none">
        <maml:name>DependsOn</maml:name>
        <maml:Description>
          <maml:para>{{Fill DependsOn Description}}</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
        <dev:type>
          <maml:name>ScriptBlock</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="1" aliases="none">
        <maml:name>InputObject</maml:name>
        <maml:Description>
          <maml:para>{{Fill InputObject Description}}</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">PSObject[]</command:parameterValue>
        <dev:type>
          <maml:name>PSObject[]</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>None</dev:defaultValue>
      </command:parameter>
      <command:parameter required="false" variableLength="true" globbing="false" pipelineInput="True (ByPropertyName)" position="2" aliases="none">
        <maml:name>Key</maml:name>
        <maml:Description>
          <maml:para>{{Fill Key Description}}</maml:para>
        </maml:Description>
        <command:parameterValue required="true" variableLength="false">ScriptBlock</command:parameterValue>
        <dev:type>
          <maml:name>ScriptBlock</maml:name>
          <maml:uri />
        </dev:type>
        <dev:defaultValue>{"$PSItem"}</dev:defaultValue>
      </command:parameter>
    </command:parameters>
    <command:inputTypes />
    <command:returnValues />
    <maml:alertSet>
      <maml:alert>
        <maml:para>An exception will be thrown if there are duplicate keys Circular dependancies are only walked once and then ignored without warning If a key is not provided, the tostring() of the object is used Each object will only show up once in the output The DependsOn can be an array of strings Order of objects is preserved until a DependsOn is identified Dependencies will be walked in order that they are defined in the DependsOn</maml:para>
      </maml:alert>
    </maml:alertSet>
    <command:examples>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
        <dev:code>Resolve-DependencyOrder -InputObject @(</dev:code>
        <dev:remarks>
          <maml:para>@{Name='Girl';DependsOn='Dad','Mom'} @{Name='Mom';DependsOn='Dad'} @{Name='Dad';DependsOn='Grandpa','Grandma'} @{Name='Grandpa';DependsOn=$null} @{Name='Grandma';DependsOn='Grandpa'} @{Name='Boy';DependsOn='Dad','Mom'} ) -Key {$ .name} -DependsOn {$ .DependsOn}</maml:para>
          <maml:para>Takes a collection of hashtables and orders them so the dependant object come first.</maml:para>
        </dev:remarks>
      </command:example>
      <command:example>
        <maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
        <dev:code>$map = [ordered]@{</dev:code>
        <dev:remarks>
          <maml:para>'Girl'='Dad','Mom' 'Mom'='Dad' 'Grandpa' = $null 'Dad'='Grandpa','Grandma' 'Grandma'='Grandpa' 'Boy'='Dad','Mom' }</maml:para>
          <maml:para>Resolve-DependencyOrder -InputObject $map.Keys -DependsOn {$map[$_]}</maml:para>
          <maml:para>Uses an external source for the mapping of strings.</maml:para>
        </dev:remarks>
      </command:example>
    </command:examples>
    <command:relatedLinks />
  </command:command>
</helpItems>