public static void Configure() { Enabled = ServerConfiguration.GetSetting("factions.enabled", false); if (Enabled) { GenericPersistence.Register("Factions", Serialize, Deserialize); } }
// This does not do the actual work of creating faction stuff, only turns on the persistence. public static void Enable() { if (Enabled) { return; } GenericPersistence.Register("Factions", Serialize, Deserialize); Enabled = true; ServerConfiguration.SetSetting("factions.enabled", true); }
public async Task LoadAdmins() { Admins.Clear(); GenericPersistence <string, Admin> facade = new GenericPersistence <string, Admin>("http://localhost:52415/api/Admins"); List <Admin> adminList = await facade.Get(); foreach (Admin user in adminList) { Admins.Add(user); } }
public async Task LoadSpeakers() { Speakers.Clear(); GenericPersistence <string, Speaker> facade = new GenericPersistence <string, Speaker>("http://localhost:52415/api/Speakers"); List <Speaker> speakerList = await facade.Get(); foreach (Speaker user in speakerList) { Speakers.Add(user); } }
public async Task LoadParticipants() { Participants.Clear(); GenericPersistence <string, Participant> facade = new GenericPersistence <string, Participant>("http://localhost:52415/api/Participants"); List <Participant> participantList = await facade.Get(); foreach (Participant user in participantList) { Participants.Add(user); } }
public async Task LoadUsers() { Users.Clear(); GenericPersistence <string, User> facade = new GenericPersistence <string, User>("http://localhost:52415/api/BasicUsers"); List <User> userList = await facade.Get(); foreach (User user in userList) { Users.Add(user); } }
/// <summary> /// Denne metode loader lokaler fra databasen men blev ikke nøvendig /// på grund af load meyoden i mainViewModel /// </summary> public async Task LoadRooms() { Rooms.Clear(); GenericPersistence <string, Room> roomPersistence = new GenericPersistence <string, Room>("http://localhost:52415/api/Room/"); try { List <Room> rooms = await roomPersistence.Get(); foreach (Room room in rooms) { Rooms.Add(room); } } catch (HttpRequestException) { } }
public AdminHandler() { adminHandler = new GenericPersistence <string, Admin>(adminURI); }
public static void Configure() { GenericPersistence.Register("StealableArtifacts", Serialize, Deserialize); }
public ParticipantHandler() { //ParticipantCreatorViewModel = new ParticipantCreatorViewModel(); participantFacade = new GenericPersistence <string, Participant>(ParticipantURI); }
public static void Configure() { GenericPersistence.Register("AchievementSystem", Serialize, Deserialize); }
public SpeakerHandler() { SpeakerFacade = new GenericPersistence <string, Speaker>(SpeakerURI); }
public EventCatalog(GenericPersistence <int, Event> eventPersistence) { _collection = new ObservableCollection <Event>(); Collection = new ReadOnlyObservableCollection <Event>(_collection); _eventPersistence = eventPersistence; }