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

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

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

            assistant.AddStartObject();
            assistant.AddType("CSharpRefImpl.CSharpModel.LongPrimitive", 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();
        }
Exemple #4
0
 static internal void Populate(LongPrimitive value, uint position)
 {
     value.Value = AssistantSequenceGenerator.CreateLong(position);
 }