internal WideControlEntryItem(WideControlEntryDefinition definition) : this() { FieldPropertyToken fpt = definition.formatTokenList[0] as FieldPropertyToken; if (fpt != null) { DisplayEntry = new DisplayEntry(fpt.expression); FormatString = fpt.fieldFormattingDirective.formatString; } if (definition.appliesTo != null) { EntrySelectedBy = EntrySelectedBy.Get(definition.appliesTo.referenceList); } }
internal WideControlEntryItem(WideControlEntryDefinition definition) { this._selectedBy = new List <string>(); FieldPropertyToken token = definition.formatTokenList[0] as FieldPropertyToken; if (token != null) { if (token.expression.isScriptBlock) { this._entry = new System.Management.Automation.DisplayEntry(token.expression.expressionValue, DisplayEntryValueType.ScriptBlock); } else { this._entry = new System.Management.Automation.DisplayEntry(token.expression.expressionValue, DisplayEntryValueType.Property); } } if (definition.appliesTo != null) { foreach (TypeOrGroupReference reference in definition.appliesTo.referenceList) { this._selectedBy.Add(reference.name); } } }