diff --git a/Spring.Net.2010.sln b/Spring.Net.2010.sln index 21173b1e..5cc8e538 100644 --- a/Spring.Net.2010.sln +++ b/Spring.Net.2010.sln @@ -1,6 +1,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 2013 -VisualStudioVersion = 12.0.30723.0 +VisualStudioVersion = 12.0.31101.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{F04753EF-7A1B-4837-AB63-8C0821E8155D}" ProjectSection(SolutionItems) = preProject @@ -105,6 +105,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Tes EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Data.NHibernate4.Integration.Tests.2010", "test\Spring\Spring.Data.NHibernate4.Integration.Tests\Spring.Data.NHibernate4.Integration.Tests.2010.csproj", "{46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.Castle.2010", "src\Spring\Spring.Template.Velocity.Castle\Spring.Template.Velocity.Castle.2010.csproj", "{250601C0-A4AC-41FE-B484-51A9B0D5473D}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Spring.Template.Velocity.Castle.Tests.2010", "test\Spring\Spring.Template.Velocity.Castle.Tests\Spring.Template.Velocity.Castle.Tests.2010.csproj", "{8D6ED392-8A1F-41C0-A765-22CF384EDEA1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|.NET = Debug|.NET @@ -383,26 +387,6 @@ Global {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Any CPU.Build.0 = Release|Any CPU {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {7321149A-47C6-4FBA-9D1A-26FD6815381B}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|.NET.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|.NET.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Any CPU.Build.0 = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {9F0F739C-876E-4C4B-AA55-9AC9242C25C8}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|.NET.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|.NET.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Any CPU.Build.0 = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C33C6A06-885D-49D2-8029-422D38CBC6D7}.Release|Mixed Platforms.Build.0 = Release|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|.NET.ActiveCfg = Debug|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {D546EFB7-9F6C-4C11-B2F8-B85FAD135399}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -475,16 +459,6 @@ Global {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|.NET.ActiveCfg = Release|Any CPU {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Any CPU.ActiveCfg = Release|Any CPU {FA934E92-C8C2-428A-BE2A-26818F17A787}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|.NET.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Any CPU.Build.0 = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|.NET.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Any CPU.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Any CPU.Build.0 = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {CD6A49DE-745C-4360-AADF-3539CFEC6639}.Release|Mixed Platforms.Build.0 = Release|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|.NET.ActiveCfg = Debug|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {6B7DA759-F46D-4860-AF03-E7AC7498E003}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -515,16 +489,6 @@ Global {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Any CPU.Build.0 = Release|Any CPU {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {8CF0F34A-CC93-4D87-AE14-A2DEEF072F26}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|.NET.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Any CPU.Build.0 = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|.NET.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Any CPU.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Any CPU.Build.0 = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {64400FF8-2E9F-4809-B5F4-0C7EB8ABFF87}.Release|Mixed Platforms.Build.0 = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|.NET.ActiveCfg = Debug|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -535,16 +499,6 @@ Global {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Any CPU.Build.0 = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {CF375928-B6D5-485C-B04D-2BC41D9DBF1E}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|.NET.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Any CPU.Build.0 = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|.NET.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Any CPU.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Any CPU.Build.0 = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {2FB16852-22AD-4A5B-885A-97136265CC46}.Release|Mixed Platforms.Build.0 = Release|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|.NET.ActiveCfg = Debug|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {C57B05EA-FD1A-40EC-BB60-D2E45AB1A86A}.Debug|Any CPU.Build.0 = Debug|Any CPU @@ -605,6 +559,26 @@ Global {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Any CPU.Build.0 = Release|Any CPU {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU {46F8B5E9-ABCF-4306-BC05-FF05B0FAC151}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Debug|.NET.ActiveCfg = Debug|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Release|.NET.ActiveCfg = Release|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Release|Any CPU.Build.0 = Release|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Debug|.NET.ActiveCfg = Debug|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|.NET.ActiveCfg = Release|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Any CPU.Build.0 = Release|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {8D6ED392-8A1F-41C0-A765-22CF384EDEA1}.Release|Mixed Platforms.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/Spring/Spring.Template.Velocity.Castle/AssemblyInfo.cs b/src/Spring/Spring.Template.Velocity.Castle/AssemblyInfo.cs new file mode 100644 index 00000000..81db3173 --- /dev/null +++ b/src/Spring/Spring.Template.Velocity.Castle/AssemblyInfo.cs @@ -0,0 +1,42 @@ +#region License + +/* + * Copyright © 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System.Reflection; +using System.Runtime.InteropServices; +using System.Security; + +[assembly: ComVisible(false)] +[assembly: AssemblyTitle("Spring.Template.Velocity.Castle")] +[assembly: AssemblyDescription("Castle NVelocity template engine integration for Spring.NET")] + +// +// Security Permissions +// +// we need full, unrestricted access to reflection metadata... +//[assembly: ReflectionPermission(SecurityAction.RequestMinimum, Unrestricted = true)] +//[assembly: AssemblyKeyFile(@"C:\users\aseovic\projects\OpenSource\Spring.Net\Spring.Net.PrivateKey.keys")] +//[assembly: AssemblyKeyFile(@"C:\projects\Spring.Net\Spring.Net.snk")] + +#if !NET_4_0 +[assembly: AllowPartiallyTrustedCallers] + +[assembly: SecurityCritical] + +#endif diff --git a/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.2010.csproj b/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.2010.csproj new file mode 100644 index 00000000..41d36188 --- /dev/null +++ b/src/Spring/Spring.Template.Velocity.Castle/Spring.Template.Velocity.Castle.2010.csproj @@ -0,0 +1,104 @@ + + + + + Debug + AnyCPU + {250601C0-A4AC-41FE-B484-51A9B0D5473D} + Library + Properties + Spring + Spring.Template.Velocity.Castle + v4.0 + 512 + + ..\..\..\ + true + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\..\..\packages\Common.Logging.3.0.0\lib\net40\Common.Logging.dll + + + ..\..\..\packages\Common.Logging.Core.3.0.0\lib\net40\Common.Logging.Core.dll + + + ..\..\..\packages\Castle.NVelocity.1.1.1\lib\net40\NVelocity.dll + + + + + + + CommonAssemblyInfo.cs + + + Template\Velocity\CommonsLoggingLogSystem.cs + + + Template\Velocity\Config\TemplateNamespaceParser.cs + + + Template\Velocity\VelocityConstants.cs + + + Template\Velocity\VelocityEngineFactory.cs + + + Template\Velocity\VelocityEngineFactoryObject.cs + + + Template\Velocity\VelocityEngineUtils.cs + + + + + + + Template\Velocity\Config\spring-nvelocity-1.3.xsd + Designer + + + + + + + + + {710961a3-0df4-49e4-a26e-f5b9c044ac84} + Spring.Core.2010 + + + + + + + Questo progetto fa riferimento a uno o più pacchetti NuGet che non sono presenti sul computer in uso. Abilitare il ripristino dei pacchetti NuGet per scaricarli. Per ulteriori informazioni, visitare http://go.microsoft.com/fwlink/?LinkID=322105. Il file mancante è {0}. + + + + + \ No newline at end of file diff --git a/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs new file mode 100644 index 00000000..68cbd38d --- /dev/null +++ b/src/Spring/Spring.Template.Velocity.Castle/Template/Velocity/SpringResourceLoader.cs @@ -0,0 +1,178 @@ +#region License + +/* + * Copyright 2002-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#endregion + +using System; +using System.IO; +using Common.Logging; +using Commons.Collections; +using NVelocity.Runtime.Resource; +using NVelocity.Runtime.Resource.Loader; +using Spring.Core.IO; + +namespace Spring.Template.Velocity +{ + /// + /// NVelocity's abstract ResourceLoader extension which serves + /// as an adapter that loads templates via a Spring IResourceLoader. + /// + ///
+ /// Used by VelocityEngineFactory for any resource loader path that + /// cannot be resolved to a File or an Assembly or for + /// implementations which rely on spring's IResourceLoader + /// mechanism. + /// + ///
+ /// Important: this loader does not allow for modification detection. + ///
+ /// Expects "spring.resource.loader" (IResourceLoader implementations) + /// and "spring.resource.loader.path" application attributes in the + /// NVelocity runtime. + ///
+ /// + /// + /// + /// + /// + /// Erez Mazor (.NET) + [CLSCompliant(false)] + public class SpringResourceLoader : ResourceLoader + { + /// + /// Prefix used for the NVelocity Configuration + /// + public const string NAME = "spring"; + + /// + /// The IResourceLoader implementation type + /// + public const string SPRING_RESOURCE_LOADER_CLASS = "spring.resource.loader.class"; + + /// + /// A flag indicating weather a template cache is used + /// + public const string SPRING_RESOURCE_LOADER_CACHE = "spring.resource.loader.cache"; + + /// + /// Fully qualified name of the IResourceLoader implementation class + /// + public const string SPRING_RESOURCE_LOADER = "spring.resource.loader"; + + /// + /// A comma delimited list of paths used by the spring IResourceLoader implementation + /// + public const string SPRING_RESOURCE_LOADER_PATH = "spring.resource.loader.path"; + + /// + /// Shared logger instance. + /// + protected static readonly ILog log = LogManager.GetLogger(typeof(SpringResourceLoader)); + + private IResourceLoader resourceLoader; + + private string[] resourceLoaderPaths; + + + /// + /// Initialize the template loader with a resources class. + /// + /// The ExtendedProperties representing the Velocity configuration. + public override void Init(ExtendedProperties configuration) + { + resourceLoader = (IResourceLoader)runtimeServices.GetApplicationAttribute(SPRING_RESOURCE_LOADER); + string resourceLoaderPath = (string)runtimeServices.GetApplicationAttribute(SPRING_RESOURCE_LOADER_PATH); + if (resourceLoader == null) + { + throw new ArgumentException("'resourceLoader' application attribute must be present for SpringResourceLoader"); + } + if (null == resourceLoaderPath) + { + throw new ArgumentException("'resourceLoaderPath' application attribute must be present for SpringResourceLoader"); + } + resourceLoaderPaths = resourceLoaderPath.Split(','); + for (int i = 0; i < resourceLoaderPaths.Length; i++) + { + string path = resourceLoaderPaths[i]; + if (!path.EndsWith("/")) + { + resourceLoaderPaths[i] = path + "/"; + } + } + if (log.IsInfoEnabled) + { + log.Info(string.Format("SpringResourceLoader for Velocity: using resource loader [{0}] and resource loader paths {1}", resourceLoader, resourceLoaderPaths)); + } + } + + /// + /// Get the System.IO.Stream that the Runtime will parse to create a template. + /// + /// the source template name + /// a System.IO.Stream representation of the resource + public override Stream GetResourceStream(string source) + { + if (log.IsDebugEnabled) + { + log.Debug(string.Format("Looking for Velocity resource with name [{0}]", source)); + } + + foreach (string resourceLoaderPath in resourceLoaderPaths) + { + IResource resource = resourceLoader.GetResource(resourceLoaderPath + source); + try + { + return resource.InputStream; + } + catch (IOException ex) + { + if (log.IsErrorEnabled) + { + log.Error(string.Format("Could not find Velocity resource: {0}", resource), ex); + } + } + } + throw new ArgumentException(string.Format("Could not find resource [{0}] in Spring resource loader path", source)); + } + + /// + /// Given a template, check to see if the source of InputStream has been modified. + /// + /// The resource. + /// + /// true if the source of the InputStream has been modified; otherwise, false. + /// + public override bool IsSourceModified(Resource resource) + { + return false; + } + + /// + /// Get the last modified time of the InputStream source + /// that was used to create the template. We need the template + /// here because we have to extract the name of the template + /// in order to locate the InputStream source. + /// + /// The resource. + /// + public override long GetLastModified(Resource resource) + { + return 0; + } + } +} \ No newline at end of file diff --git a/src/Spring/Spring.Template.Velocity.Castle/packages.config b/src/Spring/Spring.Template.Velocity.Castle/packages.config new file mode 100644 index 00000000..2bfbe020 --- /dev/null +++ b/src/Spring/Spring.Template.Velocity.Castle/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2010.csproj b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2010.csproj index 8a8ec856..7906ee8e 100644 --- a/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2010.csproj +++ b/test/Spring/Spring.Aop.Tests/Spring.Aop.Tests.2010.csproj @@ -316,6 +316,9 @@ Spring.Core.Tests.2010 + + + diff --git a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj index d77cb524..c9f8b9c7 100644 --- a/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj +++ b/test/Spring/Spring.Core.Tests/Spring.Core.Tests.2010.csproj @@ -1023,6 +1023,9 @@ Spring.Template.Velocity.2010 + + + diff --git a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2010.csproj b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2010.csproj index 34bec8aa..c4466cc0 100644 --- a/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2010.csproj +++ b/test/Spring/Spring.Data.Integration.Tests/Spring.Data.Integration.Tests.2010.csproj @@ -127,6 +127,7 @@ + diff --git a/test/Spring/Spring.Data.NHibernate3.Integration.Tests/Spring.Data.NHibernate3.Integration.Tests.2010.csproj b/test/Spring/Spring.Data.NHibernate3.Integration.Tests/Spring.Data.NHibernate3.Integration.Tests.2010.csproj index d05fc4b3..86320d8d 100644 --- a/test/Spring/Spring.Data.NHibernate3.Integration.Tests/Spring.Data.NHibernate3.Integration.Tests.2010.csproj +++ b/test/Spring/Spring.Data.NHibernate3.Integration.Tests/Spring.Data.NHibernate3.Integration.Tests.2010.csproj @@ -235,6 +235,9 @@ Spring.Data.2010 + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.xml b/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.xml new file mode 100644 index 00000000..d961fc76 --- /dev/null +++ b/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/VelocityEngineFactoryObjectTests.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/config.properties b/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/config.properties new file mode 100644 index 00000000..941f577b --- /dev/null +++ b/test/Spring/Spring.Template.Velocity.Castle.Tests/Template/Velocity/config.properties @@ -0,0 +1,4 @@ +resource.loader=assembly +assembly.resource.loader.class=NVelocity.Runtime.Resource.Loader.AssemblyResourceLoader +assembly.resource.loader.assembly=Spring.Template.Velocity.Castle.Tests +assembly.resource.loader.description=TestDescription \ No newline at end of file diff --git a/test/Spring/Spring.Template.Velocity.Castle.Tests/packages.config b/test/Spring/Spring.Template.Velocity.Castle.Tests/packages.config new file mode 100644 index 00000000..1bcc5dbd --- /dev/null +++ b/test/Spring/Spring.Template.Velocity.Castle.Tests/packages.config @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.2010.csproj b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.2010.csproj index 63249017..b0d59e6e 100644 --- a/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.2010.csproj +++ b/test/Spring/Spring.Template.Velocity.Tests/Spring.Template.Velocity.Tests.2010.csproj @@ -98,6 +98,9 @@ + + +