Esempio n. 1
0
        /// <summary>
        /// This is the main entry point for your service instance.
        /// </summary>
        /// <param name="cancellationToken">Canceled when Service Fabric needs to shut down this service instance.</param>
        protected override async Task RunAsync(CancellationToken cancellationToken)
        {
            ICupService service = ServiceProxy
                                  .Create <ICupService>(new Uri("fabric:/CricketManager/CupService"),
                                                        new ServicePartitionKey(1)); //, new ServicePartitionKey(1)

            try
            {
                List <Cup.Domain.Core.AggregatesModel.CupAggregate.Cup> cups = await service.GetActiveCups();

                var a = 1;
            }
            catch (Exception e)
            {
            }


            // TODO: Replace the following sample code with your own logic
            //       or remove this RunAsync override if it's not needed in your service.

            //long iterations = 0;

            //while (true)
            //{
            //    cancellationToken.ThrowIfCancellationRequested();

            //    ServiceEventSource.Current.ServiceMessage(this.Context, "Working-{0}", ++iterations);

            //    await Task.Delay(TimeSpan.FromSeconds(1), cancellationToken);
            //}
        }
Esempio n. 2
0
 public ScoreDriver(IScoreService scoreService, ICupService cupService, IEventService eventService, ITeamService teamService)
 {
     _scoreService = scoreService;
     _cupService   = cupService;
     _eventService = eventService;
     _teamService  = teamService;
 }
Esempio n. 3
0
        public async Task <IActionResult> Get()
        {
            List <Class> votes = new List <Class>();

            votes.Add(new Class(Guid.NewGuid()));
            votes.Add(new Class(Guid.NewGuid()));

            //var proxyLocation = new ServiceUriBuilder("MasterDataMService");
            //var masterDataService = ServiceProxy.Create<IMasterDataMService>(proxyLocation.ToUri());

            //var result = await masterDataService.GetMasterDataByName(interfaceName);

            ICupService service = ServiceProxy
                                  .Create <ICupService>(new Uri("fabric:/CricketManager/CupService"),
                                                        new ServicePartitionKey(1)); //, new ServicePartitionKey(1)

            try
            {
                List <Cup.Domain.Core.AggregatesModel.CupAggregate.Cup> cups = await service.GetActiveCups();

                return(Json(cups));
            } catch (Exception e)
            {
            }


            return(Json(votes));
        }
Esempio n. 4
0
        static void Main(string[] args)
        {
            ICupService cupService = ServiceProxy.Create <ICupService>(new Uri("fabric:/CricketManager/Cup.Service"));

            Task <List <Cup.Domain.Core.AggregatesModel.CupAggregate.Cup> > task = cupService.GetActiveCups();

            Console.Write(task.Result);
            Console.ReadLine();
        }
 public FixturesController(ICompetitionService competitionService,
     IFixtureService fixtureService,
     ITeamService teamService,
     ICupService cupService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.cupService         = cupService;
 }
Esempio n. 6
0
 public FixturesController(ICompetitionService competitionService,
                           IFixtureService fixtureService,
                           ITeamService teamService,
                           ICupService cupService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.cupService         = cupService;
 }
Esempio n. 7
0
        public CupAdminController(IOrchardServices orchardServices, ICupService cupService, IEventService eventService, ISiteService siteService, IShapeFactory shapeFactory)
        {
            _orchardServices = orchardServices;
            _siteService     = siteService;
            _cupService      = cupService;
            _eventService    = eventService;

            Shape = shapeFactory;
            T     = NullLocalizer.Instance;
        }
        public CupLeaguesController(ICupLeagueService cupLeagueService, 
            ICupService cupService,
            ICompetitionService competitionService)
        {
            Check.Require(cupLeagueService != null, "cupLeagueService may not be null");
            Check.Require(cupService != null, "cupService may not be null");
            Check.Require(competitionService != null, "competitionService may not be null");

            this.cupLeagueService   = cupLeagueService;
            this.cupService         = cupService;
            this.competitionService = competitionService;
        }
        public CupLeaguesController(ICupLeagueService cupLeagueService,
                                    ICupService cupService,
                                    ICompetitionService competitionService)
        {
            Check.Require(cupLeagueService != null, "cupLeagueService may not be null");
            Check.Require(cupService != null, "cupService may not be null");
            Check.Require(competitionService != null, "competitionService may not be null");

            this.cupLeagueService   = cupLeagueService;
            this.cupService         = cupService;
            this.competitionService = competitionService;
        }
 public HomeController(INewsService newsService,
     ICompetitionService competitionService,
     IStatsReportingService statsReportingService,
     IFixtureService fixtureService,
     IEventService eventService,
     ICupService cupService)
 {
     this.newsService           = newsService;
     this.competitionService    = competitionService;
     this.statsReportingService = statsReportingService;
     this.fixtureService        = fixtureService;
     this.eventService          = eventService;
     this.cupService            = cupService;
 }
 public HomeController(INewsService newsService,
                       ICompetitionService competitionService,
                       IStatsReportingService statsReportingService,
                       IFixtureService fixtureService,
                       IEventService eventService,
                       ICupService cupService)
 {
     this.newsService           = newsService;
     this.competitionService    = competitionService;
     this.statsReportingService = statsReportingService;
     this.fixtureService        = fixtureService;
     this.eventService          = eventService;
     this.cupService            = cupService;
 }
