PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Debugger/ILSpy.Debugger/Models/TreeModel/IEnumerableNode.cs

http://github.com/icsharpcode/ILSpy
C# | 29 lines | 21 code | 3 blank | 5 comment | 0 complexity | 187d388f3bf6df72b2acfa39d081b715 MD5 | raw file
 1// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 2// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 3using System;
 4using Debugger.MetaData;
 5using ICSharpCode.NRefactory.CSharp;
 6using ICSharpCode.ILSpy.Debugger.Services.Debugger;
 7
 8namespace ICSharpCode.ILSpy.Debugger.Models.TreeModel
 9{
10	/// <summary>
11	/// IEnumerable node in the variable tree.
12	/// </summary>
13	internal class IEnumerableNode : TreeNode
14	{
15		Expression targetObject;
16		Expression debugListExpression;
17		
18		public IEnumerableNode(Expression targetObject, DebugType itemType)
19		{
20			this.targetObject = targetObject;
21			
22			this.Name = "IEnumerable";
23			this.Text = "Expanding will enumerate the IEnumerable";
24			DebugType debugListType;
25			this.debugListExpression = DebuggerHelpers.CreateDebugListExpression(targetObject, itemType, out debugListType);
26			this.ChildNodes = Utils.LazyGetItemsOfIList(this.debugListExpression);
27		}
28	}
29}