Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Stumps.StumpsServer"/> class.
        /// </summary>
        public StumpsServer()
        {
            this.ListeningPort = NetworkInformation.FindRandomOpenPort();
            _remoteHttpServer = null;

            _syncRoot = new object();
            _stumpsManager = new StumpsManager();

            this.DefaultResponse = FallbackResponse.Http503ServiceUnavailable;
            this.StumpsEnabled = true;
        }
Beispiel #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="StumpsServer"/> class.
        /// </summary>
        public StumpsServer()
        {
            this.ListeningPort = NetworkInformation.FindRandomOpenPort();
            _remoteHttpServer  = null;

            _syncRoot      = new object();
            _stumpsManager = new StumpsManager();

            this.DefaultResponse = FallbackResponse.Http503ServiceUnavailable;
            this.StumpsEnabled   = true;
        }
Beispiel #3
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="T:Stumps.StumpsHandler" /> class.
        /// </summary>
        /// <param name="stumpsManager">The stumps manager.</param>
        /// <exception cref="System.ArgumentNullException"><paramref name="stumpsManager"/> is <c>null</c>.</exception>
        public StumpsHandler(IStumpsManager stumpsManager)
        {

            if (stumpsManager == null)
            {
                throw new ArgumentNullException("stumpsManager");
            }

            _stumpsManager = stumpsManager;
            _handlerEnabled = true;

        }
Beispiel #4
0
 /// <summary>
 ///     Initializes a new instance of the <see cref="StumpsHandler" /> class.
 /// </summary>
 /// <param name="stumpsManager">The stumps manager.</param>
 /// <exception cref="ArgumentNullException"><paramref name="stumpsManager"/> is <c>null</c>.</exception>
 public StumpsHandler(IStumpsManager stumpsManager)
 {
     _stumpsManager  = stumpsManager ?? throw new ArgumentNullException(nameof(stumpsManager));
     _handlerEnabled = true;
 }