public override AstVisitAction VisitHashtable(HashtableAst hashtableAst)
{
Hashtable hashTable = new Hashtable(StringComparer.InvariantCultureIgnoreCase);
foreach (var pair in hashtableAst.KeyValuePairs)
{
// if we don't have a custom psobject, make sure the value
var val = EvaluateAst(pair.Item2);
var psobjVal = val as PSObject;
if (psobjVal != null && psobjVal.ImmediateBaseObject != null &&
psobjVal.ImmediateBaseObject.GetType() != typeof(PSCustomObject))
{
val = psobjVal.ImmediateBaseObject;
}
hashTable.Add(EvaluateAst(pair.Item1), val);
}
this._pipelineCommandRuntime.WriteObject(hashTable);
return AstVisitAction.SkipChildren;
}