Esempio n. 12
0
        public CupWinnersController(ICupWinnerService cupWinnerService,
                                    ICupService cupService,
                                    ITeamService teamService,
                                    ICompetitionService competitionService)
        {
            Check.Require(cupWinnerService != null, "leagueWinnerService may not be null");
            Check.Require(cupService != null, "leagueService may not be null");
            Check.Require(teamService != null, "teamService may not be null");
            Check.Require(competitionService != null, "competitionService may not be null");

            this.cupWinnerService   = cupWinnerService;
            this.cupService         = cupService;
            this.teamService        = teamService;
            this.competitionService = competitionService;
        }
        public CupWinnersController(ICupWinnerService cupWinnerService,
            ICupService cupService,
            ITeamService teamService,
            ICompetitionService competitionService)
        {
            Check.Require(cupWinnerService        != null, "leagueWinnerService may not be null");
            Check.Require(cupService              != null, "leagueService may not be null");
            Check.Require(teamService             != null, "teamService may not be null");
            Check.Require(competitionService      != null, "competitionService may not be null");

            this.cupWinnerService   = cupWinnerService;
            this.cupService         = cupService;
            this.teamService        = teamService;
            this.competitionService = competitionService;
        }
 public FixturesController(ICompetitionService competitionService,
     IFixtureService fixtureService,
     ITeamService teamService,
     IRefereeService refereeService,
     IMembershipService membershipService,
     ICupService cupService,
     IOneOffVenueService oneOffVenueService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.refereeService     = refereeService;
     this.membershipService  = membershipService;
     this.cupService         = cupService;
     this.oneOffVenueService    = oneOffVenueService;
 }
 public FixturesController(ICompetitionService competitionService,
                           IFixtureService fixtureService,
                           ITeamService teamService,
                           IRefereeService refereeService,
                           IMembershipService membershipService,
                           ICupService cupService,
                           IOneOffVenueService oneOffVenueService)
 {
     this.competitionService = competitionService;
     this.fixtureService     = fixtureService;
     this.teamService        = teamService;
     this.refereeService     = refereeService;
     this.membershipService  = membershipService;
     this.cupService         = cupService;
     this.oneOffVenueService = oneOffVenueService;
 }
        public CupController(ICupService cupService)
        {
            Check.Require(cupService != null, "cupService may not be null");

             this.cupService = cupService;
        }
Esempio n. 17
0
 public TeamDriver(ITeamService teamService, IAttendeeService attendeeService, ICupService cupService)
 {
     _teamService     = teamService;
     _attendeeService = attendeeService;
     _cupService      = cupService;
 }
Esempio n. 18
0
 public CupController(IDreamLeagueContext db, ICupService cupService)
 {
     this.db         = db;
     this.cupService = cupService;
 }
Esempio n. 19
0
 public CupController()
 {
     this.db         = new DreamLeagueContext();
     this.cupService = new CupService(db, new XMLGameWeekSerializer <CupWeekSummary>());
 }
 public ViewCupController(ICupService cupService, IStatsReportingService statsReportingService, ICompetitionService competitionService)
 {
     this.cupService            = cupService;
     this.statsReportingService = statsReportingService;
     this.competitionService    = competitionService;
 }
 public ViewCupController(ICupService cupService, IStatsReportingService statsReportingService, ICompetitionService competitionService)
 {
     this.cupService            = cupService;
     this.statsReportingService = statsReportingService;
     this.competitionService    = competitionService;
 }
Esempio n. 22
0
 public CupController(IDbService dbService, ICupService cupService)
 {
     _dbService  = dbService;
     _cupService = cupService;
 }
Esempio n. 23
0
 public HomeController(ICupService cupService, IScoreService scoreService, ITeamService teamService)
 {
     _cupService   = cupService;
     _scoreService = scoreService;
     _teamService  = teamService;
 }
        public CupController(ICupService cupService)
        {
            Check.Require(cupService != null, "cupService may not be null");

            this.cupService = cupService;
        }
Esempio n. 25
0
 public CupDriver(ICupService gameService, IEventService eventService)
 {
     _gameService  = gameService;
     _eventService = eventService;
 }