static internal ExternalModelTest Create(uint position)
        {
            var result = new ExternalModelTest();

            Populate(result, position);
            return(result);
        }
 static internal void Populate(ExternalModelTest value, uint position)
 {
     value.DateTest     = Phi.DateSequenceGenerator.Create(position + 0);
     value.BinariesTest = System.Collections.Generic.ArraySequenceGenerator.Create(position + 1);
     value.CollectionOfCollectionTest             = System.Collections.Generic.ArraySequenceGenerator.Create(position + 2);
     value.CollectionOfCollectionOfCollectionTest = System.Collections.Generic.ArraySequenceGenerator.Create(position + 3);
 }
Beispiel #3
0
        public static string Dump(ExternalModelTest value)
        {
            var assistant = new AssistantDumper();

            Dump(assistant, value);
            return(assistant.ToString());
        }
Beispiel #4
0
        static internal void Dump(AssistantDumper assistant, ExternalModelTest value, bool withSeparator = false)
        {
            assistant.IncrementDepth();
            if (assistant.MaximumDepthExceeded())
            {
                return;
            }

            assistant.AddStartObject();
            assistant.AddType("Zeta.ExternalModelTest", true /*withSeparator*/);
            if (value == null)
            {
                assistant.Add("data", "<null>");
                assistant.AddEndObject();
                return;
            }

            assistant.AddKey("data");
            assistant.AddPairSeparator();
            assistant.AddStartObject();
            assistant.AddKey("DateTest");
            assistant.AddPairSeparator();
            Phi.DateDumper.Dump(assistant, value.DateTest, true /*withSeparator*/);
            assistant.AddKey("BinariesTest");
            assistant.AddPairSeparator();
            System.Collections.Generic.ArrayDumper.Dump(assistant, value.BinariesTest, true /*withSeparator*/);
            assistant.AddKey("CollectionOfCollectionTest");
            assistant.AddPairSeparator();
            System.Collections.Generic.ArrayDumper.Dump(assistant, value.CollectionOfCollectionTest, true /*withSeparator*/);
            assistant.AddKey("CollectionOfCollectionOfCollectionTest");
            assistant.AddPairSeparator();
            System.Collections.Generic.ArrayDumper.Dump(assistant, value.CollectionOfCollectionOfCollectionTest);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }