Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel.Composition;
- using System.Linq;
- using System.Threading;
- using Castel.SharedClientLibrary.Model;
- namespace Castel.SharedClientLibrary.Services.Stubs
- {
- [PartCreationPolicy(CreationPolicy.Shared)]
- #if USE_STUBS
- [Export(typeof (IAdministrationService))]
- #endif
- public class AdministrationServiceStub : IAdministrationService
- {
- public IList<IApplicationUser> GetAllApplicationUsers()
- {
- //Thread.Sleep(2500);
- return new List<IApplicationUser>
- {
- new ApplicationUser
- {FriendlyName = "Giorgio G.", Password = "12345", Username = "giorgiog", UserId = 1},
- new ApplicationUser
- {FriendlyName = "Dave C.", Password = "12345", Username = "davec", UserId = 2},
- new ApplicationUser
- {FriendlyName = "Rachid C.", Password = "12345", Username = "rachidc", UserId = 3},
- new ApplicationUser
- {FriendlyName = "John R.", Password = "12345", Username = "johnr", UserId = 4},
- new ApplicationUser
- {FriendlyName = "Andy K.", Password = "12345", Username = "andyk", UserId = 5},
- };
- }
- public IApplicationUser GetUser(int userId)
- {
- return GetAllApplicationUsers().Where(x => x.UserId == userId).FirstOrDefault();
- }
- public IApplicationSettings GetApplicationSettings(int profileId)
- {
- IApplicationSettings appSettings = new ApplicationSettings();
- appSettings.OwnerId = 12345;
- appSettings.ProfileName = "Profile One";
- appSettings.Settings = new List<IUniversalSettings>
- {
- new UniversalSettings
- {
- Count = 2,
- Emotion = "Anger",
- Enable = "Y",
- Logic = "OR",
- Normal = "3",
- Range = "0-50",
- Segments = 20,
- Threshold = "NA",
- YellowHigh = "4",
- YellowLow = "1"
- },
- new UniversalSettings
- {
- Count = 3,
- Emotion = "Upset",
- Enable = "Y",
- Logic = "OR",
- Normal = "3",
- Range = "0-50",
- Segments = 20,
- Threshold = "NA",
- YellowHigh = "4",
- YellowLow = "1"
- },
- new UniversalSettings
- {
- Count = 4,
- Emotion = "Voice Energy",
- Enable = "Y",
- Logic = "OR",
- Normal = "3",
- Range = "0-50",
- Segments = 20,
- Threshold = "NA",
- YellowHigh = "4",
- YellowLow = "1"
- },
- new UniversalSettings
- {
- Count = 5,
- Emotion = "Excitement",
- Enable = "N",
- Logic = "OR",
- Normal = "3",
- Range = "0-50",
- Segments = 20,
- Threshold = "NA",
- YellowHigh = "4",
- YellowLow = "1"
- },
- };
- return appSettings;
- }
- //public IApplicationSettings GetApplicationSettings(string profileName)
- //{
- // //return new ApplicationSettings(){ProfileName = "Base Profile", BorderFileName = "border.file", Count = 4, Emotion = };
- // return new ApplicationSettings();
- //}
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement