- CheckboxList's LabelFor now takes attributes as optional argument
[castle.git] / MonoRail / Castle.MonoRail.Framework / IViewSourceLoader.cs
blob231f08ae64435902411005bcc28715f5bcd97b2e
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
17 using System;
18 using System.Collections;
19 using System.IO;
21 /// <summary>
22 /// Defines a contract that abstracts view template locations.
23 /// </summary>
24 public interface IViewSourceLoader
26 /// <summary>
27 /// Evaluates whether the specified template exists.
28 /// </summary>
29 /// <param name="sourceName">The template name</param>
30 /// <returns><c>true</c> if it exists</returns>
31 bool HasSource(String sourceName);
33 /// <summary>
34 /// Builds and returns a representation of a view template
35 /// </summary>
36 /// <param name="templateName">The template name</param>
37 /// <returns></returns>
38 IViewSource GetViewSource(String templateName);
40 /// <summary>
41 /// Gets a list of views on the specified directory
42 /// </summary>
43 /// <param name="dirName">Directory name</param>
44 /// <returns></returns>
45 String[] ListViews(String dirName);
47 /// <summary>
48 /// Gets/sets the root directory of views, obtained from the configuration.
49 /// </summary>
50 string VirtualViewDir { get; set; }
52 /// <summary>
53 /// Gets/sets the root directory of views, obtained from the configuration.
54 /// </summary>
55 string ViewRootDir { get; set; }
57 /// <summary>
58 /// Gets or sets whether the instance should use cache
59 /// </summary>
60 bool EnableCache { get; set; }
62 /// <summary>
63 /// Gets a list of assembly sources
64 /// </summary>
65 IList AssemblySources { get; }
67 /// <summary>
68 /// Adds the assembly source.
69 /// </summary>
70 /// <param name="assemblySourceInfo">The assembly source info.</param>
71 void AddAssemblySource(AssemblySourceInfo assemblySourceInfo);
73 /// <summary>
74 /// Raised when the view is changed.
75 /// </summary>
76 event FileSystemEventHandler ViewChanged;