Ejemplo n.º 1
0
        private void TestNonNullWithProxy(int amount)
        {
            var student = new User
            {
                School = new School
                {
                    District = new District
                    {
                        Street = new Street
                        {
                            Name = "Elm"
                        }
                    }
                }
            };

            var s = "na";

            for (int i = 0; i < amount; i++)
            {
                s += student.NeverNull().School.District.Street.Name.Final();
            }

            Console.WriteLine(s.FirstOrDefault());
        }
Ejemplo n.º 2
0
        private void NullWithProxy(int amount)
        {
            var user = new User();

            var s = "na";

            for (int i = 0; i < amount; i++)
            {
                s += user.NeverNull().School.District.Street.Name.Final() ?? "na";
            }

            Console.WriteLine(s.FirstOrDefault());
        }
Ejemplo n.º 3
0
        private void TestNonNullWithProxy(int amount)
        {
            var student = new User
            {
                School = new School
                {
                    District = new District
                    {
                        Street = new Street
                        {
                            Name = "Elm"
                        }
                    }
                }
            };

            var s = "na";
            for (int i = 0; i < amount; i++)
            {
                s += student.NeverNull().School.District.Street.Name.Final();
            }

            Console.WriteLine(s.FirstOrDefault());
        }
Ejemplo n.º 4
0
        private void NullWithProxy(int amount)
        {
            var user = new User();

            var s = "na";
            for (int i = 0; i < amount; i++)
            {
                s += user.NeverNull().School.District.Street.Name.Final() ?? "na";
            }

            Console.WriteLine(s.FirstOrDefault());
        }