Exemple #1
0
        private static void TestMatch()
        {
            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo1 = new C1();

            RunTest("Match1", () => oo1.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo5 = new C5();

            RunTest("Match5", () => oo5.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo9 = new C9();

            RunTest("Match9", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo11 = new C11();

            RunTest("Match11", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo15 = new C15();

            RunTest("Match15", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo19 = new C19();

            RunTest("Match19", () => oo9.Match((C1 v) => 1).Match((C2 v) => 2).Match((C3 v) => 3).Match((C4 v) => 4).Match((C5 v) => 5).Match((C6 v) => 6).Match((C7 v) => 7).Match((C8 v) => 8).Match((C9 v) => 9));
        }
Exemple #2
0
        public static void TestMatch()
        {
            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo1 = new C1();

            RunTest("Match1", () => oo1.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo5 = new C5();

            RunTest("Match5", () => oo5.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo9 = new C9();

            RunTest("Match9", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo11 = new C11();

            RunTest("Match11", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo15 = new C15();

            RunTest("Match15", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));

            OneOf <C1, C2, C3, C4, C5, C6, C7, C8, C9> oo19 = new C19();

            RunTest("Match19", () => oo9.Match((C1 v) => 1, (C2 v) => 2, (C3 v) => 3, (C4 v) => 4, (C5 v) => 5, (C6 v) => 6, (C7 v) => 7, (C8 v) => 8, (C9 v) => 9));
        }
Exemple #3
0
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            const double step   = Math.PI * 2 / 10.0;
            const double offset = Math.PI;

            C0.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 0.0 * step) * 50.0);
            C0.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 0.0 * step) * 50.0);

            C1.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 1.0 * step) * 50.0);
            C1.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 1.0 * step) * 50.0);

            C2.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 2.0 * step) * 50.0);
            C2.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 2.0 * step) * 50.0);

            C3.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 3.0 * step) * 50.0);
            C3.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 3.0 * step) * 50.0);

            C4.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 4.0 * step) * 50.0);
            C4.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 4.0 * step) * 50.0);

            C5.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 5.0 * step) * 50.0);
            C5.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 5.0 * step) * 50.0);

            C6.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 6.0 * step) * 50.0);
            C6.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 6.0 * step) * 50.0);

            C7.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 7.0 * step) * 50.0);
            C7.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 7.0 * step) * 50.0);

            C8.SetValue(Canvas.LeftProperty, 50.0 + Math.Sin(offset + 8.0 * step) * 50.0);
            C8.SetValue(Canvas.TopProperty, 50 + Math.Cos(offset + 8.0 * step) * 50.0);
        }
Exemple #4
0
    public static void Run()
    {
        if (c5 == null)
        {
            c5 = new C5();

        }
        try
        {

            throw new NotImplementedException("E2");
        }
        catch (NotSupportedException err)
        {
            Debug.Log("not here.");
        }
        catch (NotImplementedException err)
        {
            Debug.Log("Got.");
        }
        catch (Exception err)
        {
            Debug.Log("Got 2.");
        }
    }
    public void setRespFalse()
    {
        A1.SetActive(false);
        A2.SetActive(false);
        A3.SetActive(false);
        A4.SetActive(false);
        A5.SetActive(false);
        A6.SetActive(false);
        A7.SetActive(false);

        B1.SetActive(false);
        B2.SetActive(false);
        B3.SetActive(false);
        B4.SetActive(false);
        B5.SetActive(false);
        B6.SetActive(false);
        B7.SetActive(false);

        C1.SetActive(false);
        C2.SetActive(false);
        C3.SetActive(false);
        C4.SetActive(false);
        C5.SetActive(false);
        C6.SetActive(false);
        C7.SetActive(false);
    }
Exemple #6
0
        public CompositeObstacle(C5.ICollection<Obstacle> obstacles)
        {
            Bodies = new LinkedList<Body>();

            foreach (Obstacle o in obstacles)
                Bodies.Add(o.Body);
        }
        static int T2_LazyMap()
        {
            int sum = 0;

            for (int i = 0; i < repeats; i++)
            {
                foreach (var d in _testDataToSwitchOn)
                {
                    sum += _typeSwitchDispatch.GetIndex(d) switch
                    {
                        0 when d is C12 x => 12,
                        1 when d is C11 x => 11,
                        2 when d is C10 x => 10,
                        3 when d is C9 x => 9,
                        4 when d is C8 x => 8,
                        5 when d is C7 x => 7,
                        6 when d is C6 x => 6,
                        7 when d is C5 x => 5,
                        8 when d is C4 x => 4,
                        9 when d is C3 x => 3,
                        10 when d is C2 x => 2,
                        11 when d is C1 x => 1,
                        -1 => - 1,
                        _ => throw null,
                    };
                }
            }

            return(sum);
        }
Exemple #8
0
 public ActionResult <Employee> GetEmployee(string email) => email
 .Apply(C5.createEmailAddress).Apply(fs)
 .Map(email =>
      fs(C5.getEmployeeByEmail(_db, email))
      .Map(e => (ActionResult <Employee>)Ok(e))
      .IfNone(() => NotFound()))
 .IfNone(() =>
         BadRequest("Invalid email address"));
Exemple #9
0
        public Customer(C5.Debitor Debitor)
        {
            this._id = Guid.NewGuid ();
            this._createtimestamp = SNDK.Date.CurrentDateTimeToTimestamp ();
            this._updatetimestamp = SNDK.Date.CurrentDateTimeToTimestamp ();
            this._erpid = string.Empty;

            this._c5debitor = Debitor;
        }
    void Start()
    {
        Profiler.BeginSample("A");
        var a = new A6();

        Profiler.EndSample();

        Profiler.BeginSample("B");
        B b = new B();

        Profiler.EndSample();

        Profiler.BeginSample("S1");
        S1 s1 = new S1();

        Profiler.EndSample();

        Profiler.BeginSample("Empty");
        Empty e0 = new Empty();

        Profiler.EndSample();

        Profiler.BeginSample("C1");
        C1 c1 = new C1();

        Profiler.EndSample();

        Profiler.BeginSample("C2");
        C2 c2 = new C2();

        Profiler.EndSample();

        Profiler.BeginSample("C3");
        C3 c3 = new C3();

        Profiler.EndSample();

        Profiler.BeginSample("C4");
        C4 c4 = new C4();

        Profiler.EndSample();

        Profiler.BeginSample("C5");
        C5 c5 = new C5();

        Profiler.EndSample();

        Profiler.BeginSample("C6");
        C6 c6 = new C6();

        Profiler.EndSample();

        Profiler.BeginSample("C7");
        C7 c7 = new C7();

        Profiler.EndSample();
    }
        public void SubscribingInsideHandlerDoesNotThrow()
        {
            var target = new C5();

            target.EventAggregator = this.ea;
            this.ea.Subscribe(target);

            this.ea.Publish(new M1());
        }
        static int T1_TypeSwitch()
        {
            int sum = 0;

            for (int i = 0; i < repeats; i++)
            {
                foreach (var d in _testDataToSwitchOn)
                {
                    sum += d switch
                    {
                        //C40 _ => 40,
                        //C39 _ => 39,
                        //C38 _ => 38,
                        //C37 _ => 37,
                        //C36 _ => 36,
                        //C35 _ => 35,
                        //C34 _ => 34,
                        //C33 _ => 33,
                        //C32 _ => 32,
                        //C31 _ => 31,
                        //C30 _ => 30,
                        //C29 _ => 29,
                        //C28 _ => 28,
                        //C27 _ => 27,
                        //C26 _ => 26,
                        //C25 _ => 25,
                        //C24 _ => 24,
                        //C23 _ => 23,
                        //C22 _ => 22,
                        //C21 _ => 21,
                        //C20 _ => 20,
                        //C19 _ => 19,
                        //C18 _ => 18,
                        //C17 _ => 17,
                        //C16 _ => 16,
                        //C15 _ => 15,
                        //C14 _ => 14,
                        //C13 _ => 13,
                        C12 _ => 12,
                        C11 _ => 11,
                        C10 x => 10,
                        C9 x => 9,
                        C8 x => 8,
                        C7 x => 7,
                        C6 x => 6,
                        C5 x => 5,
                        C4 x => 4,
                        C3 x => 3,
                        C2 x => 2,
                        C1 x => 1,
                             _ => - 1
                    };
                }
            }

            return(sum);
        }
Exemple #13
0
 public void reset()
 {
     C1.reset();
     C2.reset();
     C3.reset();
     C4.reset();
     C5.reset();
     count = 2;
     Random rnd = new Random();
 }
