File tree 3 files changed +6
-6
lines changed
BuildingBlocks/Data/Masa.BuildingBlocks.Data.Contracts
Contrib/Service/Caller/Tests/Masa.Contrib.Service.Caller.Tests
Utils/Data/Masa.Utils.Data.Elasticsearch
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public virtual TService Create()
28
28
{
29
29
var defaultOptions = GetDefaultOptions ( FactoryOptions . Options ) ;
30
30
if ( defaultOptions == null )
31
- throw new NotImplementedException ( DefaultServiceNotFoundMessage ) ;
31
+ throw new NotSupportedException ( DefaultServiceNotFoundMessage ) ;
32
32
33
33
return defaultOptions . Func . Invoke ( ServiceProvider ) ;
34
34
}
@@ -37,7 +37,7 @@ public virtual TService Create(string name)
37
37
{
38
38
var options = FactoryOptions . Options . SingleOrDefault ( c => c . Name . Equals ( name , StringComparison . OrdinalIgnoreCase ) ) ;
39
39
if ( options == null )
40
- throw new NotImplementedException ( string . Format ( SpecifyServiceNotFoundMessage , name ) ) ;
40
+ throw new NotSupportedException ( string . Format ( SpecifyServiceNotFoundMessage , name ) ) ;
41
41
42
42
return options . Func . Invoke ( ServiceProvider ) ;
43
43
}
Original file line number Diff line number Diff line change @@ -218,9 +218,9 @@ public void TestNotUseCaller()
218
218
services . AddCaller ( ) ;
219
219
var serviceProvider = services . BuildServiceProvider ( ) ;
220
220
var callerFactory = serviceProvider . GetRequiredService < ICallerFactory > ( ) ;
221
- Assert . ThrowsException < NotImplementedException > ( ( ) => callerFactory . Create ( ) ,
221
+ Assert . ThrowsException < NotSupportedException > ( ( ) => callerFactory . Create ( ) ,
222
222
"No default Caller found, you may need service.AddCaller()" ) ;
223
- Assert . ThrowsException < NotImplementedException > ( ( ) => callerFactory . Create ( "test" ) ,
223
+ Assert . ThrowsException < NotSupportedException > ( ( ) => callerFactory . Create ( "test" ) ,
224
224
string . Format ( "Please make sure you have used [{0}] Caller, it was not found" , "test" ) ) ;
225
225
}
226
226
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ public IElasticClient Create()
20
20
var options = _elasticsearchFactoryOptions . Value ;
21
21
var defaultOptions = GetDefaultOptions ( options . Options ) ;
22
22
if ( defaultOptions == null )
23
- throw new NotImplementedException ( "No default ElasticClient found" ) ;
23
+ throw new NotSupportedException ( "No default ElasticClient found" ) ;
24
24
25
25
return defaultOptions . Func . Invoke ( _serviceProvider ) ;
26
26
}
@@ -35,7 +35,7 @@ public IElasticClient Create(string name)
35
35
{
36
36
var options = _elasticsearchFactoryOptions . Value . Options . SingleOrDefault ( c => c . Name . Equals ( name , StringComparison . OrdinalIgnoreCase ) ) ;
37
37
if ( options == null )
38
- throw new NotImplementedException ( $ "Please make sure you have used [{ name } ] ElasticClient, it was not found") ;
38
+ throw new NotSupportedException ( $ "Please make sure you have used [{ name } ] ElasticClient, it was not found") ;
39
39
40
40
return options . Func . Invoke ( _serviceProvider ) ;
41
41
}
You can’t perform that action at this time.
0 commit comments