static void Main() { var sub0s = new Sub0[] { new Sub0() }; var sub1s = new Sub1[] { new Sub1() }; doStuff(sub0s, sub1s); }
public static unsafe void Entry() { char *[] cc = null; int *[] ii = null; short *[] ss = null; var cls = new Sub2(); cls.Foo(cc, ii); cls.Foo(cc, ss); Inf <int *[]> inf = cls; inf.Foo(cc, ii); Inf2 <short *[]> inf2 = cls; inf2.Foo(cc, ss); var cls2 = new Cls <long *[]>(); Sub1 <int *[]> s1 = cls; s1.Foo(cc, ii); s1.Foo(cc, ss); new Cls <int *[]>(); }
public static void Entry() { IInf inf = new Sub1(); inf.foo(123); inf = new Sub2(); inf.foo(456); }
public static int Entry() { char *[] cc = new char *[1]; int *[] ii = new int *[1]; short *[] ss = new short *[1]; var cls = new Sub2(); cls.Foo(cc, ii); if (path != 1) { return(1); } cls.Foo(cc, ss); if (path != 2) { return(2); } Inf <int *[]> inf = cls; inf.Foo(cc, ii); if (path != 1) { return(3); } Inf2 <short *[]> inf2 = cls; inf2.Foo(cc, ss); if (path != 2) { return(4); } var cls2 = new Cls <long *[]>(); Sub1 <int *[]> s1 = cls; s1.Foo(cc, ii); if (path != 1) { return(5); } s1.Foo(cc, ss); if (path != 2) { return(6); } new Cls <int *[]>(); return(0); }
public void LoadOKTW() { Sub1 = Config.AddSubMenu("Logo"); Sub1.Add("logoa", new CheckBox("Intro logo OKTW")); if (getCheckBoxItem(Sub1, "logoa")) { Intro = new Render.Sprite(LoadImg("intro"), new Vector2((Drawing.Width / 2) - 500, (Drawing.Height / 2) - 350)); Intro.Add(0); Intro.OnDraw(); } LeagueSharp.Common.Utility.DelayAction.Add(7000, () => Intro.Remove()); Sub = Config.AddSubMenu("Utility, Draws OKTW©"); Sub.Add("disableDraws", new CheckBox("DISABLE UTILITY DRAWS", false)); Sub.AddGroupLabel("Enemy info grid"); Sub.Add("championInfo", new CheckBox("Game Info")); Sub.Add("ShowKDA", new CheckBox("Show flash and R CD")); Sub.Add("ShowRecall", new CheckBox("Show recall")); Sub.Add("posX", new Slider("posX", 20, 0, 100)); Sub.Add("posY", new Slider("posY", 10, 0, 100)); Sub.AddSeparator(); Sub.Add("GankAlert", new CheckBox("Gank Alert")); Sub.Add("HpBar", new CheckBox("Dmg indicators BAR OKTW© style")); Sub.Add("ShowClicks", new CheckBox("Show enemy clicks")); Sub.Add("SS", new CheckBox("SS notification")); Sub.Add("showWards", new CheckBox("Show hidden objects, wards")); Sub.Add("minimap", new CheckBox("Mini-map hack")); Tahoma13B = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = 14, Weight = FontWeight.Bold, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType }); Tahoma13 = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "Tahoma", Height = 14, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType }); TextBold = new Font(Drawing.Direct3DDevice, new FontDescription { FaceName = "Impact", Height = 30, Weight = FontWeight.Normal, OutputPrecision = FontPrecision.Default, Quality = FontQuality.ClearType }); Q = new LeagueSharp.Common.Spell(SpellSlot.Q); E = new LeagueSharp.Common.Spell(SpellSlot.E); W = new LeagueSharp.Common.Spell(SpellSlot.W); R = new LeagueSharp.Common.Spell(SpellSlot.R); Drawing.OnDraw += OnDraw; Drawing.OnEndScene += Drawing_OnEndScene; }
public static void Entry() { var cls = new Sub3(); Inf inf = cls; int a = inf.getWidth(); a = inf.getHeight(); Sub1 t2d = cls; a = t2d.getWidth(); a = t2d.getHeight(); }
public void TestDispatchFunc() { var sub1Orig = new Sub1(); var sub2Orig = new Sub2(); var dispatcher = new PerTypeDispatcher<Base, Base>(false) { (Sub1 sub1) => sub1, (Sub2 sub2) => sub2 }; dispatcher.Dispatch(sub1Orig).Should().BeSameAs(sub1Orig); dispatcher.Dispatch(sub2Orig).Should().BeSameAs(sub2Orig); }
public void TestDispatchFunc() { var sub1Orig = new Sub1(); var sub2Orig = new Sub2(); var dispatcher = new PerTypeDispatcher <Base, Base>(false) { (Sub1 sub1) => sub1, (Sub2 sub2) => sub2 }; dispatcher.Dispatch(sub1Orig).Should().BeSameAs(sub1Orig); dispatcher.Dispatch(sub2Orig).Should().BeSameAs(sub2Orig); }
static void Main(string[] args) { while (true) { Console.WriteLine("" + "Choose Implementation:\n" + "1)Echo\n" + "2)EchoNotify\n" + "3)EchoNotifyBinding\n" + "4)EchoNotifyBindingAlternating"); var imput = Console.ReadLine(); int caseswitch; if (imput == "q") { return; } else if (imput == "1" || imput == "2" || imput == "3" || imput == "4") { caseswitch = int.Parse(imput); switch (caseswitch) { case (1): Sub1.Run(); break; case (2): Sub2.Run(); break; case (3): Sub3.Run(); break; case (4): Sub4.Run(); break; } } else { Console.WriteLine("invlaid keypress"); } } }
public ConstructorDestType(Sub1 value, IEnumerable <Sub1> valueList, Sub2 valueEnum) { if (value == null) { throw new ArgumentNullException("value"); } if (valueList == null) { throw new ArgumentNullException("valueList"); } if (!Enum.IsDefined(typeof(Sub2), valueEnum)) { throw new ArgumentOutOfRangeException("valueEnum"); } _value = value; _valueList = valueList; _valueEnum = valueEnum; }
public void TestDispatchAction() { var sub1Orig = new Sub1(); Sub1 sub1Dispatched = null; var sub2Orig = new Sub2(); Sub2 sub2Dispatched = null; var dispatcher = new PerTypeDispatcher<Base>(false) { (Sub1 sub1) => sub1Dispatched = sub1, (Sub2 sub2) => sub2Dispatched = sub2 }; dispatcher.Dispatch(sub1Orig); sub1Dispatched.Should().BeSameAs(sub1Orig); dispatcher.Dispatch(sub2Orig); sub2Dispatched.Should().BeSameAs(sub2Orig); }
public void TestDispatchAction() { var sub1Orig = new Sub1(); Sub1 sub1Dispatched = null; var sub2Orig = new Sub2(); Sub2 sub2Dispatched = null; var dispatcher = new PerTypeDispatcher <Base>(false) { (Sub1 sub1) => sub1Dispatched = sub1, (Sub2 sub2) => sub2Dispatched = sub2 }; dispatcher.Dispatch(sub1Orig); sub1Dispatched.Should().BeSameAs(sub1Orig); dispatcher.Dispatch(sub2Orig); sub2Dispatched.Should().BeSameAs(sub2Orig); }
public void IfIsATest() { Base s1 = new Sub1(); Base s2 = new Sub2(); Base s3 = new Sub3(); s1.IfIsA((Sub1 s) => { s.Value = 2; }); Assert.AreEqual(2, ((Sub1)s1).Value); s2.IfIsA((Sub1 s) => { s.Value = 3; }); Assert.AreEqual(42, ((Sub2)s2).Value); Assert.AreEqual(2, s1.IfIsA((Sub1 s) => s.Value)); Assert.AreEqual(0, s1.IfIsA((Sub2 s) => s.Value)); Assert.AreEqual(2, s1.IfIsA((Sub1 s) => s.Value, (Sub2 s) => s.Value)); Assert.AreEqual(42, s2.IfIsA((Sub1 s) => s.Value, (Sub2 s) => s.Value)); Assert.AreEqual(0, s3.IfIsA((Sub1 s) => s.Value, (Sub2 s) => s.Value)); }
public ConstructorDestType(Sub1 value, IEnumerable <Sub1> valueList) : this(value, valueList, Sub2.EnumValue1) { }
public ConstructorDestTypeSingleNestedClassProperty(Sub1 value) { Value = value; }
private void Loadsub1() { Sub1 sub1 = new Sub1(); this.LoadFrame(sub1); }