Fix the build.
[castle.git] / Experiments / Castle.Igloo / Igloo.Clinic.Services / Impl / PatientService.cs
blob7b4c10862569c5078ac9cda81348fac704b552e2
2 using System.Collections;
3 using System.Collections.Generic;
4 using Castle.Igloo;
5 using Castle.Igloo.Attributes;
6 using Igloo.Clinic.Domain;
7 using Igloo.Clinic.Services.Interfaces;
9 namespace Igloo.Clinic.Services.Impl
11 /// <summary>
12 /// This component is a singleton
13 /// The component cart is session scope so a proxy will be injected
14 /// </summary>
15 [Scope(Scope = ScopeType.Application)]
16 public class PatientService : IPatientService
18 private ICart _cart = null;
20 public PatientService(ICart cart)
22 _cart = cart;
26 public IList<Patient> RetrievePatients(Doctor doctor)
28 IList<Patient> patients = new List<Patient>();
30 int i = _cart.Count;
32 if (doctor.Name == "NO")
34 Patient patient = new Patient();
35 patient.Name = "James Bond";
36 patient.Address = "Jamaica";
37 patients.Add(patient);
39 patient = new Patient();
40 patient.Name = "Felix Leiter";
41 patient.Address = "New York";
42 patients.Add(patient);
44 patient = new Patient();
45 patient.Name = "Miss Moneypenny";
46 patient.Address = "London";
47 patients.Add(patient);
50 return patients;