public RingGenerator(MMSender senderToWorkFor, RingMetaData ring, DateTime todayDate) { SenderToWorkFor = senderToWorkFor; Ring = ring; TodayDate = todayDate; Init(); }
public RingGenerator(MMSender targetSender, RingMetaData targetRing, DateTime targetDate) { SourceSender = targetSender; TargetRing = targetRing; TargetDate = targetDate; Init(); }
public BalancerUsage(MMSender sender, RingMetaData ring, DateTime targetDate) { Sender = sender; this.MultiMediaDb = sender.DataSet; Ring = ring; PlayerDb = Ring.DataSet; TodaysDate = targetDate; TomorrowsDate = TodaysDate.AddDays(1); }
/// <summary> /// Generates a complete new ring into the provided <paramref name="ring" /> dataset. This should produce a complete 24 hour active ring which has no /// other logic then playing the right things at the right time, independet of the past. /// </summary> /// <param name="db">The source database</param> /// <param name="computerName">The name of the computer this ring is generated for.</param> /// <param name="ring">The target ring where all the generated data should be inserted at.</param> /// <remarks> /// Things which need to be done: /// <para>Set <see cref="RingMetaData.SenderId" /> to the targeting sender id.</para> /// <para>Generate <see cref="PageGroup" />s inside the database.</para> /// <para> /// Generate <see cref="Page" />s with the associated content (<see cref="Text" />, <see cref="Image" /> <see cref="Video" />, /// <see cref="DoubleTransition" />). /// </para> /// <para> /// Generate <see cref="PageSchedule" />s. <see cref="PageSchedule" />s in sequence which belongs to the same <see cref="PageGroup" /> needs to /// have the same <see cref="PageSchedule.PageGroupScheduleId" />. /// </para> /// </remarks> public void Generate(MultiMedia db, string computerName, RingMetaData ring) { MMSender sender = GetMMSenderFromSenderOrComputerName(db, computerName); ring.SenderId = sender.Id; sender.DataSet.SetHasBeenLoaded(); DistributionRoot DistributionRootInstance = new DistributionRoot(db,ring.TargetDate); DistributionRootInstance.PreloadAllForAllTodayAndTomorrowMMunitsIfNotHasBeenLoaded(); BalancerUsage balancerUsage = new BalancerUsage(sender, ring, ring.TargetDate) { TodaysActiveMMUnitsPerMMSlot = DistributionRootInstance.TodayActiveMMUnitsPerMMSlot }; balancerUsage.LoadActuallBalancers(sender); RingGenerator ringGenerator = new RingGenerator(sender, ring, ring.TargetDate) { DistributionRootInstance = DistributionRootInstance, TodaysBalancers = balancerUsage.TodaysBalancersPerSender[sender] }; ringGenerator.Generate(); }
public PageGroup GeneratePageGroup(MMUnit mmUnit, RingMetaData ring) { throw new NotImplementedException(); }