Example #1
0
        /// <summary>   Initializes a new instance of the FileHttpHandler class. </summary>
        /// <remarks>   ebrown, 2/9/2011. </remarks>
        /// <exception cref="ArgumentNullException">    Thrown when the configuration, streamLoader or statusLogger are null. </exception>
        /// <param name="configuration">    The configuration used to control the behavior of the FileHttpHandler. </param>
        /// <param name="streamLoader">     The class responsible for loading a FileStream / Cloud URI given a HttpRequestBase. </param>
        /// <param name="statusLogger">     The class responsible for logging status information as requests are processed by the handler. </param>
        public FileHttpHandler(IFileHttpHandlerConfiguration configuration,
            IFileHttpHandlerStreamLoader streamLoader,
            IFileHttpHandlerStatusLog statusLogger)
        {
            if (null == configuration) { throw new ArgumentNullException("configuration"); }
            if (null == streamLoader) { throw new ArgumentNullException("streamLoader"); }
            if (null == statusLogger) { throw new ArgumentNullException("statusLogger"); }

            this._configuration = configuration;
            this._streamLoader = streamLoader;
            this._statusLogger = statusLogger;
        }
Example #2
0
        /// <summary>   Initializes a new instance of the FileHttpHandler class. </summary>
        /// <remarks>   ebrown, 2/9/2011. </remarks>
        /// <exception cref="ArgumentNullException">    Thrown when the configuration, streamLoader or statusLogger are null. </exception>
        /// <param name="configuration">    The configuration used to control the behavior of the FileHttpHandler. </param>
        /// <param name="streamLoader">     The class responsible for loading a FileStream / Cloud URI given a HttpRequestBase. </param>
        /// <param name="statusLogger">     The class responsible for logging status information as requests are processed by the handler. </param>
        public FileHttpHandler(IFileHttpHandlerConfiguration configuration,
                               IFileHttpHandlerStreamLoader streamLoader,
                               IFileHttpHandlerStatusLog statusLogger)
        {
            if (null == configuration)
            {
                throw new ArgumentNullException("configuration");
            }
            if (null == streamLoader)
            {
                throw new ArgumentNullException("streamLoader");
            }
            if (null == statusLogger)
            {
                throw new ArgumentNullException("statusLogger");
            }

            this._configuration = configuration;
            this._streamLoader  = streamLoader;
            this._statusLogger  = statusLogger;
        }