Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Windows;
|
---|
6 | using System.Diagnostics.CodeAnalysis;
|
---|
7 |
|
---|
8 | namespace Microsoft.Research.DynamicDataDisplay.DataSources
|
---|
9 | {
|
---|
10 | /// <summary>
|
---|
11 | /// Empty data source - for testing purposes, represents data source with 0 points inside.
|
---|
12 | /// </summary>
|
---|
13 | public class EmptyDataSource : IPointDataSource
|
---|
14 | {
|
---|
15 | #region IPointDataSource Members
|
---|
16 |
|
---|
17 | public IPointEnumerator GetEnumerator(DependencyObject context)
|
---|
18 | {
|
---|
19 | return new EmptyPointEnumerator();
|
---|
20 | }
|
---|
21 |
|
---|
22 | [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
---|
23 | private void RaiseDataChanged()
|
---|
24 | {
|
---|
25 | if (DataChanged != null)
|
---|
26 | {
|
---|
27 | DataChanged(this, EventArgs.Empty);
|
---|
28 | }
|
---|
29 | }
|
---|
30 |
|
---|
31 | public event EventHandler DataChanged;
|
---|
32 |
|
---|
33 | #endregion
|
---|
34 |
|
---|
35 | private sealed class EmptyPointEnumerator : IPointEnumerator
|
---|
36 | {
|
---|
37 | public bool MoveNext()
|
---|
38 | {
|
---|
39 | return false;
|
---|
40 | }
|
---|
41 |
|
---|
42 | public void GetCurrent(ref Point p)
|
---|
43 | {
|
---|
44 | // nothing to do
|
---|
45 | }
|
---|
46 |
|
---|
47 | public void ApplyMappings(DependencyObject target)
|
---|
48 | {
|
---|
49 | // nothing to do
|
---|
50 | }
|
---|
51 |
|
---|
52 | public void Dispose() { }
|
---|
53 | }
|
---|
54 | }
|
---|
55 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.