Added container accessor to Castle.Core
[castle.git] / Tools / SubversionHooks / Hooks / IPreCommit.cs
blob747beaac78c14eb315a95ad44e49645d4e211296
1 // Copyright 2004-2007 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.SvnHooks
17 using System;
19 /// <summary>
20 /// Summary description for IPreCommit.
21 /// </summary>
22 public interface IPreCommit
25 /// <summary>
26 /// This function will be called on every file
27 /// being commited, the file will be examined
28 /// on-demand to avoid loading unnecessary
29 /// information that the hooks dont use.
30 /// </summary>
31 /// <param name="file">
32 /// The file that is being commited
33 /// </param>
34 /// <returns>
35 /// null or an empty list if the commit is to
36 /// be allowed, or a list of errors that has
37 /// occured
38 /// </returns>
39 Error[] PreCommit(RepositoryFile file);
41 /// <summary>
42 /// This function will be called on every directory
43 /// being commited, the directory will be examined
44 /// on-demand to avoid loading unnecessary
45 /// information that the hooks dont use.
46 /// </summary>
47 /// <param name="directory">
48 /// The directory that is being commited
49 /// </param>
50 /// <returns>
51 /// null or an empty list if the commit is to
52 /// be allowed, or a list of errors that has
53 /// occured
54 /// </returns>
55 Error[] PreCommit(RepositoryDirectory directory);