File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
src/Cofoundry.Plugins.Azure Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,12 @@ public class AzureDependencyRegistration : IDependencyRegistration
13
13
{
14
14
public void Register ( IContainerRegister container )
15
15
{
16
- if ( AutoBootstrapServices ( ) )
16
+ container
17
+ . RegisterFactory < AzureBlobFileServiceSettings , ConfigurationSettingsFactory < AzureBlobFileServiceSettings > > ( )
18
+ . RegisterFactory < AzureSettings , ConfigurationSettingsFactory < AzureSettings > > ( )
19
+ ;
20
+
21
+ if ( AutoRegisterServices ( ) )
17
22
{
18
23
var delayedRegistrationOptions = new RegistrationOptions ( )
19
24
{
@@ -22,8 +27,6 @@ public void Register(IContainerRegister container)
22
27
} ;
23
28
24
29
container
25
- . RegisterFactory < AzureBlobFileServiceSettings , ConfigurationSettingsFactory < AzureBlobFileServiceSettings > > ( )
26
- . RegisterFactory < AzureSettings , ConfigurationSettingsFactory < AzureSettings > > ( )
27
30
. RegisterType < IFileStoreService , AzureBlobFileService > ( delayedRegistrationOptions )
28
31
;
29
32
}
@@ -36,9 +39,9 @@ public void Register(IContainerRegister container)
36
39
/// <remarks>
37
40
/// Publicly exposed setting so it can be used in other Azure dependency registrations.
38
41
/// </remarks>
39
- public static bool AutoBootstrapServices ( )
42
+ public static bool AutoRegisterServices ( )
40
43
{
41
- return ConfigurationHelper . GetSettingAsBool ( "Cofoundry:Plugin:Azure:AutoRegisterDependencies " , true ) ;
44
+ return ConfigurationHelper . GetSettingAsBool ( "Cofoundry:Plugin:Azure:AutoRegisterServices " , true ) ;
42
45
}
43
46
}
44
47
}
Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ public class AzureSettings : PluginConfigurationSettingsBase
11
11
{
12
12
public AzureSettings ( )
13
13
{
14
- AutoRegisterDependencies = true ;
14
+ AutoRegisterServices = true ;
15
15
}
16
16
17
17
/// <summary>
18
18
/// Defaults to true. Indicates whether we want to auto-bootstrap azure services and run against the
19
19
/// azure infrastructure. Disable this in dev when you want to test locally.
20
20
/// </summary>
21
- public bool AutoRegisterDependencies { get ; set ; }
21
+ public bool AutoRegisterServices { get ; set ; }
22
22
}
23
23
}
You can’t perform that action at this time.
0 commit comments