Esempio n. 1
0
        private static void FillFixtureOverview(Model.Service.Model.FixtureOverview to, Model.Interface.IFixtureOverview from)
        {
            to.Id             = from.Id;
            to.IsStreaming    = from.ListenerOverview.IsStreaming.GetValueOrDefault();
            to.IsInErrorState = from.ListenerOverview.IsErrored.GetValueOrDefault();
            to.StartTime      = from.ListenerOverview.StartTime.GetValueOrDefault();
            to.Competition    = from.CompetitionName;
            to.CompetitionId  = from.CompetitionId;
            to.Description    = from.Name;

            if (from.ListenerOverview.MatchStatus.HasValue)
            {
                switch (from.ListenerOverview.MatchStatus)
                {
                case Integration.Adapter.Model.Enums.MatchStatus.InRunning:
                    to.State = FixtureState.Running;
                    break;

                case Integration.Adapter.Model.Enums.MatchStatus.MatchOver:
                    to.State = FixtureState.Over;
                    break;

                case Integration.Adapter.Model.Enums.MatchStatus.Prematch:
                    to.State = FixtureState.PreMatch;
                    break;

                case Integration.Adapter.Model.Enums.MatchStatus.Ready:
                    to.State = FixtureState.Ready;
                    break;

                case Integration.Adapter.Model.Enums.MatchStatus.Setup:
                    to.State = FixtureState.Setup;
                    break;
                }
            }
        }
Esempio n. 2
0
 private static Model.Service.Model.Interface.IFixtureOverview CreateFixtureOverview(Model.Interface.IFixtureOverview fixture)
 {
     Model.Service.Model.FixtureOverview ret = new Model.Service.Model.FixtureOverview();
     FillFixtureOverview(ret, fixture);
     return(ret);
 }
 private static Model.Service.Model.Interface.IFixtureOverview CreateFixtureOverview(Model.Interface.IFixtureOverview fixture)
 {
     Model.Service.Model.FixtureOverview ret = new Model.Service.Model.FixtureOverview();
     FillFixtureOverview(ret, fixture);
     return ret;
 }