public override void Write(byte[] buffer, int offset, int count)
        {
            CheckIfStreamClosed();

            if (buffer == null)
            {
                throw new ArgumentNullException(nameof(buffer));
            }
            if (offset < 0 || offset > buffer.Length)
            {
                throw new ArgumentOutOfRangeException(nameof(offset));
            }
            if (count < 0 || count > buffer.Length - offset)
            {
                throw new ArgumentOutOfRangeException(nameof(count));
            }

            _sb.Write(_lPosition, buffer, offset, count);
            _lPosition += count;
        }
Exemple #2
0
 public static void CompileUDF(SqlChars code, ref SqlBytes byteCode)
 {
     byte[] res = CompilerDll.Compiler.Compile(new string(code.Value));
     byteCode.Write(0, res, 0, res.Length);
 }