Exemple #14
0
        public void TestOrderTransitiveRunBefore()
        {
            var a = new A5();
            var b = new B5();
            var c = new C5();
            var s = new IBuildStep[] { b, a, c };

            var sorted = Builder.SortSteps(s);

            Assert.That(sorted, Is.EqualTo(new IBuildStep[] { a, b, c }));
        }
Exemple #15
0
        public void TestWithMethodWithGenericReturnType()
        {
            Func <int, int> f = a => {
                var c = new C5 <int> {
                    t = a
                };
                return(c.Get());
            };

            this.Test(f);
        }
    static C6 M2(bool arg0)
    {
        if (arg0)
        {
            ushort var0 = 2;
        }
        else
        {
            C5 var1 = new C5(true, new C3(-2251605158321788193L, 17733116461260906132UL, -29726, 1, -26235, 9223372036854775806L, 4294967295U, 64, 10), 2UL);
        }

        arg0 = false;
        return(new C6(1UL, 29201, -10L, 14956947115482565057UL, 18446744073709551614UL, 124, 4294967295U, 1L, 2, new S1('(', 'i')));
    }
Exemple #17
0
    public static void Main()
    {
        // Build a collection of all vehicles that fly
        List <IAir> aircrafts = new List <IAir>();
        C5          galaxy    = new C5();

        aircrafts.Add(galaxy);
        Cessna bird = new Cessna();

        aircrafts.Add(bird);
        Boieng747 southwest = new Boieng747();

        aircrafts.Add(southwest);
        // With a single `foreach`, have each vehicle Fly()
        foreach (var air in aircrafts)
        {
            air.Fly();
        }

        // Build a collection of all vehicles that operate on roads
        List <ILand> rovers     = new List <ILand>();
        Motorcycle   motorcycle = new Motorcycle();
        StationWagon leBaron    = new StationWagon();
        Lancer       lancer     = new Lancer();

        rovers.Add(motorcycle);
        rovers.Add(leBaron);
        rovers.Add(lancer);
        // With a single `foreach`, have each road vehicle Drive()
        foreach (var rover in rovers)
        {
            rover.Drive();
        }

        // Build a collection of all vehicles that operate on water
        List <IWater> floats   = new List <IWater>();
        JetSki        yamaha   = new JetSki();
        Speedboat     smuggler = new Speedboat();
        Yacht         money    = new Yacht();

        floats.Add(yamaha);
        floats.Add(smuggler);
        floats.Add(money);
        // With a single `foreach`, have each water vehicle Drive()
        foreach (var floaties in floats)
        {
            floaties.Drive();
        }
    }
Exemple #18
0
        public static void TestI3()
        {
            I3 i;

            var a = new C4();

            i = a;
            Assert.AreEqual("C4", a.Foo());
            Assert.AreEqual("C4", i.Foo());

            var b = new C5();

            i = b;
            Assert.AreEqual("C4", b.Foo());
            Assert.AreEqual("C5", i.Foo());
        }
Exemple #19
0
        static void Main(string[] args)
        {
            C1 c1 = new C1();
            C2 c2 = new C2();
            C3 c3 = new C3();

            // Constructor injection
            C4 ExampleClass1 = new C4(c1, c2, c3);

            ExampleClass1.DoStuff();

            // Method injection
            C5 ExampleClass2 = new C5();

            ExampleClass2.DoStuff(c1, c2, c3);

            Console.ReadKey();
        }
Exemple #20
0
    public static void Run(dynamic d)
    {
        // Targets: C1.Method(), C2.Method(), C3.Method(), C4.Method(), C5.Method(), C6.Method()
        d.Method();

        // Targets: C1.Method(), C2.Method(), C3.Method(), C4.Method()
        d.Field.Method();

        dynamic dyn = new C1();

        // Targets: C3.Method()
        dyn.Field.Method();

        // Targets: C3.Method(), C4.Method()
        d.Field.Field.Method();

        dyn = new C5();
        // Targets: C3.Method()
        dyn.Field.Field.Method();
    }
Exemple #21
0
        public void Run()
        {
            C1     c1      = new C1();
            string c1_name = c1.GetNmae(); //C1.virtual
            C2     c2      = new C2();
            string c2_name = c2.GetNmae(); //C2.override
            C3     c3      = new C3();
            string c3_name = c3.GetNmae(); //C1.virtual

            C1     c12      = new C2();
            string c12_name = c12.GetNmae(); //C2.override
            C1     c13      = new C3();
            string c13_name = c13.GetNmae(); //C1.virtual

            C1     c42      = new C42();
            string c42_name = c42.GetNmae();//C2.override

            C5     c5      = new C5();
            string c5_name = c5.GetNmae();//C0
        }
    static int M5()
    {
        {
            s_2.F2.F1 = s_2.F2.F1;
        }

        if (true)
        {
            if (4294967295U >= -5)
            {
                if (true)
                {
                    s_2.F4 = 610802957;
                }
                else
                {
                    M6();
                }

                byte[] var0 = new byte[] { 246, 1, 0 };
            }
            else
            {
                {
                    s_2.F3 = '.';
                    s_3   ^= s_2.F4;
                }

                s_2.F4 ^= s_2.F4;
                s_2.F1  = '^';
            }

            {
                s_1 = (ulong)M7(new C5[] { new C5(171, 'D', new C4(36941, -4055767518451270510L), 'Y', 1), new C5(81, '*', new C4(1, -875883621995544335L), '<', -10), new C5(145, ',', new C4(34966, 1L), '7', -2147483647), new C5(1, '5', new C4(0, -596572364240990812L), 'N', 1), new C5(235, '7', new C4(64557, 6753286183425324512L), ')', -451771066), new C5(87, '`', new C4(57826, -2187121289325175751L), 'E', -547245092), new C5(253, '"', new C4(0, 3752289735105624117L), 'b', 0), new C5(2, '/', new C4(7351, -4156837638221155771L), 'a', 683738470), new C5(50, 'u', new C4(0, 6470752290738347819L), 'V', 1285571445), new C5(29, 'R', new C4(49279, -6860503195053292080L), '[', -986827946) }, -32767, s_1, new C4(45360, 1241566331952011883L));
            }

            s_2 = s_2;
        }

        return(-2);
    }
Exemple #23
0
        public void T04_CyclicReference()
        {
            using (var ms = new MemoryStream())
            {
                var s = new SlimSerializer();

                var c6  = new C6();
                var dIn = new C5()
                {
                    FC6 = c6
                };
                c6.FC5 = dIn;

                s.Serialize(ms, dIn);
                ms.Seek(0, SeekOrigin.Begin);

                var dOut = (C5)s.Deserialize(ms);

                Assert.AreSame(dOut, dOut.FC6.FC5);
            }
        }
Exemple #24
0
 public static void Run()
 {
     if (c5 == null)
     {
         c5 = new C5();
     }
     try
     {
         throw new NotImplementedException("E2");
     }
     catch (NotSupportedException err)
     {
         Debug.Log("not here.");
     }
     catch (NotImplementedException err)
     {
         Debug.Log("Got.");
     }
     catch (Exception err)
     {
         Debug.Log("Got 2.");
     }
 }
    internal void CalculateNormal(C5.IPriorityQueue<CloudPoint> neighbors)
    {
        Vector avg = neighbors.Aggregate(new Vector(3), (sum, val) => sum + val.location) / (double)neighbors.Count;

        Matrix cov = ((double)1 / neighbors.Count) *
                            neighbors.Aggregate(new Matrix(3, 3),
                                                        (sum, val) => sum +
                                                                    (val.location - avg).ToColumnMatrix() *
                                                                    (val.location - avg).ToRowMatrix());

        // that dude says the smallest eigenvalue is the normal
        // first column of eigenvectors is the smallest eigenvalued one
        normal = cov.EigenVectors.GetColumnVector(0);

        // orient normal toward viewpoint

        // to do this we have to push the origin into the world frame
         //v = ZigInput.ConvertImageToWorldSpace(v);
        var viewp = ZigInput.ConvertImageToWorldSpace(Vector3.zero);

        normal = ((normal * (viewp.ToVector() - this.location)) > 0 ? normal : -normal);
        normal.Normalize();
    }
        /// <summary>
        /// Load Event
        /// </summary>
        /// <param name="sender">sender Parameter</param>
        /// <param name="e">Argument Parameter</param>
        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            const double Step   = Math.PI * 2 / 10.0;
            const double Offset = Math.PI;

            C0.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (0.0 * Step)) * 50.0));
            C0.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (0.0 * Step)) * 50.0));
            C1.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (1.0 * Step)) * 50.0));
            C1.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (1.0 * Step)) * 50.0));
            C2.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (2.0 * Step)) * 50.0));
            C2.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (2.0 * Step)) * 50.0));
            C3.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (3.0 * Step)) * 50.0));
            C3.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (3.0 * Step)) * 50.0));
            C4.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (4.0 * Step)) * 50.0));
            C4.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (4.0 * Step)) * 50.0));
            C5.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (5.0 * Step)) * 50.0));
            C5.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (5.0 * Step)) * 50.0));
            C6.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (6.0 * Step)) * 50.0));
            C6.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (6.0 * Step)) * 50.0));
            C7.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (7.0 * Step)) * 50.0));
            C7.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (7.0 * Step)) * 50.0));
            C8.SetValue(Canvas.LeftProperty, 50.0 + (Math.Sin(Offset + (8.0 * Step)) * 50.0));
            C8.SetValue(Canvas.TopProperty, 50 + (Math.Cos(Offset + (8.0 * Step)) * 50.0));
        }
