/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)
  3. using System;
  4. using Debugger.MetaData;
  5. using ICSharpCode.NRefactory.CSharp;
  6. using ICSharpCode.ILSpy.Debugger.Services.Debugger;
  7. namespace ICSharpCode.ILSpy.Debugger.Models.TreeModel
  8. {
  9. /// <summary>
  10. /// IEnumerable node in the variable tree.
  11. /// </summary>
  12. internal class IEnumerableNode : TreeNode
  13. {
  14. Expression targetObject;
  15. Expression debugListExpression;
  16. public IEnumerableNode(Expression targetObject, DebugType itemType)
  17. {
  18. this.targetObject = targetObject;
  19. this.Name = "IEnumerable";
  20. this.Text = "Expanding will enumerate the IEnumerable";
  21. DebugType debugListType;
  22. this.debugListExpression = DebuggerHelpers.CreateDebugListExpression(targetObject, itemType, out debugListType);
  23. this.ChildNodes = Utils.LazyGetItemsOfIList(this.debugListExpression);
  24. }
  25. }
  26. }