Exemple #1
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="ServiceClientContentSession"/> class.
 /// </summary>
 public ServiceClientContentSession(
     string name,
     ImplicitPin implicitPin,
     ILogger logger,
     IAbsFileSystem fileSystem,
     ServiceClientContentSessionTracer sessionTracer,
     ServiceClientContentStoreConfiguration configuration,
     Func <IRpcClient> rpcClientFactory = null)
     : base(name, implicitPin, logger, fileSystem, sessionTracer, configuration, rpcClientFactory)
 {
 }
Exemple #2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="ReadOnlyServiceClientContentSession"/> class.
        /// </summary>
        public ReadOnlyServiceClientContentSession(
            string name,
            ImplicitPin implicitPin,
            ILogger logger,
            IAbsFileSystem fileSystem,
            ServiceClientContentSessionTracer sessionTracer,
            ServiceClientContentStoreConfiguration configuration,
            Func <IRpcClient>?rpcClientFactory = null)
            : base(name)
        {
            Contract.Requires(name != null);
            Contract.Requires(logger != null);
            Contract.Requires(fileSystem != null);

            _implicitPin          = implicitPin;
            SessionTracer         = sessionTracer;
            Logger                = logger;
            FileSystem            = fileSystem;
            Configuration         = configuration;
            TempFileStreamFactory = new TempFileStreamFactory(FileSystem);

            RpcClient   = (rpcClientFactory ?? GetRpcClient)();
            RetryPolicy = configuration.RetryPolicy;
        }