Exemple #27
0
 private void C5_Tick(object sender, EventArgs e)
 {
     PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5C^7lient ^21 ^5M^7enu\n\nGod Mode\nMax Ammo\nAll Perks\nRapide Fire\n^2-->^5Lock Controller");
     if (Key_IsDown((uint)0) == "R1")
     {
         C5.Stop();
         C1.Start();
     }
     if (Key_IsDown((uint)0) == "X")
     {
         byte[] buffer = new byte[] { 0x01 };
         PS3.SetMemory(0x012323b7, buffer);
     }
     if (Key_IsDown((uint)0) == "R3")
     {
         C5.Stop();
         HostMenuMain.Start();
     }
     if (Key_IsDown((uint)0) == "L1")
     {
         C5.Stop();
         C4.Start();
     }
 }
Exemple #28
0
        private void towerChange(Tower tower)
        {
            A1.Invoke((Action) delegate { A1.Visible = false; });
            A2.Invoke((Action) delegate { A2.Visible = false; });
            A3.Invoke((Action) delegate { A3.Visible = false; });
            A4.Invoke((Action) delegate { A4.Visible = false; });
            A5.Invoke((Action) delegate { A5.Visible = false; });
            A6.Invoke((Action) delegate { A6.Visible = false; });
            B1.Invoke((Action) delegate { B1.Visible = false; });
            B2.Invoke((Action) delegate { B2.Visible = false; });
            B3.Invoke((Action) delegate { B3.Visible = false; });
            B4.Invoke((Action) delegate { B4.Visible = false; });
            B5.Invoke((Action) delegate { B5.Visible = false; });
            B6.Invoke((Action) delegate { B6.Visible = false; });
            C1.Invoke((Action) delegate { C1.Visible = false; });
            C2.Invoke((Action) delegate { C2.Visible = false; });
            C3.Invoke((Action) delegate { C3.Visible = false; });
            C4.Invoke((Action) delegate { C4.Visible = false; });
            C5.Invoke((Action) delegate { C5.Visible = false; });
            C6.Invoke((Action) delegate { C6.Visible = false; });



            if (tower.A[0] != 0)
            {
                A1.Invoke((Action) delegate { A1.Text = (tower.A[0] + ""); });
                A1.Invoke((Action) delegate { A1.Visible = true; });
            }

            if (tower.A[1] != 0)
            {
                A2.Invoke((Action) delegate { A2.Text = (tower.A[1] + ""); });
                A2.Invoke((Action) delegate { A2.Visible = true; });
            }

            if (tower.A[2] != 0)
            {
                A3.Invoke((Action) delegate { A3.Text = (tower.A[2] + ""); });
                A3.Invoke((Action) delegate { A3.Visible = true; });
            }
            if (tower.A[3] != 0)
            {
                A4.Invoke((Action) delegate { A4.Text = (tower.A[3] + ""); });
                A4.Invoke((Action) delegate { A4.Visible = true; });
            }
            if (tower.A[4] != 0)
            {
                A5.Invoke((Action) delegate { A5.Text = (tower.A[4] + ""); });
                A5.Invoke((Action) delegate { A5.Visible = true; });
            }
            if (tower.A[5] != 0)
            {
                A6.Invoke((Action) delegate { A6.Text = (tower.A[5] + ""); });
                A6.Invoke((Action) delegate { A6.Visible = true; });
            }


            if (tower.B[0] != 0)
            {
                B1.Invoke((Action) delegate { B1.Text = (tower.B[0] + ""); });
                B1.Invoke((Action) delegate { B1.Visible = true; });
            }

            if (tower.B[1] != 0)
            {
                B2.Invoke((Action) delegate { B2.Text = (tower.B[1] + ""); });
                B2.Invoke((Action) delegate { B2.Visible = true; });
            }

            if (tower.B[2] != 0)
            {
                B3.Invoke((Action) delegate { B3.Text = (tower.B[2] + ""); });
                B3.Invoke((Action) delegate { B3.Visible = true; });
            }
            if (tower.B[3] != 0)
            {
                B4.Invoke((Action) delegate { B4.Text = (tower.B[3] + ""); });
                B4.Invoke((Action) delegate { B4.Visible = true; });
            }
            if (tower.B[4] != 0)
            {
                B5.Invoke((Action) delegate { B5.Text = (tower.B[4] + ""); });
                B5.Invoke((Action) delegate { B5.Visible = true; });
            }
            if (tower.B[5] != 0)
            {
                B6.Invoke((Action) delegate { B6.Text = (tower.B[5] + ""); });
                B6.Invoke((Action) delegate { B6.Visible = true; });
            }


            if (tower.C[0] != 0)
            {
                C1.Invoke((Action) delegate { C1.Text = (tower.C[0] + ""); });
                C1.Invoke((Action) delegate { C1.Visible = true; });
            }

            if (tower.C[1] != 0)
            {
                C2.Invoke((Action) delegate { C2.Text = (tower.C[1] + ""); });
                C2.Invoke((Action) delegate { C2.Visible = true; });
            }

            if (tower.C[2] != 0)
            {
                C3.Invoke((Action) delegate { C3.Text = (tower.C[2] + ""); });
                C3.Invoke((Action) delegate { C3.Visible = true; });
            }
            if (tower.C[3] != 0)
            {
                C4.Invoke((Action) delegate { C4.Text = (tower.C[3] + ""); });
                C4.Invoke((Action) delegate { C4.Visible = true; });
            }
            if (tower.C[4] != 0)
            {
                C5.Invoke((Action) delegate { C5.Text = (tower.C[4] + ""); });
                C5.Invoke((Action) delegate { C5.Visible = true; });
            }
            if (tower.C[5] != 0)
            {
                C6.Invoke((Action) delegate { C6.Text = (tower.C[5] + ""); });
                C6.Invoke((Action) delegate { C6.Visible = true; });
            }
        }
        private void CollectCreatedAssetIdsFromUserInventory(UUID creatorId, C5.HashSet<UUID> retAssets)
        {
            IInventoryProviderSelector selector = ProviderRegistry.Instance.Get<IInventoryProviderSelector>();
            IInventoryStorage provider = selector.GetProvider(creatorId);

            List<InventoryFolderBase> skel = provider.GetInventorySkeleton(creatorId);
            foreach (InventoryFolderBase folder in skel)
            {
                InventoryFolderBase fullFolder = provider.GetFolder(folder.ID);
                foreach (InventoryItemBase item in fullFolder.Items)
                {
                    if (m_allowedCreatorIds.Contains(item.CreatorIdAsUuid))
                    {
                        retAssets.Add(item.AssetID);
                    }
                }
            }
        }
        private void RecursiveCollectSubfoldersAndItems(UUID id, UUID ownerId, List<UUID> allFolders, List<UUID> allItems, C5.HashSet<UUID> rootItems, C5.HashSet<UUID> rootFolders, bool isRoot,
            Dictionary<Guid, InventoryFolderBase> index, StringBuilder debugFolderList)
        {
            if (index == null)
            {
                index = GetFolderIndex(ownerId);
            }

            InventoryFolderBase folder;
            try
            {
                folder = this.GetFolder(id);
            }
            catch (InventoryObjectMissingException)
            {
                //missing a folder is not a fatal exception, it could indicate a corrupted or temporarily
                //inconsistent inventory state. this should not stop the remainder of the collection
                _log.WarnFormat("[Inworldz.Data.Inventory.Cassandra] Found missing folder with subFolder index remaining in parent. Inventory may need subfolder index maintenance.");
                return;
            }
            catch (InventoryStorageException e)
            {
                if (e.InnerException != null && e.InnerException is KeyNotFoundException)
                {
                    //not a fatal exception, it could indicate a corrupted or temporarily
                    //inconsistent inventory state. this should not stop the remainder of the collection
                    _log.WarnFormat("[Inworldz.Data.Inventory.Cassandra] Found corrupt folder with subFolder index remaining in parent. User inventory needs subfolder index maintenance.");
                    return;
                }
                else
                {
                    throw;
                }
            }

            foreach (InventoryItemBase item in folder.Items)
            {
                allItems.Add(item.ID);

                if (isRoot)
                {
                    rootItems.Add(item.ID);
                }

                debugFolderList.AppendLine("I " + item.ID.ToString() + " " + item.Name);
            }

            foreach (InventoryNodeBase subFolder in folder.SubFolders)
            {
                if (subFolder.Owner != ownerId)
                {
                    throw new UnrecoverableInventoryStorageException(
                        String.Format("Changed owner found during recursive folder collection. Folder: {0}, Expected Owner: {1}, Found Owner: {2}",
                        subFolder.ID, ownerId, subFolder.Owner)); ;
                }


                if (SubfolderIsConsistent(subFolder.ID, folder.ID, index))
                {
                    debugFolderList.AppendLine("F " + subFolder.ID.ToString() + " " + subFolder.Name);

                    allFolders.Add(subFolder.ID);

                    if (isRoot)
                    {
                        rootFolders.Add(subFolder.ID);
                    }

                    this.RecursiveCollectSubfoldersAndItems(subFolder.ID, ownerId, allFolders, allItems, rootItems, rootFolders, false, index, debugFolderList);
                }
                else
                {
                    _log.WarnFormat("[Inworldz.Data.Inventory.Cassandra] Not recursing into folder {0} with parent {1}. Index is inconsistent", 
                        subFolder.ID, folder.ID);
                }
            }
        }
