PageRenderTime 7ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/Main/src/DynamicDataDisplay.Maps/Servers/FileServers/ReadonlyTileServer.cs

#
C# | 39 lines | 31 code | 6 blank | 2 comment | 0 complexity | d41bbfe8b5eeb3ef7c848a2e40ded220 MD5 | raw file
 1using System;
 2using System.Collections.Generic;
 3using System.Linq;
 4using System.Text;
 5using System.IO;
 6using System.Windows.Media.Imaging;
 7using System.Windows.Media;
 8
 9namespace Microsoft.Research.DynamicDataDisplay.Charts.Maps
10{
11	public abstract class ReadonlyTileServer : TileServerBase, IWriteableTileServer
12	{
13		private ReadonlyTileCache cache = new ReadonlyTileCache();
14		public ReadonlyTileCache Cache
15		{
16			get { return cache; }
17			protected set { cache = value; }
18		} 
19
20		public override bool Contains(TileIndex id)
21		{
22			return cache.Contains(id);
23		}
24
25		#region ITileStore Members
26
27		public void BeginSaveImage(TileIndex id, BitmapSource image, Stream stream)
28		{
29			// do nothing
30		}
31
32        public void Clear()
33        {
34            // do nothing
35        }
36
37        #endregion
38    }
39}