Пример #1
0
        public void WhenAGenericInterfaceIsSearchedFor_ThenToCorrenspondingGenericImplementationIsResolved()
        {
            // Act
            var     rootObject = TabObject.Resolve <IA>();
            IG <IF> control    = rootObject.Find <IG <IF> >();
            IF      item       = control.Item;

            // Check
            Assert.AreEqual(typeof(G <IF>), control.GetType());
            Assert.AreEqual(typeof(F), control.Item.GetType());
        }
Пример #2
0
        public override void Execute()
        {
            if (Config.Drawings.ShowKillable)
            {
                DamageIndicator.DamageToUnit = GetComboDamage;
            }

            if (Player.Instance.GetSpellSlotFromName("summonerdot") == SpellSlot.Summoner1 ||
                Player.Instance.GetSpellSlotFromName("summonerdot") == SpellSlot.Summoner2)
            {
                if (ObjectManager.Player.IsDead || !IG.IsReady() || !Settings.UseIgnite)
                {
                    return;
                }
                if (ObjectManager.Get <AIHeroClient>().Where(
                        h =>
                        h.IsValidTarget(IG.Range) &&
                        h.Health <
                        ObjectManager.Player.GetSummonerSpellDamage(h, DamageLibrary.SummonerSpells.Ignite)).Count() <=
                    0)
                {
                    return;
                }

                var target = ObjectManager.Get <AIHeroClient>()
                             .Where(
                    h =>
                    h.IsValidTarget(IG.Range) &&
                    h.Health <
                    ObjectManager.Player.GetSummonerSpellDamage(h, DamageLibrary.SummonerSpells.Ignite));
                if (Config.Modes.Perma.igniteMode.Equals("0"))
                {
                    IG.Cast(target.First());
                }
                else
                {
                    if (target.First().Distance(Player.Instance) > 450 || (Player.Instance.HealthPercent < 25))
                    {
                        IG.Cast(target.First());
                    }
                }
            }

            if (Settings.UseW)
            {
                var target = TargetSelector.GetTarget(W.Range, DamageType.Magical);

                if (target != null && target.IsEnemy && target.Distance(Player.Instance.Position) > Player.Instance.AttackRange && (DamageLibrary.GetSpellDamage(Player.Instance, target, SpellSlot.W)) > target.Health)
                {
                    W.Cast(target.Position);
                }
            }
        }
Пример #3
0
        static void Main(string[] args)
        {
            var vk = new VK();
            var ig = new IG();
            var fb = new FB();

            var countUsers = r.Next(3, 6);
            var usersVK    = GetRandomUsers(countUsers); // просто данные пользователей
            var usersIG    = GetRandomUsers(countUsers);
            var usersFB    = GetRandomUsers(countUsers);

            AddUsersInSocialNetwork(usersVK, vk);
            AddUsersInSocialNetwork(usersIG, ig);
            AddUsersInSocialNetwork(usersFB, fb);

            vk.ShowUsers();
            ig.ShowUsers();
            fb.ShowUsers();

            AddRandomFriendsToUsersInSocialnetwork(usersVK, vk);
            AddRandomFriendsToUsersInSocialnetwork(usersIG, ig);
            AddRandomFriendsToUsersInSocialnetwork(usersFB, fb);

            vk.ShowUsers();
            ig.ShowUsers();
            fb.ShowUsers();

            vk.LoginAllUsers();
            vk.CrashSystem();
            Thread.Sleep(1000);

            fb.LoginAllUsers();
            fb.CrashSystem();
            Thread.Sleep(1000);

            ig.LoginAllUsers();
            ig.CrashSystem();
            Thread.Sleep(1000);

            vk.UnsubscribeUsers();
            vk.CrashSystem(); // событие произошло, но все отписаны = никто о нём не узнает
            vk.SubscribeUsers();

            Console.ForegroundColor = ConsoleColor.White;
        }
Пример #4
0
 public class F : IF { public F(IG g)
                       {
                       }
Пример #5
0
	public void Method (IG<double[][]> arg)
	{
	}
Пример #6
0
 public D4(IG <T> a, IG1 <T> b)
 {
     A = a;
     B = b;
 }
Пример #7
0
 public void Method(IG <double[][]> arg)
 {
 }