Exemple #31
0
    // Use this for initialization
    void Start()
    {
        PlayerIcon.GetComponent <SpriteRenderer>().enabled = true;
        A1.GetComponent <SpriteRenderer>().enabled         = false;
        A2.GetComponent <SpriteRenderer>().enabled         = false;
        A3.GetComponent <SpriteRenderer>().enabled         = false;
        A4.GetComponent <SpriteRenderer>().enabled         = false;
        A5.GetComponent <SpriteRenderer>().enabled         = false;
        A6.GetComponent <SpriteRenderer>().enabled         = false;
        A7.GetComponent <SpriteRenderer>().enabled         = false;
        A8.GetComponent <SpriteRenderer>().enabled         = false;
        A9.GetComponent <SpriteRenderer>().enabled         = false;
        A10.GetComponent <SpriteRenderer>().enabled        = false;
        A11.GetComponent <SpriteRenderer>().enabled        = false;
        B1.GetComponent <SpriteRenderer>().enabled         = false;
        B2.GetComponent <SpriteRenderer>().enabled         = false;
        B3.GetComponent <SpriteRenderer>().enabled         = false;
        B4.GetComponent <SpriteRenderer>().enabled         = false;
        B5.GetComponent <SpriteRenderer>().enabled         = false;
        B6.GetComponent <SpriteRenderer>().enabled         = false;
        B7.GetComponent <SpriteRenderer>().enabled         = false;
        B8.GetComponent <SpriteRenderer>().enabled         = false;
        B9.GetComponent <SpriteRenderer>().enabled         = false;
        B10.GetComponent <SpriteRenderer>().enabled        = false;
        B11.GetComponent <SpriteRenderer>().enabled        = false;
        C1.GetComponent <SpriteRenderer>().enabled         = false;
        C2.GetComponent <SpriteRenderer>().enabled         = false;
        C3.GetComponent <SpriteRenderer>().enabled         = false;
        C4.GetComponent <SpriteRenderer>().enabled         = false;
        C5.GetComponent <SpriteRenderer>().enabled         = false;
        C6.GetComponent <SpriteRenderer>().enabled         = false;
        C7.GetComponent <SpriteRenderer>().enabled         = false;
        C8.GetComponent <SpriteRenderer>().enabled         = false;
        C9.GetComponent <SpriteRenderer>().enabled         = false;
        C10.GetComponent <SpriteRenderer>().enabled        = false;
        C11.GetComponent <SpriteRenderer>().enabled        = false;
        D1.GetComponent <SpriteRenderer>().enabled         = false;
        D2.GetComponent <SpriteRenderer>().enabled         = false;
        D3.GetComponent <SpriteRenderer>().enabled         = false;
        D4.GetComponent <SpriteRenderer>().enabled         = false;
        D5.GetComponent <SpriteRenderer>().enabled         = false;
        D6.GetComponent <SpriteRenderer>().enabled         = false;
        D7.GetComponent <SpriteRenderer>().enabled         = false;
        D8.GetComponent <SpriteRenderer>().enabled         = false;
        D9.GetComponent <SpriteRenderer>().enabled         = false;
        D10.GetComponent <SpriteRenderer>().enabled        = false;
        D11.GetComponent <SpriteRenderer>().enabled        = false;
        E1.GetComponent <SpriteRenderer>().enabled         = false;
        E2.GetComponent <SpriteRenderer>().enabled         = false;
        E3.GetComponent <SpriteRenderer>().enabled         = false;
        E4.GetComponent <SpriteRenderer>().enabled         = false;
        E5.GetComponent <SpriteRenderer>().enabled         = false;
        E6.GetComponent <SpriteRenderer>().enabled         = false;
        E7.GetComponent <SpriteRenderer>().enabled         = false;
        E8.GetComponent <SpriteRenderer>().enabled         = false;
        E9.GetComponent <SpriteRenderer>().enabled         = false;
        E10.GetComponent <SpriteRenderer>().enabled        = false;
        E11.GetComponent <SpriteRenderer>().enabled        = false;
        F1.GetComponent <SpriteRenderer>().enabled         = false;
        F2.GetComponent <SpriteRenderer>().enabled         = false;
        F3.GetComponent <SpriteRenderer>().enabled         = false;
        F4.GetComponent <SpriteRenderer>().enabled         = false;
        F5.GetComponent <SpriteRenderer>().enabled         = false;
        F6.GetComponent <SpriteRenderer>().enabled         = false;
        F7.GetComponent <SpriteRenderer>().enabled         = false;
        F8.GetComponent <SpriteRenderer>().enabled         = false;
        F9.GetComponent <SpriteRenderer>().enabled         = false;
        F10.GetComponent <SpriteRenderer>().enabled        = false;
        F11.GetComponent <SpriteRenderer>().enabled        = false;
        G1.GetComponent <SpriteRenderer>().enabled         = false;
        G2.GetComponent <SpriteRenderer>().enabled         = false;
        G3.GetComponent <SpriteRenderer>().enabled         = false;
        G4.GetComponent <SpriteRenderer>().enabled         = false;
        G5.GetComponent <SpriteRenderer>().enabled         = false;
        G6.GetComponent <SpriteRenderer>().enabled         = false;
        G7.GetComponent <SpriteRenderer>().enabled         = false;
        G8.GetComponent <SpriteRenderer>().enabled         = false;
        G9.GetComponent <SpriteRenderer>().enabled         = false;
        G10.GetComponent <SpriteRenderer>().enabled        = false;
        G11.GetComponent <SpriteRenderer>().enabled        = false;
        H1.GetComponent <SpriteRenderer>().enabled         = false;
        H2.GetComponent <SpriteRenderer>().enabled         = false;
        H3.GetComponent <SpriteRenderer>().enabled         = false;
        H4.GetComponent <SpriteRenderer>().enabled         = false;
        H5.GetComponent <SpriteRenderer>().enabled         = false;
        H6.GetComponent <SpriteRenderer>().enabled         = false;
        H7.GetComponent <SpriteRenderer>().enabled         = false;
        H8.GetComponent <SpriteRenderer>().enabled         = false;
        H9.GetComponent <SpriteRenderer>().enabled         = false;
        H10.GetComponent <SpriteRenderer>().enabled        = false;
        H11.GetComponent <SpriteRenderer>().enabled        = false;
        I1.GetComponent <SpriteRenderer>().enabled         = false;
        I2.GetComponent <SpriteRenderer>().enabled         = false;
        I3.GetComponent <SpriteRenderer>().enabled         = false;
        I4.GetComponent <SpriteRenderer>().enabled         = false;
        I5.GetComponent <SpriteRenderer>().enabled         = false;
        I6.GetComponent <SpriteRenderer>().enabled         = false;
        I7.GetComponent <SpriteRenderer>().enabled         = false;
        I8.GetComponent <SpriteRenderer>().enabled         = false;
        I9.GetComponent <SpriteRenderer>().enabled         = false;
        I10.GetComponent <SpriteRenderer>().enabled        = false;
        I11.GetComponent <SpriteRenderer>().enabled        = false;
        J1.GetComponent <SpriteRenderer>().enabled         = false;
        J2.GetComponent <SpriteRenderer>().enabled         = false;
        J3.GetComponent <SpriteRenderer>().enabled         = false;
        J4.GetComponent <SpriteRenderer>().enabled         = false;
        J5.GetComponent <SpriteRenderer>().enabled         = false;
        J6.GetComponent <SpriteRenderer>().enabled         = false;
        J7.GetComponent <SpriteRenderer>().enabled         = false;
        J8.GetComponent <SpriteRenderer>().enabled         = false;
        J9.GetComponent <SpriteRenderer>().enabled         = false;
        J10.GetComponent <SpriteRenderer>().enabled        = false;
        J11.GetComponent <SpriteRenderer>().enabled        = false;
        K1.GetComponent <SpriteRenderer>().enabled         = false;
        K2.GetComponent <SpriteRenderer>().enabled         = false;
        K3.GetComponent <SpriteRenderer>().enabled         = false;
        K4.GetComponent <SpriteRenderer>().enabled         = false;
        K5.GetComponent <SpriteRenderer>().enabled         = false;
        K6.GetComponent <SpriteRenderer>().enabled         = false;
        K7.GetComponent <SpriteRenderer>().enabled         = false;
        K8.GetComponent <SpriteRenderer>().enabled         = false;
        K9.GetComponent <SpriteRenderer>().enabled         = false;
        K10.GetComponent <SpriteRenderer>().enabled        = false;
        K11.GetComponent <SpriteRenderer>().enabled        = false;
        float ratio = Screen.width / Screen.height;

        if (ratio < 2)
        {
            int screenx = 543;
            int screeny = 653;
        }
        else
        {
            int screenx = 743;
            int screeny = 853;
        }
    }
