Example #1
0
        public static string Dump(AssociationInPackage value)
        {
            var assistant = new AssistantDumper();

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

            assistant.AddStartObject();
            assistant.AddType("Dogen.TestModels.CSharpModel.Package1.AssociationInPackage", true /*withSeparator*/);
            if (value == null)
            {
                assistant.Add("data", "<null>");
                assistant.AddEndObject();
                return;
            }

            assistant.AddKey("data");
            assistant.AddPairSeparator();
            assistant.AddStartObject();
            assistant.AddKey("Prop0");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.PrimitiveBuiltinsDumper.Dump(assistant, value.Prop0, true /*withSeparator*/);
            assistant.AddKey("Prop1");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.ComplexBuiltinsDumper.Dump(assistant, value.Prop1, true /*withSeparator*/);
            assistant.AddKey("Prop2");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.Package1.Class1Dumper.Dump(assistant, value.Prop2);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }
Example #3
0
        static internal AssociationInPackage Create(uint position)
        {
            var result = new AssociationInPackage();

            Populate(result, position);
            return(result);
        }
        internal static void Dump(AssistantDumper assistant, AssociationInPackage value, bool withSeparator = false)
        {
            assistant.IncrementDepth();
            if (assistant.MaximumDepthExceeded())
                return;

            assistant.AddStartObject();
            assistant.AddType("Dogen.TestModels.CSharpModel.Package1.AssociationInPackage", true/*withSeparator*/);
            if (value == null)
            {
                assistant.Add("data", "<null>");
                assistant.AddEndObject();
                return;
            }

            assistant.AddKey("data");
            assistant.AddPairSeparator();
            assistant.AddStartObject();
            assistant.AddKey("Prop0");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.PrimitiveBuiltinsDumper.Dump(assistant, value.Prop0, true/*withSeparator*/);
            assistant.AddKey("Prop1");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.ComplexBuiltinsDumper.Dump(assistant, value.Prop1, true/*withSeparator*/);
            assistant.AddKey("Prop2");
            assistant.AddPairSeparator();
            Dogen.TestModels.CSharpModel.Package1.Class1Dumper.Dump(assistant, value.Prop2);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }
Example #5
0
 static internal void Populate(AssociationInPackage value, uint position)
 {
     value.Prop0 = Dogen.TestModels.CSharpModel.PrimitiveBuiltinsSequenceGenerator.Create(position + 0);
     value.Prop1 = Dogen.TestModels.CSharpModel.ComplexBuiltinsSequenceGenerator.Create(position + 1);
     value.Prop2 = Dogen.TestModels.CSharpModel.Package1.Class1SequenceGenerator.Create(position + 2);
 }
 public static string Dump(AssociationInPackage value)
 {
     var assistant = new AssistantDumper();
     Dump(assistant, value);
     return assistant.ToString();
 }