UriTemplatePathPartiallyEquivalentSet.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. //----------------------------------------------------------------
  2. // Copyright (c) Microsoft Corporation. All rights reserved.
  3. //----------------------------------------------------------------
  4. namespace System
  5. {
  6. using System.Collections.Generic;
  7. // This class was named UriTemplatePathEquivalentSet in the Orcas bits, where it used to
  8. // represent a set of uri templates, which are equivalent in thier path. The introduction
  9. // of terminal defaults, caused it to be no longer true; now it is representing a set
  10. // of templates, which are equivalent in their path till a certian point, which is stored
  11. // in the segmentsCount field. To highlight that fact the class was renamed as
  12. // UriTemplatePathPartiallyEquivalentSet.
  13. class UriTemplatePathPartiallyEquivalentSet
  14. {
  15. List<KeyValuePair<UriTemplate, object>> kvps;
  16. int segmentsCount;
  17. public UriTemplatePathPartiallyEquivalentSet(int segmentsCount)
  18. {
  19. this.segmentsCount = segmentsCount;
  20. this.kvps = new List<KeyValuePair<UriTemplate, object>>();
  21. }
  22. public List<KeyValuePair<UriTemplate, object>> Items
  23. {
  24. get
  25. {
  26. return this.kvps;
  27. }
  28. }
  29. public int SegmentsCount
  30. {
  31. get
  32. {
  33. return this.segmentsCount;
  34. }
  35. }
  36. }
  37. }