1 // Copyright 2004-2008 Castle Project - http://www.castleproject.org/
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
7 // http://www.apache.org/licenses/LICENSE-2.0
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
.Views
.IronView
20 using Castle
.MonoRail
.Framework
;
23 /// Represents an evaluation context
25 public interface ITemplateContext
28 /// Gets the template xml reader.
30 /// <value>The reader.</value>
31 XmlReader Reader { get; }
34 /// Gets the service provider.
36 /// <value>The service provider.</value>
37 IServiceProvider ServiceProvider { get; }
40 /// Gets the template engine.
42 /// <value>The template engine.</value>
43 ITemplateEngine Engine { get; }
46 /// Gets the name of the root view.
48 /// <value>The name of the root view.</value>
49 String RootViewName { get; }
52 /// Gets the script buffer.
54 /// <value>The script.</value>
55 StringBuilder Script { get; }
58 /// Gets the indentation level.
60 /// <value>The indentation.</value>
61 int Indentation { get; }
64 /// Gets the current element depth.
66 /// <value>The current element depth.</value>
67 int CurrentElementDepth { get; }
69 void IncreaseIndentation();
71 void DecreaseIndentation();
77 void AppendIndented(string content
);
79 void AppendLineIndented(string content
);