internal static void Dump(AssistantDumper assistant, ImmutableTwo value, bool withSeparator = false)
        {
            assistant.IncrementDepth();
            if (assistant.MaximumDepthExceeded())
                return;

            assistant.AddStartObject();
            assistant.AddType("Dogen.TestModels.CSharpModel.ImmutableTwo", 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);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }
Пример #2
0
        public static string Dump(ImmutableTwo value)
        {
            var assistant = new AssistantDumper();

            Dump(assistant, value);
            return(assistant.ToString());
        }
Пример #3
0
        static internal void Dump(AssistantDumper assistant, ImmutableTwo value, bool withSeparator = false)
        {
            assistant.IncrementDepth();
            if (assistant.MaximumDepthExceeded())
            {
                return;
            }

            assistant.AddStartObject();
            assistant.AddType("Dogen.TestModels.CSharpModel.ImmutableTwo", 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);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }
Пример #4
0
        static internal ImmutableTwo Create(uint position)
        {
            var result = new ImmutableTwo();

            Populate(result, position);
            return(result);
        }
 public static string Dump(ImmutableTwo value)
 {
     var assistant = new AssistantDumper();
     Dump(assistant, value);
     return assistant.ToString();
 }
Пример #6
0
 static internal void Populate(ImmutableTwo value, uint position)
 {
     value.Prop0 = AssistantSequenceGenerator.CreateBool(position + 0);
     value.Prop1 = AssistantSequenceGenerator.CreateString(position + 1);
 }