Exemple #32
0
        private static bool HasIntervalThatIsSubsetOfInterval(
            C5.TreeDictionary<ulong, ulong> regions,
            ulong regionStart,
            ulong regionEnd)
        {
            // Is there any region in whose [start, end] interval is a sub-interval of
            // [regionStart, regionEnd]?
            // TryWeakSuccessor gives us the first region whose start is >= regionStart,
            // but there could be more regions with start >= regionStart and end <= regionEnd.
            // Need to traverse successors until start > regionEnd, making containment impossible.
            C5.KeyValuePair<ulong, ulong> range;
            if (regions.TryWeakSuccessor(regionStart, out range))
            {
                if (range.Key >= regionStart && range.Value <= regionEnd)
                    return true;
            }
            while (regions.TrySuccessor(range.Key, out range))
            {
                if (range.Key > regionEnd)
                    break;

                if (range.Key >= regionStart && range.Value <= regionEnd)
                    return true;
            }
            return false;
        }
Exemple #33
0
    public void Run <T1, T2, T3>(C1 <T1, T2> x1, C1 <T1[], T2> x2, dynamic dyn, T3 t3)
    {
        // Viable callables: {C2,C3,C4,C5,C6,C7}.M()
        x1.M(default(T1), 8);
        // Viable callables: {C2,C3,C4,C5,C6,C7}.{get_Prop(),set_Prop()}
        x1.Prop = x1.Prop;
        // Viable callables: {C2,C3,C4,C5,C6,C7}.{get_Item(),set_Item()}
        x1[default(T2)] = x1[default(T2)];
        // Viable callables: {C2,C3,C4,C5,C6,C7}.{add_Event(),remove_Event()}
        x1.Event += () => { };
        x1.Event -= () => { };

        // Viable callables: {C4,C6}.M() (not C7.M(), as C7<T[]> is not constructed for any T)
        x2.M(new T1[0], false);
        // Viable callables: {C4,C6}.{get_Prop(),set_Prop()}
        x2.Prop = x2.Prop;
        // Viable callables: {C4,C6}.{get_Item(),set_Item()}
        x2[default(T2)] = x2[default(T2)];
        // Viable callables: {C4,C6}.{add_Event(),remove_Event()}
        x2.Event += () => { };
        x2.Event -= () => { };

        // Viable callables: {C2,C6}.M()
        C1 <string, int> x3 = Mock <C1 <string, int> >();

        x3.M("abc", 42);
        // Viable callables: {C2,C6}.{get_Prop(),set_Prop()}
        x3.Prop = x3.Prop;
        // Viable callables: {C2,C6}.{get_Item(),set_Item()}
        x3[0] = x3[0];
        // Viable callables: {C2,C6}.{add_Event(),remove_Event()}
        x3.Event += () => { };
        x3.Event -= () => { };

        // Viable callables: {C2,C3,C6}.M()
        C1 <string, decimal> x4 = Mock <C1 <string, decimal> >();

        x4.M("abc", 42d);
        // Viable callables: {C2,C3,C6}.{get_Prop(),set_Prop()}
        x4.Prop = x4.Prop;
        // Viable callables: {C2,C3,C6}.{get_Item(),set_Item()}
        x4[0M] = x4[0M];
        // Viable callables: {C2,C3,C6}.{add_Event(),remove_Event()}
        x4.Event += () => { };
        x4.Event -= () => { };

        // Viable callables: {C4,C6}.M()
        C1 <int[], bool> x5 = Mock <C1 <int[], bool> >();

        x5.M <object>(new int[] { 42 }, null);
        // Viable callables: {C4,C6}.{get_Prop(),set_Prop()}
        x5.Prop = x5.Prop;
        // Viable callables: {C4,C6}.{get_Item(),set_Item()}
        x5[false] = x5[false];
        // Viable callables: {C4,C6}.{add_Event(),remove_Event()}
        x5.Event += () => { };
        x5.Event -= () => { };

        // Viable callables: {C2,C5,C6}.M()
        C1 <string, bool> x6 = Mock <C1 <string, bool> >();

        x6.M <object>("", null);
        // Viable callables: {C2,C5,C6}.{get_Prop(),set_Prop()}
        x6.Prop = x6.Prop;
        // Viable callables: {C2,C5,C6}.{get_Item(),set_Item()}
        x6[false] = x6[false];
        // Viable callables: {C2,C5,C6}.{add_Event(),remove_Event()}
        x6.Event += () => { };
        x6.Event -= () => { };

        // Viable callables: C6.M()
        C1 <T1, bool> x7 = new C6 <T1, bool>();

        x7.M(default(T1), "");
        // Viable callables: C6.{get_Prop(),set_Prop()}
        x7.Prop = x7.Prop;
        // Viable callables: C6.{get_Item(),set_Item()}
        x7[false] = x7[false];
        // Viable callables: C6.{add_Event(),remove_Event()}
        x7.Event += () => { };
        x7.Event -= () => { };

        // Viable callables: {C8,C9}.M()
        dynamic d = Mock <C8>();

        d.M(Mock <IEnumerable <C4 <string> > >());
        // Viable callables: {C8,C9}.{get_Prop(),set_Prop()}
        d.Prop1 = d.Prop1;
        // Viable callables: {C8,C9}.{get_Item(),set_Item()}
        d[0] = d[0];

        // Viable callables: (none)
        d.M(Mock <IEnumerable <C4 <int> > >());

        // Viable callables: C5.M()
        d = 42;
        C5.M(d);
        // Viable callables: C5.set_Prop2()
        d        = "";
        C5.Prop2 = d;
        // Viable callables: C5.{add_Event(),remove_Event()}
        d          = (EventHandler <string>)(() => { });
        C5.Event2 += d;
        C5.Event2 -= d;

        // Viable callables: (none)
        d = "";
        C5.M(d);
        // Viable callables: (none)
        d        = 0;
        C5.Prop2 = d;
        // Viable callables: (none)
        C5.Event2 += d;
        C5.Event2 -= d;

        // Viable callables: C8.M2()
        d = new decimal[] { 0M };
        C8.M2 <decimal>(d);

        // Viable callables: C8.M2()
        d = new string[] { "" };
        C8.M2 <string>(d);

        // Viable callables: (none)
        d = "";
        C8.M2 <object>(d);

        // Viable callables: C6.M()
        d = new C6 <T1, byte>();
        d.M(default(T1), "");
        // Viable callables: C6.{get_Prop(),set_Prop()}
        d.Prop = d.Prop;
        // Viable callables: C6.{get_Item(),set_Item()}
        d[(byte)0] = d[(byte)0];
        // Viable callables: C6.{add_Event(),remove_Event()}
        d.Event += (EventHandler <string>)(() => { });
        d.Event -= (EventHandler <string>)(() => { });

        // Viable callables: C8.M3(), C9.M3()
        d = Mock <C8>();
        d.M3();
        d.M3(0);
        d.M3(0, 0.0);

        // Viable callables: {C8,C9,C10}.M3()
        dyn.M3();
        dyn.M3(0);
        dyn.M3(0, 0.0);
        // Viable callables: {C8,C9,C10}.{get_Prop1(),set_Prop1()}
        dyn.Prop1 = dyn.Prop1;
        // Viable callables: {C2,C3,C6,C7,C8,C9,C10}.{get_Item(),set_Item()}
        dyn[0] = dyn[0];
        // Viable callables: {C2,C3,C5,C6,C7,C8,C9}.{add_Event(),remove_Event()}
        dyn.Event += (EventHandler <string>)(() => { });
        dyn.Event -= (EventHandler <string>)(() => { });

        // Viable callables: C8.M4()
        dyn.M4(0, Mock <IList <string> >());
        dyn.M4(0, new string[] { "" });

        // Viable callables: C10.set_Prop1()
        dyn.Prop1 = false;

        // Viable callables: (none)
        dyn.M4(-1, new string[] { "" });
        dyn.M4(0, new int[] { 0 });

        // Viable callables: (none)
        dyn.Prop1 = 0;

        // Viable callables: {C2,C6}.{get_Item(),set_Item()}
        dyn[""] = dyn[""];

        // Operator calls using dynamic types: all target int operators
        d = 0;
        d = d + 1;
        d = 0;
        d = 1 - d;
        d = 0;
        d = d + t3; // mixed with a type parameter

        // Operator calls using reflection: targets C10 addition operator
        var c = new C10();

        typeof(C10).InvokeMember("op_Addition", BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, new object[] { c, c });

        // Property call using reflection: targets C10 property getter/setter
        typeof(C10).InvokeMember("get_Prop3", BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, new object[0]);
        typeof(C10).InvokeMember("set_Prop3", BindingFlags.Static | BindingFlags.Public | BindingFlags.InvokeMethod, null, null, new object[] { "" });

        // Indexer call using reflection: targets C10 indexer getter/setter
        typeof(C10).InvokeMember("get_Item", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, c, new object[] { 0 });
        typeof(C10).InvokeMember("set_Item", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, c, new object[] { 0, true });

        // Event handler call using reflection: targets C10 event adder/remover
        EventHandler <bool> e = () => { };

        typeof(C10).InvokeMember("add_Event", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, c, new object[] { e });
        typeof(C10).InvokeMember("remove_Event", BindingFlags.Instance | BindingFlags.Public | BindingFlags.InvokeMethod, null, c, new object[] { e });
    }
    static void M0()
    {
        {
            int var0 = -1783231041;
            M1(s_3.F0.F6.F2.F4++);
        }

        short[][] var1 = new short[][] { new short[] { 2, -32767, -20005 } };
        if (s_3.F0.F1.F0)
        {
            if (true)
            {
                s_6 = s_6;
            }
            else
            {
                s_3.F0.F1.F2 = s_3.F0.F1.F3;
                M2(false);
                s_3.F0.F1.F1 = (byte)(9223372036854775806L + s_2.F6);
            }

            if (s_3.F0.F6.F3)
            {
                if (s_3.F0.F6.F3)
                {
                    s_3.F0.F6.F2.F0 = s_3.F0.F3.F4;
                    if (s_3.F0.F6.F3)
                    {
                        C2 var2 = s_3.F0.F4;
                        s_1.F0 = s_1.F1.F4--;
                        char var3 = s_2.F9.F1;
                        M1((sbyte)(s_3.F0.F1.F2.F5 + 1));
                        s_2 = new C6(10UL, 32767, 2893113068940341303L, 1UL, 12304812913654681964UL, -1, 2752180306U, 3236857463753817693L, 0, new S1('w', '{'));
                    }
                    else
                    {
                        if (s_3.F0.F6.F3)
                        {
                            sbyte var4 = s_3.F0.F1.F2.F4;
                            s_3.F0.F3.F0 = s_1.F1.F0++;
                            s_3.F0.F4.F0 = -1;
                        }

                        bool var5 = true;
                    }

                    s_7 = s_3.F0.F3.F8;
                }

                char var6 = s_3.F0.F6.F2.F2;
                if (s_3.F0.F1.F0)
                {
                    {
                        s_8          = new C5(false, new C3(-9223372036854775807L, 0UL, -17052, -10, 8304, 8917099496021586141L, 1792445099U, 37, 10), 9553658261146014766UL);
                        s_3.F0.F3    = s_3.F0.F3;
                        s_3.F0.F1.F0 = s_3.F0.F1.F0;
                        s_1.F1.F1    = s_1.F2;
                        if (false)
                        {
                            s_8.F1.F8 = s_7;
                            M1(s_2.F5);
                        }
                        else
                        {
                            s_3.F0.F3.F4 = -32767;
                            M1(s_3.F0.F1.F3.F4++);
                            s_1.F1.F6 = s_2.F6;
                            C0 var7 = new C0(-32767, -31569, 'h', 254, -128, 1L);
                            var7 = s_3.F0.F6.F2;
                            C2 var8 = s_3.F0.F4;
                            s_3.F0.F3 = new C3(s_3.F0.F2, s_3.F0.F1.F5, -2, s_2.F1, s_8.F1.F4, var7.F5, s_1.F1.F6, s_3.F0.F1.F3.F3, s_8.F1.F8);
                        }

                        s_9    = s_9;
                        s_2.F2 = s_3.F0.F6.F2.F5;
                    }

                    --s_3.F0.F6.F1;
                    if (s_8.F0)
                    {
                        s_2.F1 = s_1.F1.F3;
                        {
                            s_3.F0.F1.F2.F4 = 1;
                        }

                        M2(s_3.F0.F6.F3);
                        C1 var9 = new C1(true, 184, new C0(32767, 10, 'g', 243, 17, -1L), new C0(-1078, 0, 'K', 0, 123, 7493885686446655521L), -127, 16846527762400001875UL, 2097);
                    }
                    else
                    {
                        s_2.F6 = s_3.F0.F3.F6;
                    }
                }

                s_3.F0.F3.F6     = (uint)M1(s_3.F0.F4.F0);
                s_3.F0.F1.F3.F4 -= M1(M1(-46));
                if (true)
                {
                    if (s_3.F0.F1.F2.F2 != s_8.F1.F8)
                    {
                        s_1.F2 = 10UL;
                        if (false)
                        {
                            S2 var10 = new S2(0L, new C1(false, 37, new C0(-2, 32766, '9', 1, 33, -1175343064099267568L), new C0(-19457, 1, 'Y', 255, 1, 2447239054669500523L), 0, 1208740452604807235UL, 26349), -9223372036854775807L, new C3(5503215450124127403L, 14870441263061855545UL, 20769, -5626, -4389, 1L, 1561669837U, 0, 2147483647), new C2(5), 52, new S0(0U, 0, new C0(-17413, 32766, '{', 254, -127, 1639142626197857876L), false, 3935839789U));
                            s_3 = s_3;
                            C6[] var11 = new C6[] { new C6(1UL, -401, 6801991495829348847L, 12163968708328351611UL, 9776202298509363384UL, 1, 4294967294U, 6846327648836848441L, 10, new S1('<', ' ')), new C6(3387150194222084306UL, -788, -9223372036854775808L, 5465798426659751046UL, 8753274798970848302UL, 10, 3978892834U, 1894303443554419155L, 25263, new S1('~', 's')), new C6(10UL, 0, -1671850217406456605L, 1UL, 7898532874796317398UL, 83, 1U, 9223372036854775806L, -19789, new S1('d', '=')), new C6(0UL, -32767, 6516644328840865006L, 1UL, 18446744073709551615UL, 67, 1554082170U, 330496183412360797L, 0, new S1('J', '-')) };
                            C6   var12 = s_2;
                            M2(false);
                            sbyte var13 = var10.F1.F2.F4;
                        }

                        M1(s_3.F0.F1.F4--);
                        if (s_3.F0.F6.F3)
                        {
                            short var14 = -10615;
                        }

                        s_3.F0.F6.F2.F1 = s_3.F0.F6.F1;
                        s_3.F0.F6.F1    = -1819;
                    }
                    else
                    {
                        if (false)
                        {
                            s_2.F8 = s_3.F0.F1.F2.F0;
                        }
                    }

                    s_3.F0.F3.F3    = (short)M1(1);
                    s_8.F1          = s_8.F1;
                    s_3.F0.F6.F2.F1 = 10539;
                }
            }
            else
            {
                s_3.F0.F6.F4 = s_3.F0.F6.F4;
                s_9[0].F1    = '"';
            }
        }
        else
        {
            s_1.F1.F6 = s_2.F6;
            {
                M2(s_3.F0.F1.F0);
                --s_3.F0.F3.F6;
                s_9[0].F1 = s_5;
                C1 var15 = new C1(false, 20, new C0(0, 2, 'q', 71, -1, -8457038454541163605L), new C0(30802, -14171, '2', 0, 127, 5010730907089744282L), 78, 1UL, 12497);
            }

            s_1.F1.F2 = s_8.F1.F2;
            {
                if (s_8.F0)
                {
                    M2(s_3.F0.F6.F3);
                }

                s_8.F1.F7 = s_3.F0.F3.F7;
                sbyte var16 = s_3.F0.F4.F0;
                if (s_3.F0.F1.F0)
                {
                    s_10 = new S4(new S2(-7908435350463658647L, new C1(true, 0, new C0(2, 2, 'O', 2, 127, -7299900871143859233L), new C0(-32400, -2, 'z', 162, -127, 1L), 61, 18446744073709551615UL, 1), 9223372036854775806L, new C3(9223372036854775806L, 1UL, 0, -8669, 0, -8758212199117796020L, 1U, 182, 1953958857), new C2(0), -128, new S0(0U, -19293, new C0(10131, 24172, 'P', 79, -23, 9103016883735183519L), true, 1498367249U)));
                }
                else
                {
                    s_9[0].F1 = s_9[0].F1;
                }

                if (s_3.F0.F1.F0)
                {
                    if (true)
                    {
                        if (s_3.F0.F1.F0)
                        {
                            s_11 = 193;
                            S0 var17 = new S0(1129056602U, 32767, new C0(1, 32767, 'd', 1, 84, 6521460523339684757L), false, 0U);
                            s_3.F0.F4 = s_10.F0.F4;
                            M2(s_8.F0 ^ M3((long)M1((sbyte)(s_10.F0.F1.F2.F2++ / (long)(s_3.F0.F0 | 1)))));
                        }

                        if (s_3.F0.F1.F0)
                        {
                            s_1.F1.F8       = s_7;
                            s_3.F0.F6.F2.F5 = s_10.F0.F1.F2.F5--;
                        }
                        else
                        {
                            s_10.F0.F1.F3.F4 = 1;
                        }

                        s_9[0]    = s_9[0];
                        s_2.F9.F0 = '=';
                        if (s_3.F0.F6.F3)
                        {
                            s_3.F0.F1.F3.F3 = s_10.F0.F1.F2.F3;
                            s_3.F0.F3.F8  <<= (int)(s_10.F0.F1.F2.F2 & s_10.F0.F3.F0);
                        }
                        else
                        {
                            s_12       = -99;
                            s_10.F0.F1 = new C1(false, 89, new C0(32767, 23563, 'm', 1, -121, 4630728858785982849L), new C0(-9249, 4617, 'b', 15, -1, 3676894479712669199L), 126, 18446744073709551614UL, 1);
                            {
                                s_3.F0.F1.F0 = s_3.F0.F1.F0;
                            }

                            s_10.F0.F1.F4 = s_3.F0.F1.F3.F4;
                            S1 var18 = s_9[0];
                        }

                        s_8.F1.F3        = (short)M1(s_3.F0.F1.F4);
                        s_10.F0.F1.F3.F4 = s_3.F0.F5++;
                        M3(8837408294964420546L);
                        if (true)
                        {
                            uint[, ][] var19 = new uint[, ][] { { new uint[] { 3022768392U, 2871515859U, 1515241476U }, new uint[] { 1U, 2U, 1946413091U }, new uint[] { 674518321U, 2U, 3596005959U }, new uint[] { 2582580773U, 977696739U, 1U, 407815548U, 0U, 4294967295U }, new uint[] { 4294967295U, 4294967295U, 0U, 0U, 686114740U, 4294967294U, 2067032431U }, new uint[] { 1489636007U, 3444810789U }, new uint[] { 2668035277U, 32703059U, 2329785065U, 2462157469U, 0U, 0U, 3540314618U, 4294967294U, 1U } }, { new uint[] { 1U, 1U, 368480837U, 3165928597U, 1U, 3749159669U, 2804285075U }, new uint[] { 1U, 1498555757U, 3451075665U, 0U, 2585006183U, 2163996998U }, new uint[] { 2570015238U, 580068620U, 0U, 326556387U, 10U, 0U, 3062838226U }, new uint[] { 0U, 494375176U, 0U, 2790147404U, 2U, 1402095057U }, new uint[] { 704478110U, 0U, 4294967295U }, new uint[] { 0U, 594302618U, 4294967294U, 1U, 1U, 0U, 0U }, new uint[] { 1288809305U, 2U, 0U, 1U } }, { new uint[] { 1U, 0U, 4257629689U, 1U }, new uint[] { 3592260142U }, new uint[] { 231275153U, 0U, 1649439558U }, new uint[] { 1578370292U, 4294967295U }, new uint[] { 4294967294U, 0U, 4294967294U, 1U, 2793441804U }, new uint[] { 0U, 3746354092U }, new uint[] { 1U, 4294967295U, 0U, 0U, 1449033124U, 4294967294U, 2255081870U, 852142829U } } };
                        }

                        s_2.F0           = s_1.F2;
                        s_2.F0           = 1UL;
                        s_10.F0.F6.F2.F4 = s_10.F0.F6.F2.F4;
                        if (s_10.F0.F1.F0)
                        {
                            char var20 = s_10.F0.F6.F2.F2--;
                        }
                        else
                        {
                            s_3.F0.F2 = s_1.F1.F0;
                            if (s_10.F0.F1.F0)
                            {
                                s_1.F1.F3    = s_3.F0.F6.F2.F1;
                                s_3.F0.F3.F0 = -5004708944920174629L;
                                s_3.F0.F4    = new C2(10);
                            }
                            else
                            {
                                s_13 = s_10.F0.F1.F2.F1;
                            }
                        }

                        s_1.F3        = s_3.F0.F6.F2.F2++;
                        s_10.F0.F1.F1 = s_3.F0.F1.F3.F3;
                    }

                    s_8.F1.F2        = (short)M1(s_3.F0.F1.F3.F4);
                    s_10.F0.F1.F3.F0 = s_8.F1.F3--;
                    s_3.F0.F1.F2.F3  = s_3.F0.F1.F2.F3;
                    s_14             = s_10.F0.F1.F3.F5;
                    S0 var21 = s_3.F0.F6;
                    s_10.F0.F1.F3.F2 = s_3.F0.F6.F2.F2--;
                    s_8.F0           = s_8.F0;
                }
            }
        }
    }
