* roottypes.cs: Rename from tree.cs.
[mono.git] / mcs / class / FirebirdSql.Data.Firebird / FirebirdSql.Data.Firebird / Services / FbLog.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
21 using FirebirdSql.Data.Common;
22
23 namespace FirebirdSql.Data.Firebird.Services
24 {
25         /// <include file='Doc/en_EN/FbLog.xml' path='doc/class[@name="FbLog"]/overview/*'/>
26         public sealed class FbLog : FbService
27         {
28                 #region Constructors
29
30                 /// <include file='Doc/en_EN/FbLog.xml' path='doc/class[@name="FbLog"]/constructor[@name="ctor"]/*'/>
31                 public FbLog() : base()
32                 {
33                 }
34
35                 #endregion
36
37                 #region Methods
38
39                 /// <include file='Doc/en_EN/FbLog.xml' path='doc/class[@name="FbLog"]/method[@name="Execute"]/*'/>
40                 public void Execute()
41                 {
42                         try
43                         {
44                                 // Configure Spb
45                                 this.StartSpb = this.CreateParameterBuffer();
46
47                                 this.StartSpb.Append(IscCodes.isc_action_svc_get_ib_log);
48
49                                 // Start execution
50                                 this.StartTask();
51
52                                 // Process service output
53                                 this.ProcessServiceOutput();
54                         }
55                         catch
56                         {
57                                 throw;
58                         }
59                         finally
60                         {
61                                 this.Close();
62                         }
63
64                 }
65
66                 #endregion
67         }
68 }