PageRenderTime 53ms CodeModel.GetById 20ms RepoModel.GetById 0ms app.codeStats 0ms

/Main/src/DynamicDataDisplay/DataSources/OneDimensional/RawPointEnumerator.cs

#
C# | 29 lines | 21 code | 6 blank | 2 comment | 0 complexity | 039807afd002d254574eda7c14eaea47 MD5 | raw file
Possible License(s): CC-BY-SA-3.0
  1. using System.Collections;
  2. using System.Windows;
  3. namespace Microsoft.Research.DynamicDataDisplay.DataSources
  4. {
  5. public sealed class RawPointEnumerator : IPointEnumerator {
  6. private readonly IEnumerator enumerator;
  7. public RawPointEnumerator(RawDataSource dataSource) {
  8. this.enumerator = dataSource.Data.GetEnumerator();
  9. }
  10. public bool MoveNext() {
  11. return enumerator.MoveNext();
  12. }
  13. public void GetCurrent(ref Point p) {
  14. p = (Point)enumerator.Current;
  15. }
  16. public void ApplyMappings(DependencyObject target) {
  17. // do nothing here - no mapping supported
  18. }
  19. public void Dispose() {
  20. // do nothing here
  21. }
  22. }
  23. }