Exemple #35
0
        void GetBaseTypes( C5.HashSet<TypeKey> baseTypes, TypeDefinition type )
        {
            // check the interfaces
            foreach ( TypeReference ifaceRef in type.Interfaces )
            {
                TypeDefinition iface = project.GetTypeDefinition( ifaceRef );
                if ( iface != null )
                {
                    GetBaseTypes( baseTypes, iface );
                    baseTypes.Add( new TypeKey( iface ) );
                }
            }

            // check the base type unless it isn't in the project, or we don't have one
            TypeDefinition baseType = project.GetTypeDefinition( type.BaseType );
            if ( baseType != null && baseType.FullName != "System.Object" )
            {
                GetBaseTypes( baseTypes, baseType );
                baseTypes.Add( new TypeKey( baseType ) );
            }
        }
    static sbyte M1(sbyte arg0)
    {
        if (true)
        {
            if (false)
            {
                arg0 = arg0;
            }

            if (true)
            {
                arg0 %= (sbyte)(arg0 | 1);
            }

            M2(true);
            if (false)
            {
                if (true)
                {
                    if (false)
                    {
                        return(arg0++);
                    }
                    else
                    {
                        arg0 = arg0;
                    }

                    if (true == true)
                    {
                        s_1 = new C4(32766, new C3(9223372036854775806L, 18293969681735491244UL, 31049, 28361, 0, 7233058526412154005L, 4294967295U, 0, -1460629074), 0UL, 'i');
                        sbyte var0 = arg0;
                        C5    var1 = new C5(false, new C3(-5456612535375292654L, 0UL, -5297, -882, 12795, 9223372036854775806L, 1U, 219, -1296091510), 5279204426998472296UL);
                        C4    var2 = s_1;
                        var2.F1    = new C3(10L, 15335005254765998011UL, -32768, 15399, -6615, -9223372036854775807L, 2423527801U, 0, 0);
                        var1.F1.F5 = s_1.F1.F0;
                        s_2        = M2(var1.F0);
                        S1 var3 = s_2.F9;
                        s_3 = s_3;
                        M2(false || s_3.F0.F1.F0);
                        M2(true);
                    }
                    else
                    {
                        M2(false);
                        s_1.F1.F1 = s_2.F4;
                        s_1.F3    = 'J';
                    }

                    s_3.F0.F1.F3.F1 = s_2.F1;
                    C1 var4 = s_3.F0.F1;
                    s_3.F0.F6.F4 = s_1.F1.F6;
                }
            }
            else
            {
                if (s_3.F0.F1.F0)
                {
                    s_3.F0.F6.F4 = s_3.F0.F6.F0;
                }
                else
                {
                    s_3.F0.F3 = s_3.F0.F3;
                }
            }

            s_3.F0.F6.F2.F3 = s_1.F1.F7;
        }
        else
        {
            if (s_3.F0.F1.F0)
            {
                s_3.F0.F3.F8 = s_1.F1.F8;
            }

            C4[] var5 = new C4[] { new C4(-1, new C3(10L, 1UL, -1, -32767, -32768, -1L, 1U, 110, 2), 4719512249968768896UL, 'c'), new C4(0, new C3(-7338918055207984343L, 0UL, -32767, -32768, -32767, 1L, 1U, 189, 1), 1UL, '@'), new C4(-32768, new C3(10L, 0UL, 9180, -10, 0, 1L, 1U, 255, -2147483648), 14255324195405300611UL, '?'), new C4(-10, new C3(-9223372036854775808L, 17827500464145343948UL, 6401, 4688, -20398, 6785793161875004250L, 0U, 1, -1106923237), 5922047603110736244UL, '|'), new C4(22193, new C3(9223372036854775806L, 1UL, 32766, -24697, 0, 1L, 1257521100U, 236, -172512234), 0UL, '@'), new C4(2, new C3(8612619366248799890L, 5126800052548409692UL, 1, -32767, -32768, -2L, 0U, 32, -2147483648), 18446744073709551614UL, 'D'), new C4(1, new C3(-1L, 6949345362748659148UL, -27447, -32768, 1, 0L, 0U, 253, 1), 4964828438233691434UL, '&'), new C4(32766, new C3(8349042152457265871L, 10019802000608562170UL, -5058, 25310, -31597, 1L, 0U, 255, -2147483647), 14617352416920138293UL, '"'), new C4(-25232, new C3(1L, 18446744073709551615UL, 0, -331, -31476, -8554348596842691376L, 0U, 0, 0), 0UL, ']'), new C4(-32768, new C3(-5837916518282871156L, 8221978291218699062UL, 1, -7306, 8472, -1438714598381768790L, 0U, 34, -2147483647), 233097830844559882UL, 'Y') };
            if (s_3.F0.F6.F3)
            {
                char  var6 = s_3.F0.F1.F3.F2;
                ulong var7 = 0UL;
            }

            M2(s_3.F0.F6.F3);
            byte var8 = s_3.F0.F3.F7;
            if (true)
            {
                if (-2147483647 == (short)(s_3.F0.F1.F3.F4 * s_1.F1.F8))
                {
                    {
                        s_3.F0.F6.F0 = s_2.F6--;
                    }

                    s_3.F0.F1.F2.F3 = s_3.F0.F1.F2.F3;
                }

                s_4 = s_4;
            }

            if (s_3.F0.F1.F2.F5 <= s_3.F0.F1.F2.F2)
            {
                s_5    = s_2.F9.F1;
                s_2.F5 = s_2.F5++;
                {
                    var5[0].F3 = s_3.F0.F1.F2.F2;
                    --s_1.F1.F7;
                    s_4 = s_4;
                    {
                        var5[0] = new C4(0, new C3(1L, 1UL, 32766, -12936, 1, 5718352754773371397L, 0U, 0, 2147483647), 2UL, 'T');
                    }
                }

                if (false)
                {
                    S3 var9 = new S3('x', 'Z', 1L);
                    s_1.F1       = var5[0].F1;
                    s_3.F0.F1.F4 = -38;
                }
                else
                {
                    s_1.F1.F6++;
                }
            }

            sbyte var10 = s_3.F0.F1.F4;
        }

        S4 var11 = new S4(new S2(2719843209539251931L, new C1(true, 194, new C0(32766, 1, '^', 255, 2, -1L), new C0(32766, 1, 'Y', 227, 1, 2L), -20, 5217289566332453441UL, 28690), 0L, new C3(9223372036854775807L, 10268135402269073298UL, 1, 7071, 0, 2169965285866796793L, 1U, 146, 108628337), new C2(8), -128, new S0(2153262915U, -32767, new C0(-32768, 10, 'H', 0, 127, 8282000700853966974L), true, 387574144U)));
        C2 var12 = var11.F0.F4;

        return(s_3.F0.F1.F3.F4);
    }
