Last change
on this file since 6703 was
6452,
checked in by cneumuel, 14 years ago
|
#1233
- renamed UptimeCalendar and Appointment to Downtime
- added service methods to delete plugins and get plugin by hash
- made reverted TransactionManager change, made it non-static and added interface
- moved magic numbers to application settings
|
File size:
1.2 KB
|
Rev | Line | |
---|
[5404] | 1 | using System;
|
---|
[5526] | 2 | using HeuristicLab.Services.Hive;
|
---|
[5404] | 3 |
|
---|
| 4 | namespace HeuristicLab.Clients.Hive.Tests {
|
---|
[6452] | 5 | public class MockServiceLocator : IServiceLocator {
|
---|
[5526] | 6 | private string username;
|
---|
| 7 | public string Username {
|
---|
| 8 | get { return username; }
|
---|
| 9 | set { username = value; }
|
---|
[5404] | 10 | }
|
---|
[5405] | 11 |
|
---|
[5526] | 12 | private string password;
|
---|
| 13 | public string Password {
|
---|
| 14 | get { return password; }
|
---|
| 15 | set { password = value; }
|
---|
[5405] | 16 | }
|
---|
[5526] | 17 |
|
---|
[5599] | 18 | public HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService GetService() {
|
---|
| 19 | HiveService service = new HeuristicLab.Services.Hive.HiveService();
|
---|
| 20 | return service;
|
---|
[5526] | 21 | }
|
---|
| 22 |
|
---|
[5599] | 23 | public void CallHiveService(Action<HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService> call) {
|
---|
[5526] | 24 | call(GetService());
|
---|
| 25 | }
|
---|
| 26 |
|
---|
[5599] | 27 | public T CallHiveService<T>(Func<HeuristicLab.Services.Hive.Common.ServiceContracts.IHiveService, T> call) {
|
---|
[5526] | 28 | return call(GetService());
|
---|
| 29 | }
|
---|
[6452] | 30 |
|
---|
| 31 | #region IServiceLocator Members
|
---|
| 32 |
|
---|
| 33 | public void CallHiveService(Action<IHiveService> call) {
|
---|
| 34 | // how to do this?
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 | public T CallHiveService<T>(Func<IHiveService, T> call) {
|
---|
| 38 | // how to do this?
|
---|
| 39 | throw new NotImplementedException();
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 | #endregion
|
---|
[5404] | 43 | }
|
---|
| 44 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.