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();
protected virtual int GetIndentation() { return(ParameterSetNames.IsNew(ParameterSetName) ? (int)GetVariableValue("ActionIndentation", 0) : GetParentIndentation() + 1); }
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); }