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

StripPreamble() private méthode

private StripPreamble ( byte buffer, int &offset, int &count ) : void
buffer byte
offset int
count int
Résultat void
            private void StripPreamble(byte[] buffer, ref int offset, ref int count)
            {
                if (_preambleToStrip != null && count >= _preambleToStrip.Length)
                {
                    for (int idx = 0; idx < _preambleToStrip.Length; idx++)
                    {
                        if (_preambleToStrip[idx] != buffer[idx])
                        {
                            _preambleToStrip = null;
                            return;
                        }
                    }

                    offset += _preambleToStrip.Length;
                    count -= _preambleToStrip.Length;
                }
                _preambleToStrip = null;
            }