Ejemplo n.º 1
0
 public virtual CacheItem Process(CacheItem cacheItem, CommandContext commandContext)
 {
     /*
      * create new cache item
      * assign original item
      * pass to default handler
      * then pass to remaining handlers
      */
     throw new NotImplementedException();
 }
Ejemplo n.º 2
0
        public virtual Key Build(CacheItem item, CommandContext commandContext)
        {
            var key = _keyGenerator.Generate(item, commandContext);
            Condition.WithExceptionOnFailure<CachingException>()
                .Requires(key, "generated key")
                .IsNotNull("Key generator failed to produce key.");

            foreach (var keyTransformation in TransformedBy)
            {
                key = keyTransformation.Transform(key, item, commandContext);
                Condition.WithExceptionOnFailure<CachingException>()
                    .Requires(key, "transformed key")
                    .IsNotNull("Key transformation failed to transform key.");
            }

            return key;
        }
Ejemplo n.º 3
0
 public virtual object Deserialize(object value, CommandContext executingCommand)
 {
     throw new NotImplementedException();
 }