예제 #1
0
        protected override void ProcessRecord()
        {
            foreach (var item in CreateItems())
            {
                if (ParameterSetNames.IsAdd(ParameterSetName))
                {
                    AddItemToInputObject(item, InputObject);
                }

                if (ParameterSetNames.IsNew(ParameterSetName) || PassThru)
                {
                    WriteObject(item);
                }
            }
        }
 protected int GetIndentation() => ParameterSetNames.IsNew(ParameterSetName) ? GetIndentationFromVariable() : GetIndentationFromInputObject();
예제 #3
0
 protected virtual int GetIndentation()
 {
     return(ParameterSetNames.IsNew(ParameterSetName)
         ? (int)GetVariableValue("ActionIndentation", 0)
         : GetParentIndentation() + 1);
 }
예제 #4
0
 protected int GetIndentation()
 {
     return(ParameterSetNames.IsNew(ParameterSetName)
         ? (int)GetVariableValue("ControlIndentation", 0)
         : GetParentIndentation() + 1);
 }
 protected int?GetIndentation()
 {
     return(ParameterSetNames.IsNew(ParameterSetName)
         ? (int?)GetVariableValue("ActionIndentation", null)
         : GetParentIndentationLevel() + 1);
 }