Exemplo n.º 1
0
        public RavenServer(RavenConfiguration configuration)
        {
            JsonDeserializationValidator.Validate();

            Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));

            if (Configuration.Initialized == false)
            {
                throw new InvalidOperationException("Configuration must be initialized");
            }

            ServerStore = new ServerStore(Configuration, this);
            Metrics     = new MetricsCountersManager();

            _tcpLogger = LoggingSource.Instance.GetLogger <RavenServer>("<TcpServer>");
        }
Exemplo n.º 2
0
        public RavenServer(RavenConfiguration configuration)
        {
            JsonDeserializationValidator.Validate();

            Configuration = configuration ?? throw new ArgumentNullException(nameof(configuration));
            if (Configuration.Initialized == false)
            {
                throw new InvalidOperationException("Configuration must be initialized");
            }

            Statistics = new ServerStatistics();

            AdminScripts = new ScriptRunnerCache(null, Configuration)
            {
                EnableClr = true
            };

            ServerStore = new ServerStore(Configuration, this);
            Metrics     = new MetricCounters();

            _tcpLogger = LoggingSource.Instance.GetLogger <RavenServer>("<TcpServer>");
        }