コード例 #1
0
ファイル: CacheInterceptor.cs プロジェクト: chenzuo/mbcache
		public CacheInterceptor(CacheAdapter cache, ConfigurationForType configurationForType, object target)
		{
			_cache = cache;
			_configurationForType = configurationForType;
			_target = target;
			_cachingComponent = new CachingComponent(cache, configurationForType.CacheKey, configurationForType);
		}
コード例 #2
0
ファイル: ProxyValidator.cs プロジェクト: chenzuo/mbcache
		private static void checkCachedMethodsAreVirtual(ConfigurationForType configurationForType)
		{
			foreach (var methodInfo in configurationForType.CachedMethods)
			{
				checkMethod(configurationForType.ComponentType.ConcreteType, methodInfo);
			}
		}
コード例 #3
0
 private static void checkCachedMethodsAreVirtual(ConfigurationForType configurationForType)
 {
     foreach (var methodInfo in configurationForType.CachedMethods)
     {
         checkMethod(configurationForType.ComponentType.ConcreteType, methodInfo);
     }
 }
コード例 #4
0
ファイル: ProxyValidator.cs プロジェクト: KBoudich/mbcache
 public void Validate(ConfigurationForType configurationForType)
 {
     checkCachedMethodsAreVirtual(configurationForType);
     if (!_proxyFactory.AllowNonVirtualMember)
     {
         checkAccessibleMembersAreVirtual(configurationForType.ComponentType.ConcreteType);
     }
 }
コード例 #5
0
ファイル: CachingComponent.cs プロジェクト: jesuissur/mbcache
 public CachingComponent(CacheAdapter cache,
                         ICacheKey cacheKey,
                         ConfigurationForType configurationForType)
 {
     _cache         = cache;
     _cacheKey      = cacheKey;
     _componentType = configurationForType.ComponentType;
     UniqueId       = configurationForType.CachePerInstance ? Guid.NewGuid().ToString() : "Global";
 }
コード例 #6
0
ファイル: ProxyValidator.cs プロジェクト: chenzuo/mbcache
		public static void Validate(ConfigurationForType configurationForType)
		{
			checkCachedMethodsAreVirtual(configurationForType);
		}
コード例 #7
0
 public static void Validate(ConfigurationForType configurationForType)
 {
     checkCachedMethodsAreVirtual(configurationForType);
 }
コード例 #8
0
ファイル: CacheInterceptor.cs プロジェクト: chenzuo/mbcache
		public CacheInterceptor(CacheAdapter cache, 
										ConfigurationForType configurationForType)
		{
			_cache = cache;
			_configurationForType = configurationForType;
		}