protected override IEnumerable <ScriptProperty> GetChildren() { Runspace.DefaultRunspace = _debugger.Runspace; var proeprties = new List <ScriptProperty>(); foreach (var prop in _psObject.Properties) { if (proeprties.Any(m => m.Name == prop.Name)) { continue; } object val; try { val = prop.Value; } catch { val = "Failed to evaluate value."; } proeprties.Add(ScriptPropertyFactory.MakeProperty(_debugger, prop.Name, val)); } return(proeprties); }
public int EvaluateSync(enum_EVALFLAGS dwFlags, uint dwTimeout, IDebugEventCallback2 pExprCallback, out IDebugProperty2 ppResult) { Log.Debug("EvaluateSync"); ppResult = ScriptPropertyFactory.MakeProperty(_debugger, _var, string.Empty); // no parent path return(VSConstants.S_OK); }
public ScriptPropertyCollection(ScriptDebugger debugger) { Log.Debug("debugger"); foreach (var keyVal in debugger.Variables) { var val = keyVal.Value; Add(ScriptPropertyFactory.MakeProperty(debugger, keyVal.Key, val)); } }
protected override IEnumerable <ScriptProperty> GetChildren() { int i = 0; foreach (var item in _enumerable) { yield return(ScriptPropertyFactory.MakeProperty(_debugger, String.Format("[{0}]", i), item)); i++; } }
protected override IEnumerable <ScriptProperty> GetChildren() { string varFullName = string.IsNullOrEmpty(_path) ? _val : string.Format("{0}\\{1}", _path, _val); Collection <Variable> propVars = _debugger.DebuggingService.GetPSObjectVariable(varFullName); foreach (var item in propVars) { yield return(ScriptPropertyFactory.MakeProperty(_debugger, item, varFullName)); } }
protected virtual IEnumerable <ScriptProperty> GetChildren() { var props = Value.GetType().GetProperties(BindingFlags.Public | BindingFlags.Instance); return(props.Select(propertyInfo => ScriptPropertyFactory.MakeProperty(_debugger, propertyInfo.Name, propertyInfo.GetValue(Value, null)))); }