Beispiel #1
0
		public KeyAndItsDependingKeys GetAndPutKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
		{
			var startKey = RemoveKey(type, component, method, parameters);
			if (startKey == null)
				return new KeyAndItsDependingKeys();

			var scope = Scope();
			var completeKey = scope == null ? 
				startKey : 
				string.Concat(startKey, separator, Scope());
			return new KeyAndItsDependingKeys(completeKey, () => allRemoveKeys(completeKey));
		}
Beispiel #2
0
		public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method)
		{
			var ret = new StringBuilder(RemoveKey(type, component));
			ret.Append(separator);
			ret.Append(method.Name);
			foreach (var parameter in method.GetParameters())
			{
				ret.Append(separatorForParameters);
				ret.Append(parameter.ParameterType);
			}
			return ret.ToString();
		}
Beispiel #3
0
		public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
		{
			var ret = new StringBuilder(RemoveKey(type, component, method));
			ret.Append(separator);
			foreach (var parameter in parameters)
			{
				ret.Append(separatorForParameters);
				var parameterKey = ParameterValue(parameter);
				if (parameterKey == null)
					return null;
				checkIfSuspiousParameter(parameter, parameterKey);
				ret.Append(parameterKey);
			}

			return ret.ToString();
		}
			public string RemoveKey(ComponentType type, ICachingComponent component)
			{
				return TheKey;
			}
			public string RemoveKey(ComponentType type)
			{
				return TheKey;
			}
			public KeyAndItsDependingKeys GetAndPutKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
			{
				return new KeyAndItsDependingKeys(TheKey, () => new List<string>());
			}
			public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
			{
				return TheKey;
			}
			public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method)
			{
				return TheKey;
			}
Beispiel #9
0
		public string RemoveKey(ComponentType type)
		{
			return type.ToString();
		}
Beispiel #10
0
		public string RemoveKey(ComponentType type, ICachingComponent component)
		{
			return string.Concat(RemoveKey(type), separator, component.UniqueId);
		}
Beispiel #11
0
		public ConfigurationForType(Type clrType, string typeAsCacheKeyString)
		{
			ComponentType = new ComponentType(clrType, typeAsCacheKeyString);
			CachedMethods = new HashSet<MethodInfo>();
			EnabledCache = true;
		}
Beispiel #12
0
		public KeyAndItsDependingKeys GetAndPutKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
		{
			throw new NotImplementedException();
		}
Beispiel #13
0
		public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method, IEnumerable<object> parameters)
		{
			throw new NotImplementedException();
		}
Beispiel #14
0
		public string RemoveKey(ComponentType type, ICachingComponent component, MethodInfo method)
		{
			throw new NotImplementedException();
		}
Beispiel #15
0
		public string RemoveKey(ComponentType type)
		{
			throw new NotImplementedException();
		}