public Layer(string name, string title, IGridSet gridset,IProvider provider, ICache cache = null, ITileFilter cacheFilter = null) { // Set name if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("Layer Name cannot be null"); this._name = name; // Set title this._title = title; // Set GridSet if (gridset == null) throw new ArgumentNullException("Layer GridSet cannot be null"); this._gridSet = gridset; // Set Cache this._cache = cache; // Set Provider if (provider == null) throw new ArgumentNullException("Layer Provider cannot be null"); this._provider = provider; this._cacheFitler = cacheFilter; }
// builds bare bones layer object with mocks public LayerBuilder Initialize() { var mockProvider = new Mock<IProvider>(); mockProvider.Setup(m => m.GetFormats()).Returns(new List<string>()); var mockGridSet = new Mock<IGridSet>(); mockGridSet.Setup(m => m.Resolutions.Count).Returns(1); mockGridSet.Setup(m => m.Envelope).Returns(new Envelope(0, 0, 0, 0)); var mockCache = new Mock<ICache>(); this._name = "test"; this._gridSet = mockGridSet.Object; this._provider = mockProvider.Object; this._cache = mockCache.Object; return this; }
public LayerBuilder SetGridSet(IGridSet gridSet) { this._gridSet = gridSet; return this; }