2005-09-30 Miguel de Icaza <miguel@novell.com>
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Common / EventParameterBuffer.cs
1 /*
2  *  Firebird ADO.NET Data provider for .NET and Mono 
3  * 
4  *     The contents of this file are subject to the Initial 
5  *     Developer's Public License Version 1.0 (the "License"); 
6  *     you may not use this file except in compliance with the 
7  *     License. You may obtain a copy of the License at 
8  *     http://www.firebirdsql.org/index.php?op=doc&id=idpl
9  *
10  *     Software distributed under the License is distributed on 
11  *     an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either 
12  *     express or implied.  See the License for the specific 
13  *     language governing rights and limitations under the License.
14  * 
15  *  Copyright (c) 2002, 2005 Carlos Guzman Alvarez
16  *  All Rights Reserved.
17  */
18
19 using System;
20 using System.IO;
21 using System.Text;
22
23 namespace FirebirdSql.Data.Common
24 {
25         internal sealed class EventParameterBuffer : ParameterBuffer
26         {
27                 #region Constructors
28
29                 public EventParameterBuffer() : base(true)
30                 {
31                 }
32
33                 #endregion
34
35                 #region Methods
36
37                 public void Append(string content, int actualCount)
38                 {
39                         this.Append(Encoding.Default.GetBytes(content), actualCount);
40                 }
41
42                 public void Append(byte[] content, int actualCount)
43                 {
44                         this.WriteByte(content.Length);
45                         this.Write(content);
46                         this.Write(actualCount);
47                 }
48
49                 #endregion
50         }
51 }