示例#1
0
        public static IGlobalConfiguration <SqlStorage> UseSqlServerStorage(
            this IGlobalConfiguration configuration,
            string nameOrConnectionString)
        {
            if (configuration == null)
            {
                throw new ArgumentNullException(nameof(configuration));
            }
            if (nameOrConnectionString == null)
            {
                throw new ArgumentNullException(nameof(nameOrConnectionString));
            }

            var storage = new SqlStorage(nameOrConnectionString);

            return(configuration.UseStorage(storage));
        }
示例#2
0
 public SqlStorageMonitoringApi(SqlStorage storage)
 {
     _storage = storage ?? throw new ArgumentNullException(nameof(storage));
 }