private void SetUpActiveProperties(PSObject so) { List <MshParameter> rawMshParameterList = null; if (base.inputParameters != null) { rawMshParameterList = base.inputParameters.mshParameterList; } base.activeAssociationList = AssociationManager.SetupActiveProperties(rawMshParameterList, so, base.expressionFactory); }
private void SetUpActiveProperties(PSObject so) { List <MshParameter> mshParameterList = null; if (this.inputParameters != null) { mshParameterList = this.inputParameters.mshParameterList; } this.activeAssociationList = AssociationManager.SetupActiveProperties(mshParameterList, so, this.expressionFactory); }
private void DisplayObject(PSObject so, TraversalInfo currentLevel, List <MshParameter> parameterList, List <FormatValue> formatValueList) { List <MshResolvedExpressionParameterAssociation> activeAssociationList = AssociationManager.SetupActiveProperties(parameterList, so, this.expressionFactory); FormatEntry item = new FormatEntry(); formatValueList.Add(item); string objectDisplayName = this.GetObjectDisplayName(so); if (objectDisplayName != null) { objectDisplayName = "class " + objectDisplayName; } AddPrologue(item.formatValueList, "{", objectDisplayName); this.ProcessActiveAssociationList(so, currentLevel, activeAssociationList, this.AddIndentationLevel(item.formatValueList)); AddEpilogue(item.formatValueList, "}"); }
/// <summary> /// Recursive call to display an object. /// </summary> /// <param name="so">Object to display.</param> /// <param name="currentLevel">Current level in the traversal.</param> /// <param name="parameterList">List of parameters from the command line.</param> /// <param name="formatValueList">List of format tokens to add to.</param> private void DisplayObject(PSObject so, TraversalInfo currentLevel, List<MshParameter> parameterList, List<FormatValue> formatValueList) { // resolve the names of the properties List<MshResolvedExpressionParameterAssociation> activeAssociationList = AssociationManager.SetupActiveProperties(parameterList, so, _expressionFactory); // create a format entry FormatEntry fe = new FormatEntry(); formatValueList.Add(fe); // add the display name of the object string objectDisplayName = GetObjectDisplayName(so); if (objectDisplayName != null) objectDisplayName = "class " + objectDisplayName; AddPrologue(fe.formatValueList, "{", objectDisplayName); ProcessActiveAssociationList(so, currentLevel, activeAssociationList, AddIndentationLevel(fe.formatValueList)); AddEpilogue(fe.formatValueList, "}"); }