Example #1
0
        public Task <bool> ExistsAsync(long id, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .WithId(id);

            return(_weatherForecastRepository.AnyAsync(spec, cancellationToken));
        }
Example #2
0
        public IActionResult Get([FromServices] DbContext dbContext,
                                 [FromQuery] ProductFilter productFilter,
                                 [FromQuery] string orderBy)
        {
            var spec = SpecBuilder <ProductListDto> .Build(productFilter);

            // _dbContext.Products.Select(x =>
            //     new ProductListDto{
            //         Id = x.Id,
            //         Name = x.Name,
            //         CategoryName = x.Category.Name
            //     });

            var q = _mapper
                    .ProjectTo <ProductListDto>(_dbContext.Products)
                    .Where(spec);

            if (orderBy != null)
            {
                q = q.OrderBy(orderBy);
            }

            var products = q.ToList();

            return(Ok(products));
        }
Example #3
0
        public Task <bool> NotExistsAsync(int temperature, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .WithNotTemperature(temperature);

            return(_weatherForecastRepository.AnyAsync(spec, cancellationToken));
        }
Example #4
0
        public virtual IQueryable <T> Filter(IQueryable <T> queryable)
        {
            // dynamic is for setting Build<T> the right type
            var spec = (Spec <T>) SpecBuilder <T> .Build((dynamic)this);

            return(queryable.Where(spec));
        }
Example #5
0
        public static void Generate(WeakAura wa)
        {
            // todo: Beacon of Light missing Alert
            var holy = new HolyPaladin();

            var builder = new SpecBuilder(ClassSpec.Affliction);

            builder.AddOverflow(
                ).AddRightBar(
                holy.AvengingWrath.Buff(),
                holy.LayOnHands,
                holy.BlessingOfSacrifice.Buff(),
                holy.DivineProtection.Buff(),
                holy.AuraMastery.Buff(),
                holy.BlessingOfProtection,
                holy.BlessingOfFreedom
                ).AddCoreRotation(
                holy.HolyShock,
                // with Judgment of Light
                holy.Judgment.DeBuff(),
                holy.BestowFaith, // T
                holy.HolyPrism    // T
                ).AddCoreCooldowns(
                ).AddBottomBar(
                ).AddTopBar(
                ).AddAlerts(
                ).Build(wa);
        }
Example #6
0
        public Task <IPaginated <WeatherForecast> > GetAsync(Odata <WeatherForecast> odata, CancellationToken cancellationToken)
        {
            var spec = SpecBuilder <WeatherForecast> .Create( )
                       .Odata(odata);

            return(_weatherForecastRepository.SearchPaginatedAsync(spec, cancellationToken));
        }
