Exemple #1
0
    public static void Configure()
    {
        Enabled = ServerConfiguration.GetSetting("factions.enabled", false);

        if (Enabled)
        {
            GenericPersistence.Register("Factions", Serialize, Deserialize);
        }
    }
Exemple #2
0
    // 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);
    }
Exemple #3
0
        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);
            }
        }
Exemple #4
0
        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);
            }
        }
Exemple #7
0
        /// <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)
            {
            }
        }
Exemple #8
0
 public AdminHandler()
 {
     adminHandler = new GenericPersistence <string, Admin>(adminURI);
 }
Exemple #9
0
 public static void Configure()
 {
     GenericPersistence.Register("StealableArtifacts", Serialize, Deserialize);
 }
Exemple #10
0
 public ParticipantHandler()
 {
     //ParticipantCreatorViewModel = new ParticipantCreatorViewModel();
     participantFacade = new GenericPersistence <string, Participant>(ParticipantURI);
 }
Exemple #11
0
 public static void Configure()
 {
     GenericPersistence.Register("AchievementSystem", Serialize, Deserialize);
 }
Exemple #12
0
 public SpeakerHandler()
 {
     SpeakerFacade = new GenericPersistence <string, Speaker>(SpeakerURI);
 }
Exemple #13
0
 public EventCatalog(GenericPersistence <int, Event> eventPersistence)
 {
     _collection       = new ObservableCollection <Event>();
     Collection        = new ReadOnlyObservableCollection <Event>(_collection);
     _eventPersistence = eventPersistence;
 }