Exemplo n.º 1
0
        public static void Init(IDatabase db)
        {
            if(Instance != null) {
                return;
            }

            Instance = new SharedServices();
            Instance.CategoryService = ServiceFactory.CreateCategoryService(db);
            Instance.ArtistService = ServiceFactory.CreateArtistService(db);
            Instance.CountryService = ServiceFactory.CreateCountryService(db);
            Instance.VenueService = ServiceFactory.CreateVenueService(db);
            Instance.UserService = ServiceFactory.CreateUserService(db);
            Instance.PerformanceService = ServiceFactory.CreatePerformanceService(db);
        }
Exemplo n.º 2
0
        public static void Init(RestClient client)
        {
            if (Instance != null)
            {
                return;
            }

            Instance = new SharedServices();
            Instance.CategoryService = new CategoryWebService(client);
            Instance.ArtistService = new ArtistWebService(client);
            Instance.CountryService = new CountryWebService(client);
            Instance.VenueService = new VenueWebService(client);
            Instance.UserService = new UserWebService(client);
            Instance.PerformanceService = new PerformanceWebService(client);
        }