public static string Dump(FloatPrimitive value)
        {
            var assistant = new AssistantDumper();

            Dump(assistant, value);
            return(assistant.ToString());
        }
Example #2
0
        static internal FloatPrimitive Create(uint position)
        {
            var result = new FloatPrimitive();

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

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

            assistant.AddKey("data");
            assistant.AddPairSeparator();
            assistant.AddStartObject();
            assistant.Add("Value", value.Value);
            assistant.AddEndObject(); // data
            assistant.AddEndObject(); // main object
            assistant.HandleMemberSeparator(withSeparator);

            assistant.DecrementDepth();
        }
Example #4
0
 static internal void Populate(FloatPrimitive value, uint position)
 {
     value.Value = AssistantSequenceGenerator.CreateFloat(position);
 }