public BrokenValuePropertyInfo(string fullName, string name, string errorMessage, IExpandablePropertyInfo parent) { FullName = fullName; Name = name; Value = errorMessage; Parent = parent; }
public IPropertyInfo Create(DEBUG_PROPERTY_INFO propertyInfo, IExpandablePropertyInfo parent) { if (propertyInfo.dwAttrib.HasFlag(enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_OBJ_IS_EXPANDABLE)) { return(new ExpandablePropertyInfo(propertyInfo, parent)); } else { if (propertyInfo.dwAttrib.HasFlag(enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_VALUE_ERROR)) { // evaluate fetched properties return(new BrokenValuePropertyInfo(propertyInfo.bstrFullName, propertyInfo.bstrName, propertyInfo.bstrValue, parent)); } else if (propertyInfo.bstrName == null && propertyInfo.bstrType == null && propertyInfo.bstrValue == null) { return(new BrokenValuePropertyInfo("<Name is null>", "<Name is null>", "<Value is null>", parent)); } else { return(new ValuePropertyInfo(propertyInfo.bstrFullName, propertyInfo.bstrName, propertyInfo.bstrType, propertyInfo.bstrValue, parent)); } } }
public UnevaluatedPropertyInfo(string fullName, string name, string valueType, IExpandablePropertyInfo parent) { FullName = fullName; Name = name; ValueType = valueType; Parent = parent; }
static DebugPropertyViewModel From(IExpandablePropertyInfo debugPropertyInfo) { DebugPropertyViewModel vm = new DebugPropertyViewModel() { Name = debugPropertyInfo.Name, Value = "Expandable", ValueType = debugPropertyInfo.ValueType, FullName = debugPropertyInfo.FullName, Parents = ListParents(debugPropertyInfo) }; return(vm); }
private static IEnumerable <string> ListParents(IPropertyInfo debugPropertyInfo) { List <string> parents = new List <string>(); IExpandablePropertyInfo parent = debugPropertyInfo.Parent; while (parent != null) { parents.Insert(0, parent.Name); parent = parent.Parent; } return(parents); }
private IPropertyInfo[] GetChildren(IDebugProperty2 debugProperty, IExpandablePropertyInfo parent) { var logger = Logger.GetLogger(); logger.Info("EnumChildren"); IEnumDebugPropertyInfo2 debugPropertyEnum; debugProperty.EnumChildren( enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_STANDARD | enum_DEBUGPROP_INFO_FLAGS.DEBUGPROP_INFO_FULLNAME, 10, dbgGuids.guidFilterLocals, enum_DBG_ATTRIB_FLAGS.DBG_ATTRIB_ALL, "", Configuration.DefaultTimeoutForVSCalls, out debugPropertyEnum).ThrowOnFailure(); uint count; debugPropertyEnum.GetCount(out count).ThrowOnFailure(); DEBUG_PROPERTY_INFO[] debugPropInfos = new DEBUG_PROPERTY_INFO[ITEMS_TO_FETCH]; uint fetched; logger.Info($"Fetch children"); List <IPropertyInfo> result = new List <IPropertyInfo>(); do { // TODO: Performance bottlneck debugPropertyEnum.Next(ITEMS_TO_FETCH, debugPropInfos, out fetched).ThrowOnFailure(); logger.Info("Received next {0} of children", ITEMS_TO_FETCH); foreach (var p in debugPropInfos.Take((int)fetched)) { // this properties are not evaluated var child = _propertyInfoFactory.Create(p, parent); logger.Info("Returning property: '{0}'", child.Name); result.Add(child); } } while (fetched >= ITEMS_TO_FETCH); logger.Info("All children returned"); return(result.ToArray()); }
private ValuePropertyInfo(string fullName, string name, string valueType, string value, bool isEvaluated, IExpandablePropertyInfo parent) { if (String.IsNullOrEmpty(fullName) || String.IsNullOrEmpty(name) || String.IsNullOrEmpty(valueType)) { throw new InvalidOperationException("Name and ValueType should not be null"); } Name = name; ValueType = valueType; FullName = fullName; IsEvaluated = isEvaluated; _value = value; Parent = parent; }
private void ExpandableProperyVisited(IExpandablePropertyInfo prop) { // nothing to do }
internal IUnevaluatedPropertyInfo CreateUnevaluated(DEBUG_PROPERTY_INFO propertyInfo, IExpandablePropertyInfo parent) { return(new UnevaluatedPropertyInfo(propertyInfo.bstrFullName, propertyInfo.bstrName, propertyInfo.bstrType, parent)); }
public virtual void ParentPropertyAttended(IExpandablePropertyInfo expandablePropertyInfo) { _expandablePropertyAttended(expandablePropertyInfo); }
public ExpandablePropertyInfo(Microsoft.VisualStudio.Debugger.Interop.DEBUG_PROPERTY_INFO propertyInfo, IExpandablePropertyInfo parent) { this.propertyInfo = propertyInfo; Parent = parent; }
public void ParentPropertyAttended(IExpandablePropertyInfo expandablePropertyInfo) { CheckAndReleasePropertiesInfoList(); _propertyInfos.Add(expandablePropertyInfo); }
public ValuePropertyInfo(string fullName, string name, string valueType, string value, IExpandablePropertyInfo parent) : this(fullName, name, valueType, value, true, parent) { }