PageRenderTime 66ms CodeModel.GetById 24ms RepoModel.GetById 0ms app.codeStats 1ms

/src/Core/List.cs

https://bitbucket.org/tuldok89/openpdn
C# | 42 lines | 27 code | 3 blank | 12 comment | 0 complexity | 8c0a2b64470f5165b9d31477fee36363 MD5 | raw file
  1. /////////////////////////////////////////////////////////////////////////////////
  2. // Paint.NET //
  3. // Copyright (C) dotPDN LLC, Rick Brewster, Tom Jackson, and contributors. //
  4. // Portions Copyright (C) Microsoft Corporation. All Rights Reserved. //
  5. // See src/Resources/Files/License.txt for full licensing and attribution //
  6. // details. //
  7. // . //
  8. /////////////////////////////////////////////////////////////////////////////////
  9. namespace PaintDotNet
  10. {
  11. /// <summary>
  12. /// A very simple linked-list class, done functional style. Use null for
  13. /// the tail to indicate the end of a list.
  14. /// </summary>
  15. public sealed class List
  16. {
  17. private readonly object _head;
  18. public object Head
  19. {
  20. get
  21. {
  22. return _head;
  23. }
  24. }
  25. private readonly List _tail;
  26. public List Tail
  27. {
  28. get
  29. {
  30. return _tail;
  31. }
  32. }
  33. public List(object head, List tail)
  34. {
  35. _head = head;
  36. _tail = tail;
  37. }
  38. }
  39. }