Exemple #37
0
        private void Piano_KeyPress(object sender, KeyPressEventArgs e)
        {
            switch (e.KeyChar.ToString())
            {
            case "A":
                A.PerformClick();
                break;

            case "S":
                S.PerformClick();
                break;

            case "D":
                D.PerformClick();
                break;

            case "F":
                F.PerformClick();
                break;

            case "G":
                G.PerformClick();
                break;

            case "H":
                H.PerformClick();
                break;

            case "J":
                J.PerformClick();
                break;

            case "K":
                K.PerformClick();
                break;

            case "L":
                L.PerformClick();
                break;

            case ";":
                B4.PerformClick();
                break;

            case "'":
                C5.PerformClick();
                break;

            case "]":
                D5.PerformClick();
                break;

            case "W":
                W.PerformClick();
                break;

            case "E":
                E.PerformClick();
                break;

            case "R":
                R.PerformClick();
                break;

            case "T":
                T.PerformClick();
                break;

            case "Y":
                Y.PerformClick();
                break;

            case "I":
                I.PerformClick();
                break;

            case "O":
                O.PerformClick();
                break;

            case "P":
                P.PerformClick();
                break;

            case "[":
                Black9.PerformClick();
                break;
            }
        }
Exemple #38
0
 /**
  * @param rules The rules used by the game.
  */
 public void SetRules(C5.TreeDictionary<int, List<Implication>> rules)
 {
     _rules = rules;
 }
