- linfu_src.zip
- LinFu.Common
- LinFu.Delegates
- LinFu.DynamicProxy
- LinFu.License.txt
- LinFu.Reflection
- NMock2.dll
- nunit.core.dll
- nunit.framework.dll
- Simple.IoC
- Simple.IoC.Loaders
- Simple.IoC.Tests
- Simple.IoC
- linfupart3_samples.zip
- LinFu.Delegates.Examples
- AdaptingClosuresToAnyDelegateSignature
- bin
- LinFu.Common.dll
- LinFu.Delegates.dll
- LinFu.DynamicProxy.dll
- LinFu.Reflection.dll
- BindingAndUnbindingClosureParameters
- CallingDelegatesBoundToClosuresWithClosedArguments
- ClosuresAndDynamicallyGeneratedMethods
- DelegatesAndArgumentBinding
- InstanceMethodBinding
- LinFu.Delegates.Examples.sln
- NestedClosures
- StaticMethodBinding
- UniversalEventHandling
- UsingClosuresWithDynamicObjects
- LinFu.License.txt
- linfu_bin.zip
- LinFu.Common.dll
- LinFu.Delegates.dll
- LinFu.DynamicProxy.dll
- LinFu.License.txt
- LinFu.Reflection.dll
- NMock2.dll
- nunit.core.dll
- nunit.framework.dll
- Simple.IoC.dll
- Simple.IoC.Loaders.dll
|
using System;
using System.Collections.Generic;
namespace LinFu.DynamicProxy
{
internal class ProxyCache : IProxyCache
{
private static readonly Dictionary<ProxyCacheEntry, Type> _cache = new Dictionary<ProxyCacheEntry, Type>();
#region IProxyCache Members
public bool Contains(Type baseType, Type[] interfaces)
{
ProxyCacheEntry entry = new ProxyCacheEntry(baseType, interfaces);
return _cache.ContainsKey(entry);
}
public Type GetProxyType(Type baseType, Type[] interfaces)
{
ProxyCacheEntry entry = new ProxyCacheEntry(baseType, interfaces);
return _cache[entry];
}
public void StoreProxyType(Type result, Type baseType, Type[] baseInterfaces)
{
ProxyCacheEntry entry = new ProxyCacheEntry(baseType, baseInterfaces);
_cache[entry] = result;
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.