Exemplo n.º 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Ensure.ArgumentNotNull(pipeline, "pipeline");
            Ensure.ArgumentNotNull(cachePruner, "cachePruner");

            this.Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Ensure.ArgumentNotNull(pipeline, "pipeline");
            Ensure.ArgumentNotNull(cachePruner, "cachePruner");

            this.Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Contract.Requires(pipeline != null);
            Contract.Requires(cachePruner != null);

            this.Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        /// <exception cref="ArgumentNullException"><paramref name="pipeline"/> is <see langword="null"/>.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="cachePruner"/> is <see langword="null"/>.</exception>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Ensure.ArgumentNotNull(pipeline, nameof(pipeline));
            Ensure.ArgumentNotNull(cachePruner, nameof(cachePruner));

            this.Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Ensure.ArgumentNotNull(pipeline, "pipeline");
            Ensure.ArgumentNotNull(cachePruner, "cachePruner");

            _entries = new Multimap<IBinding, CacheEntry>();
            Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Cache"/> class.
        /// </summary>
        /// <param name="pipeline">The pipeline component.</param>
        /// <param name="cachePruner">The cache pruner component.</param>
        public Cache(IPipeline pipeline, ICachePruner cachePruner)
        {
            Ensure.ArgumentNotNull(pipeline, "pipeline");
            Ensure.ArgumentNotNull(cachePruner, "cachePruner");

            _entries = new Multimap <IBinding, CacheEntry>();
            Pipeline = pipeline;
            cachePruner.Start(this);
        }
Exemplo n.º 7
0
        public void Constructor_ShouldThrowArgumentNullExceptionWhenCachePrunerIsNull()
        {
            var pipeline = _pipelineMock.Object;
            const ICachePruner cachePruner = null;

            var actual = Assert.Throws <ArgumentNullException>(() => new Cache(pipeline, cachePruner));

            Assert.Null(actual.InnerException);
            Assert.Equal(nameof(cachePruner), actual.ParamName);
        }
Exemplo n.º 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivationCache"/> class.
 /// </summary>
 /// <param name="cachePruner">The cache pruner.</param>
 public ActivationCache(ICachePruner cachePruner)
 {
     cachePruner.Start(this);
 }
Exemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivationCache"/> class.
 /// </summary>
 /// <param name="cachePruner">The cache pruner.</param>
 public ActivationCache(ICachePruner cachePruner)
 {
     Ensure.ArgumentNotNull(cachePruner, nameof(cachePruner));
     cachePruner.Start(this);
 }
Exemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivationCache"/> class.
 /// </summary>
 /// <param name="cachePruner">The cache pruner.</param>
 public ActivationCache(ICachePruner cachePruner)
 {
     Contract.Requires(cachePruner != null);
     cachePruner.Start(this);
 }
Exemplo n.º 11
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivationCache"/> class.
 /// </summary>
 /// <param name="cachePruner">The cache pruner.</param>
 public ActivationCache(ICachePruner cachePruner)
 {
     cachePruner.Start(this);
 }
Exemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Cache"/> class.
 /// </summary>
 /// <param name="pipeline">The pipeline component.</param>
 /// <param name="cachePruner">The cache pruner component.</param>
 public Cache(IPipeline pipeline, ICachePruner cachePruner)
 {
     this.Pipeline = pipeline;
     cachePruner.Start(this);
 }
Exemplo n.º 13
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Cache"/> class.
 /// </summary>
 /// <param name="pipeline">The pipeline component.</param>
 /// <param name="cachePruner">The cache pruner component.</param>
 public Cache(IPipeline pipeline, ICachePruner cachePruner)
 {
     this.Pipeline = pipeline;
     cachePruner.Start(this);
 }
Exemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ActivationCache"/> class.
 /// </summary>
 /// <param name="cachePruner">The cache pruner.</param>
 public ActivationCache(ICachePruner cachePruner)
 {
     Contract.Requires(cachePruner != null);
     cachePruner.Start(this);
 }