Exemple #39
0
 /**
  * @param groundFacts The game's ground facts.
  */
 public void SetGroundFacts(C5.TreeDictionary<int, List<GroundFact>> groundFacts)
 {
     _groundFacts = groundFacts;
 }
Exemple #40
0
        void GetVirtualMethods( AssemblyCache cache, C5.TreeSet<MethodKey> methods, TypeDefinition type )
        {
            // check the interfaces
            foreach ( TypeReference ifaceRef in type.Interfaces )
            {
                TypeDefinition iface = project.GetTypeDefinition( ifaceRef );

                // if it's not in the project, try to get it via the cache
                if ( iface == null )
                    iface = cache.GetTypeDefinition( ifaceRef );

                // search interface
                if ( iface != null )
                    GetVirtualMethods( cache, methods, iface );
            }

            // check the base type unless it isn't in the project, or we don't have one
            TypeDefinition baseType = project.GetTypeDefinition( type.BaseType );

            // if it's not in the project, try to get it via the cache
            if ( baseType == null )
                baseType = cache.GetTypeDefinition( type.BaseType );

            // search base
            if ( baseType != null )
                GetVirtualMethods( cache, methods, baseType );

            foreach ( MethodDefinition method in type.Methods )
            {
                if ( method.IsVirtual )
                    methods.Add( new MethodKey( method ) );
            }
        }
Exemple #41
0
 public C6(C5 value) => m_value = value;
Exemple #42
0
 /**
  * @param relations The relations to set.
  */
 public void SetRelations(C5.TreeDictionary<int, RelationInfo> relations)
 {
     _relations = relations;
 }