Example #1
0
    private void Start()
    {
        EmptyClass emptyClass  = new EmptyClass();
        StringOnly smallString = new StringOnly {
            String = "hey"
        };
        StringOnly largeString = new StringOnly {
            String = new string('*', 100000)
        };
        ArrayOnly smallArray = new ArrayOnly {
            IntArray = new[] { 1, 2, 3 }
        };
        ArrayOnly largeArray = new ArrayOnly {
            IntArray = new int[1000]
        };
        A shallowNestedObject = new A {
            B = new B {
                C = new C()
            }
        };
        A deepNestedObject = new A
        {
            B = new B
            {
                C = new C
                {
                    D = new D
                    {
                        E = new E
                        {
                            F = new F
                            {
                                G = new G
                                {
                                    H = new H
                                    {
                                        I = new I {
                                            Val = 123
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        };

        Test("Empty Class", emptyClass, 100000);
        Test("Small String", smallString, 10000);
        Test("Large String", largeString, 100);
        Test("Small Array", smallArray, 100000);
        Test("Large Array", largeArray, 100);
        Test("Shallow Nested Object", shallowNestedObject, 10000);
        Test("Deep Nested Object", deepNestedObject, 10000);
    }
Example #2
0
 TaxRelation(string description, string symbol, StringOnly stringOnlyValue)
 {
     (Description)     = (description);
     (Symbol)          = (symbol);
     (StringOnlyValue) = (stringOnlyValue);
 }