Example #7
0
        public static void Generate(WeakAura wa)
        {
            var feral    = new Feral();
            var guardian = new Guardian();
            var resto    = new RestorationDruid();

            feral.Typhoon.Talent = 7;
            guardian.IncapacitatingRoar.Talent = 8;
            resto.UrsolsVortex.Talent          = 9;

            // todo: Lunar Inspiration
            var builder = new SpecBuilder(ClassSpec.Feral);

            builder.AddRightBar(
                feral.Barkskin.Buff(),
                feral.Renewal,
                feral.Typhoon,
                guardian.IncapacitatingRoar.DeBuff(),
                resto.UrsolsVortex.DeBuff(),
                feral.Rebirth,
                feral.Maim.DeBuff(),
                feral.MightyBash.DeBuff(),
                feral.MassEntanglement.DeBuff(),
                feral.Cyclone.DeBuff(),
                // druid.EntanglingRoot1,
                // druid.Hibernate,
                // Glow if target Enraged?
                // druid.Soothe,
                // Glow if target -or- Player is Corrupted?
                // druid.RemoveCorruption,
                feral.HeartOfTheWild.Buff()
                ).AddCoreRotation(
                feral.Thrash.DoT().Passive(),
                feral.Rip.DoT().Passive(),
                feral.TigersFury.Buff(),
                feral.Rake.DoT().Passive()
                ).AddCoreCooldowns(
                feral.Berserk.Buff(),
                feral.BrutalSlash.BigStacks(),
                feral.FeralFrenzy.DeBuff()
                // Incarnation,
                ).AddBottomBar(
                feral.Dash.Buff(),
                // boomkin.TigerDash,
                feral.WildCharge,
                feral.StampedingRoar.Buff(),
                guardian.SkullBash
                ).AddTopBar(
                feral.PredatorySwiftness.Passive(),
                feral.OmenOfClarity.Passive().BigStacks().Buff(),
                feral.Bloodtalons.Passive().Buff(),
                feral.SavageRoar.Buff().Passive(),
                feral.ScentOfBlood.Buff().BigStacks(),
                feral.InfectedWounds.DeBuff().Passive()
                ).AddAlerts(
                feral.CatForm.MissingBuff().Passive(),
                feral.MoonkinForm.Buff().Passive(),
                feral.BearForm.Buff().Passive()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var discipline = new Discipline();

            var builder = new SpecBuilder(ClassSpec.Discipline);

            // todo: MindVision Alert

            builder.AddOverflow(
                // Glow when health < 50%?
                discipline.DesperatePrayer,
                discipline.Fade.Buff(),
                discipline.AngelicFeather.AssociateAura(discipline.BodyAndSoul),
                discipline.LeapOfFaith,
                // How many dispels?
                discipline.MassDispel,
                // How many hit by scream?
                discipline.PsychicScream,
                discipline.ShadowWordDeath,
                discipline.ShiningForce.DeBuff()
                ).AddRightBar(
                // Cooldowns
                discipline.PowerWordBarrier.Buff(),
                discipline.PowerInfusion.Buff(),
                discipline.PainSuppression,
                discipline.Rapture.Buff(),
                discipline.Evangelism,
                discipline.SpiritShell.Buff()
                ).AddCoreRotation(
                // Purge the Wicked
                discipline.ShadowWordPain.DoT().Passive(),
                discipline.Schism.DeBuff(),
                discipline.PowerWordSolace,
                discipline.Penance,
                discipline.MindBlast.BigStacks(),
                discipline.PowerWordRadiance.Buff(),
                discipline.ShadowCovenant,
                discipline.Halo,
                discipline.DivineStar,
                discipline.Shadowfiend.Buff()
                ).AddCoreCooldowns(
                ).AddBottomBar(
                // discipline.PowerWordShield.AssociateAura(discipline.BodyAndSoul),
                discipline.Purify
                ).AddTopBar(
                // Weakened Soul on Target? (Tracker for Group?)
                discipline.Levitate.Buff().Passive(),
                discipline.ShackleUndead.Passive().DeBuff(),
                discipline.MindSoothe.Passive().DeBuff()
                // discipline.HungeringVoid.Passive().DeBuff()
                ).AddAlerts(
                // todo: Atonement Tracker!!!!
                discipline.PowerWordFortitude.Passive().MissingBuff(),
                discipline.Rapture.Buff().Passive(),
                discipline.MindControl.Buff().Passive()
                // discipline.MindControl.Buff().Passive(),
                ).Build(wa);
        }
Example #9
0
        public void CanMergeTwoSingleItemSpecBuilders()
        {
            var spec1 = new SpecBuilder<int>().Skip(10);
            var spec2 = new SpecBuilder<int>().Take(20);

            var newSpec = spec1.Merge(spec2);

            newSpec.Items.Should().Have.SameSequenceAs(spec1.Items.First(), spec2.Items.First());
        }
 public ListSpecialtiesWithPaginationQueryHandler(
     ISpecialtyRepository repository,
     IMapper mapper,
     SpecBuilderFactory builder)
 {
     _repository = repository;
     _mapper     = mapper;
     _builder    = builder.Create <Domain.Entities.Specialty>();
 }
Example #11
0
        public static void Generate(WeakAura wa)
        {
            var frost = new Frost();

            var builder = new SpecBuilder(ClassSpec.Frost);

            wa.AddSpell(frost.BreathOfSindragosa, ClassSpec.Frost, -25, 300);

            builder.AddOverflow(
                // todo: move to core when replaced with Night Fae covenant?
                frost.DeathAndDecay.Buff(),
                frost.DarkCommand,
                frost.RaiseAlly,
                frost.RaiseDead,
                frost.SacrificialPact,
                frost.HornOfWinter,
                frost.BlindingSleet.DeBuff(),
                frost.DeathPact.Buff(),
                frost.Permafrost.Passive().Buff()
                // havoc.Torment,
                ).AddRightBar(
                frost.Anti_MagicShell.Buff(),
                frost.Anti_MagicZone.Buff(),
                frost.IceboundFortitude.Buff(),
                frost.Lichborne
                ).AddCoreRotation(
                frost.Rime.Passive().Buff().UseIcon(frost.HowlingBlast),
                frost.KillingMachine.Passive().Buff().UseIcon(frost.Obliterate),
                frost.HypothermicPresence.Buff(),
                frost.GlacialAdvance
                // todo: frost.Frostscythe.
                ).AddCoreCooldowns(
                frost.PillarOfFrost.Buff(),
                frost.EmpowerRuneWeapon.Buff(),
                frost.FrostwyrmsFury.DeBuff(),
                frost.RemorselessWinter.Buff()
                ).AddBottomBar(
                frost.DeathGrip,
                frost.DeathsAdvance.Buff(),
                frost.WraithWalk.Buff(),
                frost.MindFreeze.DeBuff(),
                frost.Asphyxiate.DeBuff()
                ).AddTopBar(
                // todo: add FrostFever?
                frost.ControlUndead.Passive().Buff(),
                frost.DarkSuccor.Buff().Passive().UseIcon(frost.DeathStrike),
                frost.ColdHeart.Buff().Passive().Stacks(20).UseIcon(frost.ChainsOfIce),
                frost.IcyTalons.Buff().Passive().BigStacks(),
                frost.InexorableAssault.Buff().Passive().BigStacks().UseIcon(frost.Obliterate),
                frost.FrozenPulse.Buff().Passive(),
                frost.GatheringStorm.Buff().Passive()
                ).AddAlerts(
                frost.PillarOfFrost.Passive().Buff(),
                frost.PathOfFrost.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var holy = new HolyPriest();

            var builder = new SpecBuilder(ClassSpec.HolyPriest);

            // todo: MindVision Alert

            builder.AddOverflow(
                // Glow when health < 50%?
                holy.DesperatePrayer,
                holy.Fade.Buff(),
                holy.AngelicFeather.AssociateAura(holy.BodyAndSoul),
                holy.LeapOfFaith,
                // How many dispels?
                holy.MassDispel,
                // How many hit by scream?
                holy.PsychicScream,
                holy.ShadowWordDeath,
                holy.ShiningForce.DeBuff()
                ).AddRightBar(
                // Cooldowns
                holy.DivineHymn.Buff(),
                holy.PowerInfusion.Buff(),
                holy.GuardianSpirit,
                holy.Apotheosis.Buff(),
                holy.HolyWordSalvation,
                holy.SymbolOfHope
                ).AddCoreRotation(
                holy.CircleOfHealing,
                holy.PrayerOfMending,
                holy.Halo,
                holy.DivineStar,
                holy.HolyWordSanctify,
                holy.HolyWordSerenity,
                holy.HolyWordChastise,
                holy.ShadowWordPain.DoT().Passive()
                ).AddCoreCooldowns(
                ).AddBottomBar(
                // discipline.PowerWordShield.AssociateAura(discipline.BodyAndSoul),
                holy.Purify
                ).AddTopBar(
                holy.Levitate.Passive().Buff(),
                holy.ShackleUndead.Passive().DeBuff(),
                holy.MindSoothe.Passive().DeBuff(),
                holy.PrayerCircle.Passive().Buff(),
                holy.Apotheosis.Passive().Buff(),
                holy.SurgeOfLight.Passive().Buff()
                ).AddAlerts(
                // Check part for the missing buff?
                holy.PowerWordFortitude.Passive().MissingBuff(),
                holy.MindControl.Passive().Buff(),
                holy.Apotheosis.Passive().Buff(),
                holy.SpiritOfRedemption.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var blood = new Blood();

            var builder = new SpecBuilder(ClassSpec.Blood);

            // todo: Death Strike heal tracker?

            builder.AddOverflow(
                blood.DarkCommand,
                blood.RaiseAlly,
                blood.RaiseDead,
                blood.SacrificialPact,
                blood.Consumption,
                blood.BloodTap,
                // todo: does this change Core Rotation?
                blood.MarkOfBlood.DeBuff(),
                // todo: will this detect a debuff on player?
                blood.DeathPact.Buff()
                // havoc.Torment,
                ).AddRightBar(
                // Cooldowns
                blood.Anti_MagicShell.Buff(),
                blood.Anti_MagicZone.Buff(),
                blood.IceboundFortitude.Buff(),
                blood.Lichborne
                ).AddCoreRotation(
                // todo: probably needs a _missing_ warning \ a _low_ warning
                // todo: associate with Ossuary Buff
                blood.BoneShield.Passive().Buff().BigStacks(),
                blood.RuneTap.Buff(),
                blood.DeathAndDecay.Buff().AssociateAura(blood.CrimsonScourge),
                blood.BloodBoil
                ).AddCoreCooldowns(
                blood.DancingRuneWeapon.Buff(),
                blood.VampiricBlood.Buff(),
                blood.Blooddrinker.Buff(),
                blood.Tombstone.Buff(),
                blood.Bonestorm.Buff()
                ).AddBottomBar(
                blood.DeathGrip,
                blood.GorefiendsGrasp,
                blood.DeathsAdvance.Buff(),
                blood.WraithWalk.Buff(),
                blood.MindFreeze.DeBuff(),
                blood.Asphyxiate.DeBuff()
                ).AddTopBar(
                blood.ControlUndead.Passive().Buff(),
                blood.BloodPlague.Passive().DeBuff(),
                blood.Bloodworms.Passive().Buff().BigStacks()
                ).AddAlerts(
                blood.PathOfFrost.Passive().Buff(),
                blood.Purgatory.Passive().Buff()
                ).Build(wa);
        }
Example #14
0
        public static void Generate(WeakAura wa)
        {
            var unholy = new Unholy();

            var builder = new SpecBuilder(ClassSpec.Unholy);

            // todo: Army of the Dead tracker?

            builder.AddOverflow(
                unholy.DarkCommand,
                unholy.RaiseAlly,
                unholy.RaiseDead,
                unholy.SacrificialPact,
                unholy.UnholyBlight.Buff(),
                unholy.DeathPact.Buff()
                // havoc.Torment,
                ).AddRightBar(
                // Cooldowns
                unholy.Anti_MagicShell.Buff(),
                unholy.Anti_MagicZone.Buff(),
                unholy.IceboundFortitude.Buff(),
                unholy.Lichborne
                ).AddCoreRotation(
                unholy.Epidemic,
                // note: ScourgeStrike could be replaced with ClawingShadows
                unholy.FesteringWound.Passive().DeBuff().UseIcon(unholy.ScourgeStrike),
                unholy.VirulentPlague.Passive().DeBuff().UseIcon(unholy.Outbreak),
                unholy.DeathAndDecay.Buff()
                ).AddCoreCooldowns(
                unholy.Apocalypse,
                unholy.ArmyOfTheDead,
                // todo: track buff on pet
                unholy.DarkTransformation,
                // todo: It says, 'Unholy Frenzy'? is this a separate buff?
                unholy.UnholyAssault.Buff(),
                // todo: likely not a buff, but we should be able to track this pet
                unholy.SummonGargoyle.Buff()
                ).AddBottomBar(
                unholy.DeathGrip,
                unholy.DeathsAdvance.Buff(),
                unholy.WraithWalk.Buff(),
                unholy.MindFreeze.DeBuff(),
                unholy.Asphyxiate.DeBuff()
                ).AddTopBar(
                unholy.ControlUndead.Passive().Buff(),
                unholy.DarkSuccor.Buff().Passive().UseIcon(unholy.DeathStrike),
                unholy.RunicCorruption.Buff().Passive(),
                unholy.UnholyPact.Buff().Passive()
                ).AddAlerts(
                // todo: missing Ghoul pet
                unholy.SuddenDoom.Passive().Buff(),
                unholy.PathOfFrost.Passive().Buff()
                ).Build(wa);
        }
 public ListDoctorsWithPaginationQueryHandler(
     IDoctorRepository doctorRepository,
     IMapper mapper,
     SpecBuilderFactory builder,
     ILocationService locationService)
 {
     _doctorRepository = doctorRepository;
     _mapper           = mapper;
     _locationService  = locationService;
     _builder          = builder.Create <Domain.Entities.DoctorAggregate.Doctor>();
 }
Example #16
0
        public void MergedSpecBuilderShouldBeDifferentInstance()
        {
            var spec1 = new SpecBuilder<int>().Skip(10);
            var spec2 = new SpecBuilder<int>().Take(20);

            var newSpec = spec1.Merge(spec2);

            newSpec.Should()
                .Not.Be.SameInstanceAs(spec1)
                .And.Not.Be.SameInstanceAs(spec2);
        }
        public static void Generate(WeakAura wa)
        {
            var elemental = new Elemental();

            var builder = new SpecBuilder(ClassSpec.Elemental);

            Console.WriteLine("Pets and totems!");

            // Lightning Shield, Flametongue Weapon?
            builder.AddOverflow(
                elemental.EarthElemental.Buff(),
                elemental.AstralShift.Buff(),
                elemental.Heroism.Buff(),
                elemental.Hex.DeBuff(),
                elemental.CleanseSpirit,
                // or debuff?
                elemental.NaturesGuardian.Buff() // T5
                ).AddRightBar(
                elemental.Thunderstorm.DeBuff(),
                elemental.SpiritwalkersGrace.Buff(),
                elemental.WindRushTotem.Buff(),    // T5
                elemental.AncestralGuidance.Buff() // T5
                ).AddCoreRotation(
                elemental.FlameShock.DeBuff(),
                elemental.LavaBurst,
                elemental.EchoingShock.Buff(),   // T3
                elemental.ElementalBlast.Buff(), // T3
                elemental.Icefury.Buff()         // T6 (IceFury Overload might be the buff)
                ).AddCoreCooldowns(
                // todo: pet -or- totem tracking?
                elemental.FireElemental.Buff(),
                elemental.StaticDischarge.Buff(),  // T2
                elemental.LiquidMagmaTotem.Buff(), // T4
                elemental.Stormkeeper.Buff(),      // T7
                elemental.Ascendance.Buff()        // T7
                ).AddBottomBar(
                elemental.EarthbindTotem.Buff(),
                elemental.CapacitorTotem.Buff(),
                elemental.HealingStreamTotem.Buff(),
                elemental.TremorTotem.Buff(),
                elemental.WindShear,
                elemental.Purge
                ).AddTopBar(
                elemental.FrostShock.Passive().Buff(),
                elemental.SurgeOfPower.Passive().Buff(), // T6
                elemental.UnlimitedPower.Passive().Buff()
                ).AddAlerts(
                elemental.WaterWalking.Passive().Buff(),
                // todo: any reason not to have Lightning Shield!?
                elemental.LightningShield.Passive().MissingBuff()
                ).Build(wa);
        }
Example #18
0
        public static IQueryable <T> FilterByConventions <T>(this IQueryable <T> queryable, object filter,
                                                             ComposeKind composeKind = ComposeKind.And)
        {
            if (filter == null)
            {
                throw new ArgumentNullException(nameof(filter));
            }
            var spec = (Spec <T>) SpecBuilder <T> .Build((dynamic)filter, composeKind);

            return(spec != null
                ? queryable.Where(spec)
                : queryable);
        }
        public static void Generate(WeakAura wa)
        {
            var restoration = new RestorationShaman();

            var builder = new SpecBuilder(ClassSpec.RestorationShaman);

            builder.AddOverflow(
                restoration.EarthElemental.Buff(),
                restoration.AstralShift.Buff(),
                restoration.Heroism.Buff(),
                restoration.Hex.DeBuff(),
                restoration.LavaBurst,
                restoration.EarthgrabTotem
                ).AddRightBar(
                restoration.HealingTideTotem.Buff(),
                restoration.ManaTideTotem.Buff(),
                restoration.SpiritLinkTotem.Buff(),
                restoration.Ascendance.Buff(),    // T7
                restoration.WindRushTotem.Buff(), // T6
                restoration.SpiritwalkersGrace.Buff()
                ).AddCoreRotation(
                // todo: track charges!
                restoration.EarthShield.Buff(),
                restoration.HealingRain.Buff(),
                restoration.Riptide.Buff(),
                restoration.UnleashLife.Buff(), // T1
                restoration.SurgeOfEarth,
                restoration.Downpour,           // T6
                restoration.Wellspring
                // restoration.CloudburstTotem, // T6 (replaces Healing Stream totem)
                ).AddCoreCooldowns(
                restoration.EarthenWallTotem.Buff(),        // T4
                restoration.AncestralProtectionTotem.Buff() // T4
                ).AddBottomBar(
                restoration.EarthbindTotem.Buff(),
                restoration.CapacitorTotem.Buff(),
                restoration.HealingStreamTotem.Buff(),
                restoration.TremorTotem.Buff(),
                restoration.WindShear,
                restoration.Purge,
                restoration.PurifySpirit
                ).AddTopBar(
                restoration.FrostShock.Passive().Buff(),
                // todo: will this only show up when it's been used? (also enhancement)
                restoration.NaturesGuardian.Passive().Buff(),
                restoration.HighTide.Passive().Buff()
                ).AddAlerts(
                restoration.WaterWalking.Passive().Buff(),
                restoration.WaterShield.Passive().MissingBuff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            // todo: add a check for missing poisons (lethal + non-lethal)
            // todo: add alert for Cheat Death (only while you're taking the reduced damage)
            // todo: some of these poisons on the enemies should pro'lly be DoT's, not just DeBuff's
            var subtlety = new Subtlety();

            var builder = new SpecBuilder(ClassSpec.Subtlety);

            builder.AddOverflow(
                subtlety.Blind.DeBuff(),
                subtlety.CheapShot.RequiresStealth(),
                subtlety.Feint.Buff(),
                subtlety.Distract.DeBuff(),
                subtlety.Evasion.Buff(),
                subtlety.ShroudOfConcealment.Buff().RequiresStealth(),
                // look for buff on friendly target?
                subtlety.TricksOfTheTrade.Buff()
                ).AddRightBar(
                subtlety.MarkedForDeath.DeBuff(), // T3
                subtlety.SecretTechnique.Buff(),  // T7
                subtlety.ShurikenTornado.Buff()   // T7
                ).AddCoreRotation(
                subtlety.Shiv,
                subtlety.SliceAndDice.Buff(),
                subtlety.Rupture.DeBuff()
                ).AddCoreCooldowns(
                subtlety.ShadowBlades.Buff(),
                subtlety.SymbolsOfDeath.Buff(),
                subtlety.ShadowDance.Buff()
                ).AddBottomBar(
                subtlety.Shadowstep.Buff(),
                subtlety.Sprint.Buff(),
                subtlety.CloakOfShadows.Buff(),
                subtlety.Kick.DeBuff(),
                subtlety.CrimsonVial.Buff(),
                subtlety.Vanish.Buff()
                ).AddTopBar(
                subtlety.FindWeakness.Passive().DeBuff(),
                subtlety.ShotInTheDark.Passive().Buff(),   // T5
                subtlety.NightTerrors.Passive().DeBuff(),  // T5
                subtlety.PreyOnTheWeak.Passive().DeBuff(), // T5
                subtlety.Alacrity.Passive().Buff(),        // T6
                subtlety.MasterOfShadows.Passive().Buff()  // T7
                ).AddAlerts(
                subtlety.Stealth.Passive().Buff(),
                subtlety.Subterfuge.Buff(), // T2
                subtlety.ShroudOfConcealment.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var enhancement = new Enhancement();

            var builder = new SpecBuilder(ClassSpec.Enhancement);

            builder.AddOverflow(
                enhancement.EarthElemental.Buff(),
                enhancement.AstralShift.Buff(),
                enhancement.Heroism.Buff(),
                enhancement.Hex.DeBuff(),
                enhancement.EarthShield
                ).AddRightBar(
                enhancement.Ascendance.Buff(),     // T7
                enhancement.EarthenSpike.DeBuff(), // T7
                enhancement.Stormkeeper.Buff(),    // T6
                enhancement.Sundering.DeBuff(),    // T6
                enhancement.FeralSpirit.Buff(),
                enhancement.WindRushTotem.Buff()   // T5
                ).AddCoreRotation(
                enhancement.FrostShock.DeBuff(),
                enhancement.FlameShock.DeBuff(),
                enhancement.Stormstrike,
                enhancement.LavaLash,
                enhancement.IceStrike.Buff(),      // T2
                enhancement.ElementalBlast.Buff(), // T1
                enhancement.FireNova.Buff(),       // T4
                enhancement.CrashLightning
                ).AddCoreCooldowns(
                ).AddBottomBar(
                enhancement.FeralLunge, // T5
                enhancement.EarthbindTotem.Buff(),
                enhancement.CapacitorTotem.Buff(),
                enhancement.HealingStreamTotem.Buff(),
                enhancement.TremorTotem.Buff(),
                enhancement.WindShear,
                enhancement.Purge,
                enhancement.CleanseSpirit
                ).AddTopBar(
                enhancement.FrostShock.Passive().Buff(),
                enhancement.MaelstromWeapon.Passive().Buff(),
                enhancement.Stormbringer.Passive().Buff(),
                enhancement.Hailstorm.Passive().Buff(), // T4
                enhancement.NaturesGuardian.Passive().Buff()

                ).AddAlerts(
                enhancement.WaterWalking.Passive().Buff(),
                enhancement.Windfury.Passive().MissingBuff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            // todo: add a check for missing poisons
            var assassination = new Assassination();

            var builder = new SpecBuilder(ClassSpec.Assassination);

            builder.AddOverflow(
                assassination.Blind.DeBuff(),
                assassination.CheapShot.RequiresStealth(),
                assassination.Feint.Buff(),
                assassination.Distract.DeBuff(),
                assassination.Evasion.Buff(),
                assassination.ShroudOfConcealment.Buff().RequiresStealth(),
                // look for buff on friendly target?
                assassination.TricksOfTheTrade.Buff()
                ).AddRightBar(
                assassination.Vendetta.Buff(),
                assassination.MarkedForDeath.DeBuff(),           // T3
                assassination.Exsanguinate,                      // T6
                assassination.HiddenBlades.Passive().BigStacks() // T7
                ).AddCoreRotation(
                assassination.Shiv,
                assassination.SliceAndDice.Buff(),
                assassination.Envenom.DeBuff(),
                assassination.Garrote.DeBuff(),
                assassination.Rupture.DeBuff(),
                assassination.CrimsonTempest.DeBuff() // T7
                ).AddCoreCooldowns(
                ).AddBottomBar(
                assassination.Shadowstep.Buff(),
                assassination.Sprint.Buff(),
                assassination.CloakOfShadows.Buff(),
                assassination.Kick.DeBuff(),
                assassination.CrimsonVial.Buff(),
                assassination.Vanish.Buff()
                ).AddTopBar(
                assassination.ElaboratePlanning.Passive().Buff(),  // T1
                assassination.Blindside.Passive().Buff(),          // T1
                assassination.InternalBleeding.Passive().DeBuff(), // T5
                assassination.IronWire.Passive().DeBuff(),         // T5
                assassination.PreyOnTheWeak.Passive().DeBuff(),    // T5
                assassination.Alacrity.Passive().Buff()            // T6
                ).AddAlerts(
                assassination.Stealth.Passive().Buff(),
                assassination.Subterfuge.Buff(), // T2
                assassination.ShroudOfConcealment.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            // todo: add a check for missing poisons
            var outlaw = new Outlaw();

            var builder = new SpecBuilder(ClassSpec.Outlaw);

            builder.AddOverflow(
                outlaw.Gouge.DeBuff(),
                outlaw.Blind.DeBuff(),
                outlaw.CheapShot.RequiresStealth(),
                outlaw.Feint.Buff(),
                outlaw.Distract.DeBuff(),
                outlaw.Evasion.Buff(),
                outlaw.ShroudOfConcealment.Buff().RequiresStealth(),
                // look for buff on friendly target?
                outlaw.TricksOfTheTrade.Buff()
                ).AddRightBar(
                outlaw.AdrenalineRush.Buff(),
                outlaw.BetweenTheEyes.DeBuff(),
                // todo: we need the Bones Buffs
                outlaw.RollTheBones.Buff(),
                outlaw.BladeFlurry.Buff()
                ).AddCoreRotation(
                outlaw.Shiv,
                outlaw.SliceAndDice.Buff(),
                outlaw.GhostlyStrike.DeBuff(),  // T1
                outlaw.MarkedForDeath.DeBuff(), // T3
                outlaw.Dreadblades.Buff(),      // T6
                outlaw.BladeRush,               // T7
                outlaw.KillingSpree             // T7
                ).AddCoreCooldowns(
                ).AddBottomBar(
                outlaw.GrapplingHook,
                outlaw.Sprint.Buff(),
                outlaw.CloakOfShadows.Buff(),
                outlaw.Kick.DeBuff(),
                outlaw.CrimsonVial.Buff(),
                outlaw.Vanish.Buff()
                ).AddTopBar(
                outlaw.PistolShot.DeBuff().Passive(),
                outlaw.PreyOnTheWeak.DeBuff().Passive(), // T5
                outlaw.LoadedDice.Buff().Passive(),      // T6
                outlaw.Alacrity.Passive().Buff()         // T6
                ).AddAlerts(
                outlaw.Stealth.Passive().Buff(),
                outlaw.ShroudOfConcealment.Passive().Buff()
                ).Build(wa);
        }
Example #24
0
        public static void Generate(WeakAura wa)
        {
            // todo: Soul shard Tracker (on Resource Hud)
            // todo: Seed of Corruption Tracker?
            // todo: Curse Tracker
            // todo: Fear Tracker
            // todo: Casting Ritual of Doom Alert
            var affliction = new Affliction();

            var builder = new SpecBuilder(ClassSpec.Affliction);

            builder.AddOverflow(
                affliction.GrimoireSacrifice.Buff(), // T6
                affliction.FelDomination.Buff(),
                affliction.CreateSoulwell,
                affliction.Soulstone,
                affliction.RitualOfDoom
                ).AddRightBar(
                affliction.Deathbolt,
                affliction.DarkPact.Buff(),       // T3
                affliction.MortalCoil.DeBuff(),   // T5
                affliction.HowlOfTerror.DeBuff(), // T5
                affliction.Shadowfury.DeBuff()
                ).AddCoreRotation(
                affliction.Agony.DoT(),
                affliction.UnstableAffliction.DoT(),
                affliction.Corruption.DoT(),
                affliction.SiphonLife.DoT(), // T2
                affliction.Haunt.DoT()       //T6
                ).AddCoreCooldowns(
                affliction.SummonDarkglare.Buff(),
                affliction.DarkSoulMisery.Buff(),     // T7
                affliction.PhantomSingularity.Buff(), // T4
                affliction.VileTaint.DeBuff()         // T4
                ).AddBottomBar(
                affliction.BurningRush.Buff(),        // T3
                affliction.DemonicCircleTeleport,
                affliction.CommandDemon
                ).AddTopBar(
                affliction.SeedOfCorruption.Passive().DeBuff(),
                affliction.Nightfall.Passive().Buff(), // T1
                affliction.UnendingBreath.Passive().Buff()
                ).AddAlerts(
                affliction.EyeOfKilrogg.Passive().Buff()
                ).Build(wa);
        }
Example #25
0
        public void BuildOr()
        {
            var spec = SpecBuilder <Product> .Build(
                new
            {
                Id = 1, Name = DbContextFixture.SecondProductName
            },
                ComposeKind.Or);

            var res = DbContext
                      .Products
                      .Where(spec)
                      .ToList();

            Assert.All(res, x => Assert.True(x.Name == DbContextFixture.FirstProductName ||
                                             x.Name == DbContextFixture.SecondProductName));
        }
        public static void Generate(WeakAura wa)
        {
            var vengeance = new Vengeance();

            var builder = new SpecBuilder(ClassSpec.Vengeance);

            // todo: souls tracker (to the resource HUD?)
            builder.AddOverflow(
                vengeance.Imprison.DeBuff(),
                vengeance.SpectralSight.Buff(),
                // todo: not_on_CD --> back to combat buffs?
                vengeance.ThrowGlaive,
                vengeance.Torment,
                vengeance.LastResort.Passive().Buff()
                ).AddRightBar(
                // Cooldowns
                vengeance.SigilOfFlame,
                vengeance.SigilOfChains,
                vengeance.SigilOfSilence,
                vengeance.SigilOfMisery
                ).AddCoreRotation(
                vengeance.ImmolationAura.Buff(),
                vengeance.FelDevastation.Buff(),
                vengeance.Fracture,
                vengeance.DemonSpikes.Buff()
                ).AddCoreCooldowns(
                vengeance.Metamorphosis.Buff(),
                vengeance.FieryBrand.DeBuff().AssociateAura(vengeance.RevelInPain),
                vengeance.BulkExtraction,
                vengeance.SoulBarrier.Buff()
                ).AddBottomBar(
                vengeance.InfernalStrike,
                vengeance.Felblade,
                vengeance.Disrupt,
                // todo: check target for magic
                vengeance.ConsumeMagic
                ).AddTopBar(
                vengeance.SoulFragments.Passive().Buff()
                // vengeance.ChaosBrand.Passive().B
                ).AddAlerts(
                vengeance.Glide.Passive().Buff(),
                // todo: Only When Missing
                vengeance.Frailty.Passive().DeBuff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var havoc = new Havoc();

            var builder = new SpecBuilder(ClassSpec.Havoc);

            // todo: souls tracker (to the resource HUD?)
            builder.AddOverflow(
                havoc.Imprison.DeBuff(),
                havoc.SpectralSight.Buff(),
                // todo: not_on_CD --> back to combat buffs?
                havoc.ThrowGlaive
                // havoc.Torment,
                ).AddRightBar(
                // Cooldowns
                havoc.ChaosNova.DeBuff(),
                havoc.Darkness.Buff(),
                havoc.Blur.Buff(),
                havoc.SigilOfMisery
                ).AddCoreRotation(
                havoc.ImmolationAura.Buff(),
                // todo: glow when castable
                havoc.EyeBeam.Buff().AssociateAura(havoc.FuriousGaze),
                havoc.BladeDance,
                havoc.GlaiveTempest
                ).AddCoreCooldowns(
                havoc.Metamorphosis.Buff(),
                havoc.EssenceBreak.DeBuff(),
                havoc.FelEruption.DeBuff(),
                havoc.FelBarrage.Buff()
                ).AddBottomBar(
                havoc.FelRush,
                havoc.VengefulRetreat,
                havoc.Felblade,
                havoc.Netherwalk,
                havoc.Disrupt,
                // todo: check target for magic
                havoc.ConsumeMagic
                ).AddTopBar(
                havoc.SoulFragments.Passive().Buff()
                // vengeance.ChaosBrand.Passive().B
                ).AddAlerts(
                havoc.Glide.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            // todo: Doom Tracker ?? Associated Buff?
            var demonology = new Demonology();

            var builder = new SpecBuilder(ClassSpec.Demonology);

            builder.AddOverflow(
                demonology.FelDomination.Buff(),
                demonology.CreateSoulwell,
                demonology.Soulstone,
                demonology.RitualOfDoom
                ).AddRightBar(
                // demonology.Deathbolt,
                demonology.NetherPortal.Buff(),   // T7
                demonology.DarkPact.Buff(),       // T3
                demonology.MortalCoil.DeBuff(),   // T5
                demonology.HowlOfTerror.DeBuff(), // T5
                demonology.Shadowfury.DeBuff()
                ).AddCoreRotation(
                demonology.CallDreadstalkers.Buff(),
                demonology.UnstableAffliction.DoT(),
                // demonology.Corruption.DoT(),
                demonology.DemonicCore.Passive().Buff().BigStacks(),
                demonology.SoulStrike // T4
                ).AddCoreCooldowns(
                demonology.SummonDemonicTyrant.Buff(),
                demonology.GrimoireFelguard.Buff(),   // T
                demonology.SummonVilefiend.Buff(),    // T4
                demonology.DemonicStrength.Buff(),    // T1
                demonology.BilescourgeBombers.Buff(), // T1
                demonology.PowerSiphon.DeBuff()       // T2
                ).AddBottomBar(
                demonology.BurningRush.Buff(),        // T3
                demonology.DarkPact.Buff(),           // T3
                demonology.DemonicCircleTeleport,
                demonology.CommandDemon
                ).AddTopBar(
                demonology.DemonicCalling.Passive().Buff().UseIcon(demonology.CallDreadstalkers), // T2
                demonology.UnendingBreath.Passive().Buff()
                ).AddAlerts(
                demonology.EyeOfKilrogg.Passive().Buff()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var destruction = new Destruction();

            var builder = new SpecBuilder(ClassSpec.Destruction);

            builder.AddOverflow(
                destruction.GrimoireSacrifice.Buff(), // T6
                destruction.FelDomination.Buff(),
                destruction.CreateSoulwell,
                destruction.Soulstone,
                destruction.RitualOfDoom
                ).AddRightBar(
                // destruction.Deathbolt,
                destruction.DarkPact.Buff(),       // T3
                destruction.MortalCoil.DeBuff(),   // T5
                destruction.HowlOfTerror.DeBuff(), // T5
                destruction.Shadowfury.DeBuff()
                ).AddCoreRotation(
                destruction.Immolate.DoT(),
                destruction.Conflagrate.Buff(),
                destruction.Shadowburn.Buff()
                // destruction.Corruption.DoT(),
                ).AddCoreCooldowns(
                destruction.SummonInfernal.Buff(),
                destruction.Havoc.Buff(),
                destruction.Cataclysm.Buff(),    // T4
                destruction.ChannelDemonfire,    // T7
                destruction.DarkSoulInstability, // T7
                destruction.SoulFire             // T1
                ).AddBottomBar(
                destruction.BurningRush.Buff(),  // T3
                destruction.DemonicCircleTeleport,
                destruction.CommandDemon
                ).AddTopBar(
                destruction.Eradication.Passive().Buff(),    // T1
                destruction.Backdraft.Passive().Buff(),
                destruction.ReverseEntropy.Passive().Buff(), // T2
                destruction.RainOfFire.Passive().DeBuff(),
                destruction.UnendingBreath.Passive().Buff()
                ).AddAlerts(
                destruction.EyeOfKilrogg.Passive().Buff()
                ).Build(wa);
        }
Example #30
0
        public static void Generate(WeakAura wa)
        {
            var shadow = new Shadow();

            var builder = new SpecBuilder(ClassSpec.Shadow);

            // todo: MindVision Alert

            builder.AddOverflow(
                shadow.PurifyDisease,
                shadow.DispelMagic,
                shadow.Dispersion.Buff(),
                shadow.DesperatePrayer,
                shadow.Fade.Buff(),
                shadow.LeapOfFaith,
                shadow.MassDispel,
                shadow.PsychicScream
                ).AddBottomBar(
                shadow.Silence.DeBuff(),
                shadow.PsychicHorror.DeBuff(),
                shadow.MindBomb.DeBuff(),
                shadow.VampiricEmbrace.Buff(),
                shadow.Fleshcraft.Buff()
                ).AddRightBar(
                shadow.Shadowfiend.Buff(),
                shadow.UnholyNova.DeBuff(),
                shadow.PowerInfusion.Buff(),
                // todo: shadow.SearingNightmare,
                shadow.SurrenderToMadness.Buff()
                ).AddCoreRotation(
                shadow.VampiricTouch.DoT().Passive(),
                shadow.ShadowWordPain.DoT().Passive(),
                shadow.MindBlast.BigStacks().AssociateAura(shadow.DarkThought).UseIcon(shadow.MindBlast),
                shadow.DevouringPlague.DoT().Passive(),
                shadow.VoidEruption.Buff(),
                // todo: Associate with Death and Madness
                shadow.ShadowWordDeath.AssociateAura(shadow.DeathAndMadness).UseIcon(shadow.ShadowWordDeath),
                shadow.Damnation,
                shadow.ShadowCrash,
                shadow.VoidTorrent
                ).AddCoreCooldowns(
                ).AddTopBar(
                shadow.Voidform.Buff().Passive(),
                shadow.DarkThought.Passive().Buff(),
                shadow.DeathAndMadness.Passive().DeBuff().UseIcon(shadow.MindBlast),
                shadow.BodyAndSoul.Passive().Buff().UseIcon(shadow.PowerWordShield),
                // shadow.AncientMadness.Buff().Passive(),
                // shadow.ShackleUndead.Passive().DeBuff(),
                // shadow.MindSoothe.Passive().DeBuff(),
                shadow.TwistOfFate.Passive().Buff(),
                shadow.HungeringVoid.Passive().DeBuff()
                ).AddAlerts(
                // shadow.PowerWordFortitude.Passive().MissingBuff(),
                shadow.Levitate.Buff().Passive(),
                shadow.Shadowform.Buff().Passive().MissingBuff(),
                shadow.Voidform.Buff().Passive(),
                shadow.Dispersion.Buff().Passive(),
                shadow.MindControl.Buff().Passive(),
                // shadow.DeathAndMadness.Passive().DeBuff(),
                shadow.UnfurlingDarkness.Passive().Buff(),
                shadow.SurrenderToMadness.Passive().Buff()
                ).Build(wa);
        }
Example #31
0
        public static void Generate(WeakAura wa)
        {
            var balance  = new Balance();
            var feral    = new Feral();
            var guardian = new Guardian();
            var resto    = new RestorationDruid();

            feral.Maim.Talent = 7;
            guardian.IncapacitatingRoar.Talent = 8;
            resto.UrsolsVortex.Talent          = 9;

            // Stellar Flare is right ~ pretty sure the Druid\Balance() split ruins this
            balance.Sunfire.Durations.Add(18);
            balance.Moonfire.Durations.Add(22);
            balance.StellarDrift.Passive();

            var spec    = ClassSpec.Balance;
            var builder = new SpecBuilder(spec);

            // todo: should this be a standard?
            // wa.AddSpell(balance.StellarFlare, spec, -25, 300);
            wa.AddSpell(balance.StellarFlare, spec, -100, 225);

            builder.AddRightBar(
                balance.Barkskin.Buff(),
                balance.Renewal,
                balance.Innervate,
                balance.Typhoon,
                balance.Rebirth,
                balance.SolarBeam.DeBuff(),
                balance.MightyBash.DeBuff(),
                balance.MassEntanglement.DeBuff(),
                guardian.IncapacitatingRoar.DeBuff(),
                resto.UrsolsVortex.DeBuff(),
                feral.Maim.DeBuff(),
                balance.Cyclone.DeBuff(),
                // druid.EntanglingRoots1,
                // druid.Hibernate,
                // Glow if target Enraged?
                // druid.Soothe,
                // Glow if target -or- Player is Corrupted?
                // druid.RemoveCorruption,
                balance.HeartOfTheWild.Buff()
                ).AddCoreRotation(
                balance.Sunfire.DoT().Passive(),
                balance.Moonfire.DoT().Passive(),
                balance.Wrath.AssociateAura(balance.SolarEclipse).BigStacks(),
                balance.Starfire.AssociateAura(balance.LunarEclipse).BigStacks()
                ).AddCoreCooldowns(
                balance.CelestialAlignment.Buff(),
                // druid.IncarnationChosenOfElune,
                balance.WarriorOfElune.DeBuff(),
                // Spell: 248280 triggers for each treant summoned -- start a 10 second timer?
                balance.ForceOfNature,
                balance.FuryOfElune.Buff(),
                balance.NewMoon
                ).AddBottomBar(
                balance.Dash.Buff(),
                // druid.TigerDash,
                balance.WildCharge,
                balance.StampedingRoar.Buff()
                ).AddTopBar(
                balance.Starlord.Buff().Passive(),
                balance.Starfall.Buff().Passive(),
                balance.Starsurge.Buff().Passive(),
                // druid.SoulOfTheForest,
                balance.Solstice.Buff().Passive()
                ).AddAlerts(
                balance.MoonkinForm.MissingBuff().Passive(),
                balance.CatForm.Buff().Passive(),
                balance.BearForm.Buff().Passive()
                ).Build(wa);
        }
        public static void Generate(WeakAura wa)
        {
            var guardian = new Guardian();
            var resto    = new RestorationDruid();

            guardian.Typhoon.Talent   = 7;
            guardian.Maim.Talent      = 8;
            resto.UrsolsVortex.Talent = 9;

            var builder = new SpecBuilder(ClassSpec.Guardian);

            builder.AddRightBar(
                guardian.SurvivalInstincts.Buff().BigStacks(),
                guardian.Barkskin.Buff(),
                guardian.IncapacitatingRoar.DeBuff(),
                guardian.MightyBash.DeBuff(),
                guardian.MassEntanglement,
                guardian.Renewal,
                guardian.Typhoon,
                guardian.Rebirth,
                guardian.Maim.DeBuff(),
                guardian.Typhoon.DeBuff(),
                resto.UrsolsVortex.DeBuff(),
                guardian.Cyclone.DeBuff(),
                // druid.EntanglingRoot1,
                // druid.Hibernate,
                // Glow if target Enraged?
                // druid.Soothe,
                // Glow if target -or- Player is Corrupted?
                // druid.RemoveCorruption,
                guardian.HeartOfTheWild.Buff()
                ).AddCoreRotation(
                guardian.Moonfire.DoT().Passive().AssociateAura(guardian.GalacticGuardian),
                guardian.Thrash.DeBuff(),
                guardian.Mangle.Buff().AssociateAura(guardian.Gore),
                guardian.Maul
                ).AddCoreCooldowns(
                guardian.Berserk.Buff(),
                guardian.FrenziedRegeneration.BigStacks().Buff(),
                guardian.Ironfur.BigStacks().Buff(),
                guardian.Pulverize.DeBuff(),
                guardian.BristlingFur.Buff()
                // Incarnation,
                ).AddBottomBar(
                guardian.Dash.Buff(),
                guardian.WildCharge,
                guardian.StampedingRoar.Buff(),
                guardian.SkullBash
                ).AddTopBar(
                guardian.Ironfur.Buff().Passive(),
                guardian.InfectedWounds.DeBuff().Passive(),
                guardian.ToothAndClaw.Passive().DeBuff().BigStacks(),
                guardian.GalacticGuardian.Passive().DeBuff()
                ).AddAlerts(
                guardian.Barkskin.Buff().Passive(),
                guardian.FrenziedRegeneration.Buff().Passive(),
                guardian.SurvivalInstincts.Buff().Passive(),
                guardian.CatForm.Buff().Passive(),
                guardian.MoonkinForm.Buff().Passive(),
                guardian.BearForm.MissingBuff().Passive()
                ).Build(wa);
        }
Example #33
0
 public void NewSpecBuilderShouldHaveZeroItems()
 {
     var spec = new SpecBuilder<int>();
     spec.Items.Should().Have.Count.EqualTo(0);
 }