setting all protected methods on WizardStepPage as virtual
[castle.git] / MonoRail / Castle.MonoRail.Framework / Adapters / TraceAdapter.cs
blob1f4fcc166a8050cce8872d3611412dda09110897
1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 namespace Castle.MonoRail.Framework.Adapters
17 using System;
18 using System.Web;
20 /// <summary>
21 /// Delegates to ASP.Net TraceContext.
22 /// </summary>
23 public class TraceAdapter : ITrace
25 private TraceContext trace;
27 /// <summary>
28 /// Initializes a new instance of the <see cref="TraceAdapter"/> class.
29 /// </summary>
30 /// <param name="traceContext">The trace context.</param>
31 public TraceAdapter(TraceContext traceContext)
33 trace = traceContext;
36 /// <summary>
37 /// Logs the specified message on the ASP.Net trace
38 /// </summary>
39 /// <param name="message">The message.</param>
40 public void Warn(String message)
42 trace.Warn(message);
45 /// <summary>
46 /// Logs the specified message on the ASP.Net trace
47 /// </summary>
48 /// <param name="category">The category.</param>
49 /// <param name="message">The message.</param>
50 public void Warn(String category, String message)
52 trace.Warn(category, message);
55 /// <summary>
56 /// Logs the specified message on the ASP.Net trace
57 /// </summary>
58 /// <param name="category">The category.</param>
59 /// <param name="message">The message.</param>
60 /// <param name="errorInfo">The error info.</param>
61 public void Warn(String category, String message, Exception errorInfo)
63 trace.Warn(category, message, errorInfo);
66 /// <summary>
67 /// Logs the specified message on the ASP.Net trace
68 /// </summary>
69 /// <param name="message">The message.</param>
70 public void Write(String message)
72 trace.Write(message);
75 /// <summary>
76 /// Logs the specified message on the ASP.Net trace
77 /// </summary>
78 /// <param name="category">The category.</param>
79 /// <param name="message">The message.</param>
80 public void Write(String category, String message)
82 trace.Write(category, message);
85 /// <summary>
86 /// Logs the specified message on the ASP.Net trace
87 /// </summary>
88 /// <param name="category">The category.</param>
89 /// <param name="message">The message.</param>
90 /// <param name="errorInfo">The error info.</param>
91 public void Write(String category, String message, Exception errorInfo)
93 trace.Write(category, message, errorInfo);