예제 #1
0
 //[MethodImpl(MethodImplOptions.AggressiveInlining)]
 public Boolean Equals(Byte[] src, P_ByteLnk width)
 {
     if (length != width.length)
     {
         return(false);
     }
     return(CompareRaw(src, width.pos));
 }
예제 #2
0
 //[MethodImpl(MethodImplOptions.AggressiveInlining)]
 public void InsertAfter(JsonNode orig, ref P_ByteLnk key)
 {
     keyIdxes.data = key.data;
     key.length    = -1;
     if (orig == null)
     {
         next = this;
         return;
     }
     next      = orig.next;
     orig.next = this;
 }
예제 #3
0
        //[MethodImpl(MethodImplOptions.AggressiveInlining)]
        public void ListToValue(JsonTag tag, JsonNode tail)
        {
            Tag = tag;
            JsonNode head = tail;

            if (null != head)
            {
                head           = tail.next;
                tail.next      = null;
                node           = head;
                doubleOrString = head.doubleOrString;
            }
        }
예제 #4
0
파일: JsonNode.cs 프로젝트: eltomjan/Gason
        public void InsertAfter(JsonNode orig, ref P_ByteLnk key)
        { // orig = previous node, 1t, ... / this == last Node
            keyIdxes.data = key.data;
            key.length    = -1;
            if (orig == null)
            {
                next = this;
                return;
            }
            next      = orig.next; // last -> 1st
            orig.next = this;      // 1st -> last
#if DoubleLinked
            this.pred = orig;      // before prev <- last
#endif
        }
예제 #5
0
파일: JsonNode.cs 프로젝트: eltomjan/Gason
        public Boolean KeysEqual(Byte[] src, P_ByteLnk nd)
        {
            if (keyIdxes.length != nd.length)
            {
                return(false);
            }
            int length = keyIdxes.length;

            for (int i = 0; i < length; i++)
            {
                if (src[keyIdxes.pos + i] != src[nd.pos + i])
                {
                    return(false);
                }
            }
            return(true);
        }
예제 #6
0
 public ByteString(Byte[] storage, P_ByteLnk idxes)
 {
     this.storage = new Byte[idxes.length + 1];
     Array.Copy(storage, idxes.pos, this.storage, 0, idxes.length);
     length = idxes.length;
 }
예제 #7
0
 public LinkedByteString(P_ByteLnk idxes)
 {
     this.idxes = idxes;
 }
예제 #8
0
파일: JsonNode.cs 프로젝트: eltomjan/Gason
 internal void SetKey(P_ByteLnk keyIdx)
 {
     keyIdxes = keyIdx;
 }