@@ -71,14 +71,14 @@ private static IContainerExtension TryGetContainer()
71
71
public IServiceCollection Services { get ; private set ; }
72
72
73
73
74
- private IServiceScope _parentScope = null ;
74
+ private IServiceScope _parentScope = null ;
75
75
private IServiceProvider _instance ;
76
76
public IServiceProvider Instance
77
77
{
78
78
get
79
79
{
80
80
bool createScope = false ;
81
- if ( requiresRebuild || _instance is null )
81
+ if ( requiresRebuild || _instance is null )
82
82
{
83
83
if ( _serviceScope != null )
84
84
{
@@ -88,7 +88,7 @@ public IServiceProvider Instance
88
88
_instance = new ConcreteAwareServiceProvider ( Services . BuildServiceProvider ( ) ) ;
89
89
requiresRebuild = false ;
90
90
91
- if ( createScope )
91
+ if ( createScope )
92
92
{
93
93
_parentScope = _instance . CreateScope ( ) ;
94
94
_serviceScope = new ConcreteAwareServiceScope ( _parentScope ) ;
@@ -119,9 +119,9 @@ public PrismContainerExtension(IServiceCollection services)
119
119
120
120
public void SetServiceCollection ( IServiceCollection services )
121
121
{
122
- if ( Services . Any ( ) )
122
+ if ( Services . Any ( ) )
123
123
{
124
- foreach ( var service in Services )
124
+ foreach ( var service in Services )
125
125
{
126
126
services . Add ( service ) ;
127
127
}
@@ -210,7 +210,7 @@ public IContainerRegistry Register(Type from, Type to, string name)
210
210
Services . AddTransient ( to ) ;
211
211
NamedServiceRegistry . Add ( name , from , to ) ;
212
212
213
- if ( from == typeof ( object ) && to . Namespace . Contains ( "Views" ) )
213
+ if ( from == typeof ( object ) && to . Namespace . Contains ( "Views" ) )
214
214
{
215
215
216
216
}
@@ -234,7 +234,7 @@ public IContainerRegistry RegisterServices(Action<IServiceCollection> registerSe
234
234
public IContainerRegistry RegisterMany ( Type implementingType , params Type [ ] serviceTypes )
235
235
{
236
236
requiresRebuild = true ;
237
- if ( serviceTypes is null || serviceTypes . Count ( ) == 0 )
237
+ if ( serviceTypes is null || serviceTypes . Count ( ) == 0 )
238
238
{
239
239
serviceTypes = implementingType . GetInterfaces ( ) ;
240
240
}
@@ -419,7 +419,7 @@ public IScopedProvider CreateScope()
419
419
420
420
public void Dispose ( )
421
421
{
422
- if ( _serviceScope != null )
422
+ if ( _serviceScope != null )
423
423
{
424
424
_serviceScope . Dispose ( ) ;
425
425
_serviceScope = null ;
0 commit comments