summaryrefslogtreecommitdiff
path: root/slips/src/app/Marina/Web/Services/CatalogWebServices.cs
blob: 6982cdd6ef14e0e97f69da45202d013af8279f6a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System.Collections.Generic;
using System.Web.Services;
using Marina.Infrastructure.Container;
using Marina.Presentation.DTO;
using Marina.Task;

namespace Marina.Web.Services {
	public class CatalogWebServices {
		public CatalogWebServices() : this( Resolve.DependencyFor< ICatalogTasks >( ) ) {}

		public CatalogWebServices( ICatalogTasks underlyingTask ) {
			_underlyingTask = underlyingTask;
		}

		public IEnumerable< SlipDisplayDTO > GetAvailableSlipsForDockBy( long dockId ) {
			return _underlyingTask.GetAvailableSlipsForDockBy( dockId );
		}

		[WebMethod]
		public DockDisplayDTO GetDockInformationBy( long dockId ) {
			return _underlyingTask.GetDockInformationBy( dockId );
		}

		public IEnumerable< SlipDisplayDTO > GetAllAvailableSlips() {
			return _underlyingTask.GetAllAvailableSlips( );
		}

		[WebMethod]
		public SlipDisplayDTO FindSlipBy( long slipId ) {
			return _underlyingTask.FindSlipBy( slipId );
		}

		private readonly ICatalogTasks _underlyingTask;
	}
}