コード例 #1
0
		/// <summary>
		/// Fills node Content property tree.
		/// </summary>
		private void loadContent(ObjectGraphNode thisNode)
		{
			var contentRoot = new ThisNode();
			thisNode.Content = contentRoot;
			
			// Object graph visualizer: collection support temp disabled (porting to new NRefactory).
			/*DebugType collectionType;
			DebugType itemType;
			if (thisNode.PermanentReference.Type.ResolveIListImplementation(out collectionType, out itemType))
			{
				//AddRawViewNode(contentRoot, thisNode);
				// it is an IList
				LoadNodeCollectionContent(contentRoot, thisNode.Expression, collectionType);
			} else if (thisNode.PermanentReference.Type.ResolveIEnumerableImplementation(out collectionType, out itemType)) {
				//AddRawViewNode(contentRoot, thisNode);
				// it is an IEnumerable
				DebugType debugListType;
				var debugListExpression = new GraphExpression(
					DebuggerHelpers.CreateDebugListExpression(thisNode.Expression.Expr, itemType, out debugListType),
					() => DebuggerHelpers.CreateListFromIEnumerable(thisNode.Expression.GetValue())
				);
				LoadNodeCollectionContent(contentRoot, debugListExpression, debugListType);
			} else*/ {
				// it is an object
				LoadNodeObjectContent(contentRoot, thisNode.Expression, thisNode.PermanentReference.Type);
			}
		}
コード例 #2
0
		/// <summary>
		/// Fills node Content property tree.
		/// </summary>
		/// <param name="thisNode"></param>
		private void loadContent(ObjectGraphNode thisNode)
		{
			var contentRoot = new ThisNode();
			thisNode.Content = contentRoot;
			
			DebugType collectionType;
			DebugType itemType;
			if (thisNode.PermanentReference.Type.ResolveIListImplementation(out collectionType, out itemType))
			{
				//AddRawViewNode(contentRoot, thisNode);
				// it is an IList
				LoadNodeCollectionContent(contentRoot, thisNode.Expression, collectionType);
			} else if (thisNode.PermanentReference.Type.ResolveIEnumerableImplementation(out collectionType, out itemType)) {
				//AddRawViewNode(contentRoot, thisNode);
				// it is an IEnumerable
				DebugType debugListType;
				var debugListExpression = DebuggerHelpers.CreateDebugListExpression(thisNode.Expression, itemType, out debugListType);
				LoadNodeCollectionContent(contentRoot, debugListExpression, debugListType);
			} else {
				// it is an object
				LoadNodeObjectContent(contentRoot, thisNode.Expression, thisNode.PermanentReference.Type);
			}
		}