Update of /cvsroot/nhibernate/NHibernateContrib/src/NHibernate.Caches/Prevalence In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28292 Added Files: AssemblyInfo.cs CacheEntry.cs CacheSystem.cs NHibernate.Caches.Prevalence-1.1.csproj NHibernate.Caches.Prevalence.Tests-1.1.csproj Log Message: migrating cache implementations to new folder --- NEW FILE: CacheSystem.cs --- using System; using System.Collections.Specialized; using Bamboo.Prevalence; namespace NHibernate.Caches.Prevalence { /// <summary> /// Summary description for CacheSystem. /// </summary> [Serializable] internal class CacheSystem : MarshalByRefObject { private HybridDictionary _items; /// <summary> /// default constructor /// </summary> public CacheSystem() { _items = new HybridDictionary(); } /// <summary> /// retrieve the value for the given key /// </summary> /// <param name="key"></param> /// <returns></returns> public object Get( object key ) { CacheEntry entry = _items[key] as CacheEntry; if( entry == null ) { return null; } return entry.Value; } /// <summary> /// add or update an object in the cache /// </summary> /// <param name="key"></param> /// <param name="value"></param> public void Add( object key, object value ) { CacheEntry entry = _items[key] as CacheEntry; if( entry == null ) { entry = new CacheEntry(); entry.Key = key; entry.Value = value; entry.DateCreated = PrevalenceEngine.Now; _items.Add( key, entry ); } else { entry.Value = value; _items[key] = entry; } } /// <summary> /// remove an item from the cache /// </summary> /// <param name="key"></param> public void Remove( object key ) { _items.Remove( key ); } /// <summary> /// clear the cache /// </summary> public void Clear() { _items.Clear(); } } } --- NEW FILE: NHibernate.Caches.Prevalence.Tests-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{C04709C0-2FF9-424A-82FF-235312877853}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "NHibernate.Caches.Prevalence.Tests" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "NHibernate.Caches.Prevalence.Tests" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "NHibernate.Caches.Prevalence-1.1" Project = "{51179C23-5555-45A4-9BBB-8F6E24D05C2B}" Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> <Reference Name = "log4net" AssemblyName = "log4net" HintPath = "..\..\..\lib\net\1.1\log4net.dll" /> <Reference Name = "NHibernate" AssemblyName = "NHibernate" HintPath = "..\..\..\lib\net\1.1\NHibernate.dll" /> <Reference Name = "nunit.framework" AssemblyName = "nunit.framework" HintPath = "..\..\..\lib\net\1.1\nunit.framework.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "PrevalenceCacheFixture.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "PrevalenceCacheProviderFixture.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: NHibernate.Caches.Prevalence-1.1.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{51179C23-5555-45A4-9BBB-8F6E24D05C2B}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "NHibernate.Caches.Prevalence" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "NHibernate.Caches.Prevalence" RunPostBuildEvent = "OnBuildSuccess" StartupObject = "" > <Config Name = "Debug" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "DEBUG;TRACE" DocumentationFile = "" DebugSymbols = "true" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "false" OutputPath = "bin\Debug\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> <Config Name = "Release" AllowUnsafeBlocks = "false" BaseAddress = "285212672" CheckForOverflowUnderflow = "false" ConfigurationOverrideFile = "" DefineConstants = "TRACE" DocumentationFile = "" DebugSymbols = "false" FileAlignment = "4096" IncrementalBuild = "false" NoStdLib = "false" NoWarn = "" Optimize = "true" OutputPath = "bin\Release\" RegisterForComInterop = "false" RemoveIntegerChecks = "false" TreatWarningsAsErrors = "false" WarningLevel = "4" /> </Settings> <References> <Reference Name = "System" AssemblyName = "System" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll" /> <Reference Name = "System.Data" AssemblyName = "System.Data" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll" /> <Reference Name = "System.XML" AssemblyName = "System.Xml" HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll" /> <Reference Name = "Bamboo.Prevalence" AssemblyName = "Bamboo.Prevalence" HintPath = "..\..\..\lib\Bamboo.Prevalence.dll" /> <Reference Name = "log4net" AssemblyName = "log4net" HintPath = "..\..\..\lib\net\1.1\log4net.dll" /> <Reference Name = "NHibernate" AssemblyName = "NHibernate" HintPath = "..\..\..\lib\net\1.1\NHibernate.dll" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CacheEntry.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "CacheSystem.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "PrevalenceCache.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "PrevalenceCacheProvider.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject> --- NEW FILE: CacheEntry.cs --- using System; namespace NHibernate.Caches.Prevalence { /// <summary> /// An item in the cache /// </summary> [Serializable] public class CacheEntry { private object _key; private object _value; private DateTime _dateCreated; /// <summary> /// the unique identifier /// </summary> public object Key { get { return _key; } set { _key = value; } } /// <summary> /// the value /// </summary> public object Value { get { return _value; } set { _value = value; } } /// <summary> /// the unique timestamp /// </summary> public DateTime DateCreated { get { return _dateCreated; } set { _dateCreated = value; } } } } --- NEW FILE: AssemblyInfo.cs --- using System; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Security.Permissions; //------------------------------------------------------------------------------ // <autogenerated> // This code was generated by a tool. // Runtime Version: 1.1.4322.2032 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </autogenerated> //------------------------------------------------------------------------------ [assembly: AssemblyTitleAttribute("NHibernate.Caches.Prevalence for Microsoft .NET Framework 1.1")] [assembly: AssemblyDescriptionAttribute("Cache provider for NHibernate using Bamboo.Prevalence engine.")] [assembly: AssemblyCompanyAttribute("nhibernate.sourceforge.net")] [assembly: AssemblyProductAttribute("NHibernate.Caches.Prevalence")] [assembly: AssemblyCopyrightAttribute("Licensed under LGPL.")] [assembly: AssemblyVersionAttribute("0.8.0.0")] [assembly: AssemblyInformationalVersionAttribute("0.8")] |