Пример #1
0
        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);
        }
Пример #2
0
 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);
 }
Пример #3
0
 public ScriptPropertyCollection(ScriptDebugger debugger)
 {
     Log.Debug("debugger");
     foreach (var keyVal in debugger.Variables)
     {
         var val = keyVal.Value;
         Add(ScriptPropertyFactory.MakeProperty(debugger, keyVal.Key, val));
     }
 }
Пример #4
0
        protected override IEnumerable <ScriptProperty> GetChildren()
        {
            int i = 0;

            foreach (var item in _enumerable)
            {
                yield return(ScriptPropertyFactory.MakeProperty(_debugger, String.Format("[{0}]", i), item));

                i++;
            }
        }
Пример #5
0
        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));
            }
        }
Пример #6
0
        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))));
        }