FromString() public method

public FromString ( byte buf, int offset ) : void
buf byte
offset int
return void
Exemplo n.º 1
0
        public void testReadACK_ACKcontinue1()
        {
            ObjectId expid = ObjectId.FromString("fcfcfb1fd94829c1a1704f894fc111d14770d34e");
            MutableObjectId actid = new MutableObjectId();
            actid.FromString(expid.Name);

            init("003aACK fcfcfb1fd94829c1a1704f894fc111d14770d34e continue\n");
            Assert.AreEqual(PacketLineIn.AckNackResult.ACK_CONTINUE, pckIn.readACK(actid));
            Assert.IsTrue(actid.Equals(expid));
            assertEOF();
        }
Exemplo n.º 2
0
 private int id(byte[] raw, int ptr)
 {
     try
     {
         tempId.FromString(raw, ptr);
         return(ptr + Constants.OBJECT_ID_STRING_LENGTH);
     }
     catch (ArgumentException)
     {
         return(-1);
     }
 }
Exemplo n.º 3
0
 private int id(byte[] raw, int ptr)
 {
     try
     {
         tempId.FromString(raw, ptr);
         return(ptr + AnyObjectId.StringLength);
     }
     catch (ArgumentException)
     {
         return(-1);
     }
 }