2 using System
.Collections
;
3 using System
.Collections
.Generic
;
5 using Castle
.Igloo
.Attributes
;
6 using Igloo
.Clinic
.Domain
;
7 using Igloo
.Clinic
.Services
.Interfaces
;
9 namespace Igloo
.Clinic
.Services
.Impl
12 /// This component is a singleton
13 /// The component cart is session scope so a proxy will be injected
15 [Scope(Scope
= ScopeType
.Application
)]
16 public class PatientService
: IPatientService
18 private ICart _cart
= null;
20 public PatientService(ICart cart
)
26 public IList
<Patient
> RetrievePatients(Doctor doctor
)
28 IList
<Patient
> patients
= new List
<Patient
>();
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
);