Example #1
0
 static internal void Populate(Builtins value, uint position)
 {
     value.Prop0 = AssistantSequenceGenerator.CreateChar(position + 0);
     value.Prop1 = AssistantSequenceGenerator.CreateByte(position + 1);
     value.Prop2 = AssistantSequenceGenerator.CreateShortByte(position + 2);
     value.Prop3 = AssistantSequenceGenerator.CreateShort(position + 3);
     value.Prop4 = AssistantSequenceGenerator.CreateInt(position + 4);
     value.Prop5 = AssistantSequenceGenerator.CreateLong(position + 5);
     value.Prop6 = AssistantSequenceGenerator.CreateInt(position + 6);
     value.Prop7 = AssistantSequenceGenerator.CreateFloat(position + 7);
     value.Prop8 = AssistantSequenceGenerator.CreateDouble(position + 8);
     value.Prop9 = AssistantSequenceGenerator.CreateBool(position + 9);
 }
        static internal void Dump(AssistantDumper assistant, Builtins value, bool withSeparator = false)
        {
            assistant.IncrementDepth();
            if (assistant.MaximumDepthExceeded())
            {
                return;
            }

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

            assistant.AddKey("data");
            assistant.AddPairSeparator();
            assistant.AddStartObject();
            assistant.Add("Prop0", value.Prop0, true /*withSeparator*/);
            assistant.Add("Prop1", value.Prop1, true /*withSeparator*/);
            assistant.Add("Prop2", value.Prop2, true /*withSeparator*/);
            assistant.Add("Prop3", value.Prop3, true /*withSeparator*/);
            assistant.Add("Prop4", value.Prop4, true /*withSeparator*/);
            assistant.Add("Prop5", value.Prop5, true /*withSeparator*/);
            assistant.Add("Prop6", value.Prop6, true /*withSeparator*/);
            assistant.Add("Prop7", value.Prop7, true /*withSeparator*/);
            assistant.Add("Prop8", value.Prop8, true /*withSeparator*/);
            assistant.Add("Prop9", value.Prop9);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }