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
.Framework
.Services
20 public interface IStaticResourceRegistry
23 /// Registers an assembly resource.
25 /// <param name="name">The name.</param>
26 /// <param name="location">The location.</param>
27 /// <param name="version">The version.</param>
28 /// <param name="mimeType">Mime-type.</param>
29 /// <param name="assemblyName">Name of the assembly.</param>
30 /// <param name="resourceName">Resource name.</param>
31 /// <param name="resourceEntry">The resource entry name/key.</param>
32 void RegisterAssemblyResource(string name
, string location
, string version
,
33 string assemblyName
, string resourceName
,
34 string resourceEntry
, string mimeType
);
37 /// Registers a custom resource.
39 /// <param name="name">The name.</param>
40 /// <param name="location">The location.</param>
41 /// <param name="version">The version.</param>
42 /// <param name="resource">The resource.</param>
43 /// <param name="mimeType">Mime-type.</param>
44 void RegisterCustomResource(string name
, string location
, string version
, Castle
.Core
.Resource
.IResource resource
, string mimeType
);
47 /// Checks whether the resource exists for name, location and version
49 /// <param name="name">The name.</param>
50 /// <param name="location">The location.</param>
51 /// <param name="version">The version.</param>
52 /// <returns></returns>
53 bool Exists(string name
, string location
, string version
);
56 /// Gets the resource content identified by the name, location and version.
58 /// <param name="name">The name.</param>
59 /// <param name="location">The location.</param>
60 /// <param name="version">The version.</param>
61 /// <param name="mimeType">Mime-type.</param>
62 /// <returns></returns>
63 string GetResource(string name
, string location
, string version
, out string mimeType
);