System.Data.SqlClient.TdsParser.PlpBytesLeft C# (CSharp) Méthode

PlpBytesLeft() private méthode

private PlpBytesLeft ( System.Data.SqlClient.TdsParserStateObject stateObj ) : ulong
stateObj System.Data.SqlClient.TdsParserStateObject
Résultat ulong
        internal ulong PlpBytesLeft(TdsParserStateObject stateObj)
        {
            if ((stateObj._longlen != 0) && (stateObj._longlenleft == 0))
                stateObj.ReadPlpLength(false);

            return stateObj._longlenleft;
        }

Usage Example

 internal SqlCachedBuffer(SqlMetaDataPriv metadata, TdsParser parser, TdsParserStateObject stateObj)
 {
     int len = 0;
     this._cachedBytes = new ArrayList();
     ulong num = parser.PlpBytesLeft(stateObj);
     do
     {
         if (num == 0L)
         {
             return;
         }
         do
         {
             len = (num > 0x800L) ? 0x800 : ((int) num);
             byte[] buff = new byte[len];
             len = stateObj.ReadPlpBytes(ref buff, 0, len);
             if (this._cachedBytes.Count == 0)
             {
                 this.AddByteOrderMark(buff);
             }
             this._cachedBytes.Add(buff);
             num -= len;
         }
         while (num > 0L);
         num = parser.PlpBytesLeft(stateObj);
     }
     while (num > 0L);
 }
All Usage Examples Of System.Data.SqlClient.TdsParser::PlpBytesLeft
TdsParser