From 6e0fd042de95555b47384635c2b5fc9225268367 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
<41898282+github-actions[bot]@users.noreply.github.com>
Date: Thu, 8 Oct 2020 00:35:36 +0000
Subject: [PATCH] Automated dotnet-format update
---
sample/PrismSample/App.xaml.cs | 2 +-
.../ViewModels/MainPageViewModel.cs | 2 +-
.../IServiceCollectionExtensions.cs | 2 +-
.../Behaviors/TabbedPageChildTitleBehavior.cs | 6 +--
.../Commands/ExecutionAwareCommand.cs | 6 +--
.../Commands/ExecutionAwareCommand{T}.cs | 4 +-
.../Common/ErrorHandlerRegistry.cs | 6 +--
.../Ioc/RequiredTypesExtensions.cs | 2 +-
.../ErrorReportingNavigationService.cs | 4 +-
.../Navigation/NavigationBuilder.cs | 4 +-
.../ConcreteAwareServiceProvider.cs | 2 +-
.../ConcreteAwareServiceScope.cs | 2 +-
.../MicrsoftDependencyInjectionExtensions.cs | 2 +-
.../NamedServiceRegistry.cs | 4 +-
.../PrismContainerExtension.cs | 16 ++++----
.../Modularity/IModuleCatalogExtensions.cs | 4 +-
.../Modularity/ShinyPrismModuleInitializer.cs | 2 +-
.../Navigation/NavigationExtensions.cs | 2 +-
.../Navigation/NavigationServiceDelegate.cs | 4 +-
src/Shiny.Prism/PrismStartup.cs | 4 +-
.../Mocks/MockDbContext.cs | 2 +-
.../Mocks/AppMock.xaml.cs | 2 +-
.../Mocks/Navigation/MockNavigationService.cs | 4 +-
.../Tests/PrismApplicationTests.cs | 4 +-
.../ContainerTests.cs | 40 +++++++++----------
.../MicrosoftExtensionsTests.cs | 8 ++--
.../ContainerTests.cs | 38 +++++++++---------
.../MicrosoftExtensionsTests.cs | 6 +--
tests/Shiny.Prism.Tests/Mocks/MockStartup.cs | 4 +-
.../Mocks/Modularity/MockModuleStartup.cs | 2 +-
30 files changed, 95 insertions(+), 95 deletions(-)
diff --git a/sample/PrismSample/App.xaml.cs b/sample/PrismSample/App.xaml.cs
index 95217a5..e1c66f6 100644
--- a/sample/PrismSample/App.xaml.cs
+++ b/sample/PrismSample/App.xaml.cs
@@ -18,7 +18,7 @@ protected override async void OnInitialized()
var result = await NavigationService.NavigateAsync("MainPage");
- if(!result.Success)
+ if (!result.Success)
{
MainPage = new MainPage
{
diff --git a/sample/PrismSample/ViewModels/MainPageViewModel.cs b/sample/PrismSample/ViewModels/MainPageViewModel.cs
index a7bd855..bde4791 100644
--- a/sample/PrismSample/ViewModels/MainPageViewModel.cs
+++ b/sample/PrismSample/ViewModels/MainPageViewModel.cs
@@ -31,7 +31,7 @@ public string Message
private void OnConnectivityChanged(bool connected)
{
- if(connected)
+ if (connected)
{
Message = "The internet is connected... We can now do our anti-Social Media... and swipe right, and like our friend's lunch...";
}
diff --git a/src/Prism.Container.Extensions/IServiceCollectionExtensions.cs b/src/Prism.Container.Extensions/IServiceCollectionExtensions.cs
index 8b87c24..1bcb2a8 100644
--- a/src/Prism.Container.Extensions/IServiceCollectionExtensions.cs
+++ b/src/Prism.Container.Extensions/IServiceCollectionExtensions.cs
@@ -18,7 +18,7 @@ public static class IServiceCollectionExtensions
///
public static IContainerRegistry RegisterServices(this IContainerRegistry containerRegistry, Action registerServices)
{
- if(containerRegistry is IServiceCollectionAware sca)
+ if (containerRegistry is IServiceCollectionAware sca)
{
sca.RegisterServices(registerServices);
}
diff --git a/src/Prism.Forms.Extended/Behaviors/TabbedPageChildTitleBehavior.cs b/src/Prism.Forms.Extended/Behaviors/TabbedPageChildTitleBehavior.cs
index c382fae..4e3d9b0 100644
--- a/src/Prism.Forms.Extended/Behaviors/TabbedPageChildTitleBehavior.cs
+++ b/src/Prism.Forms.Extended/Behaviors/TabbedPageChildTitleBehavior.cs
@@ -9,8 +9,8 @@ protected override void OnAttachedTo(TabbedPage bindable)
{
base.OnAttachedTo(bindable);
bindable.SetBinding(Page.TitleProperty, new Binding { Path = "CurrentPage.Title", Source = bindable });
-
- if(bindable.BindingContext is INotifyPropertyChanged vm)
+
+ if (bindable.BindingContext is INotifyPropertyChanged vm)
{
vm.PropertyChanged += OnViewModelPropertyChanged;
}
@@ -28,7 +28,7 @@ protected override void OnDetachingFrom(TabbedPage bindable)
private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
{
- if(e.PropertyName == "Title")
+ if (e.PropertyName == "Title")
{
AssociatedObject.RemoveBinding(Page.TitleProperty);
var property = AssociatedObject.BindingContext.GetType().GetProperty(e.PropertyName);
diff --git a/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand.cs b/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand.cs
index f42ae6a..759d812 100644
--- a/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand.cs
+++ b/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand.cs
@@ -34,7 +34,7 @@ protected override void Execute(object parameter)
{
IsExecuting = true;
- if(AsyncExecuteDelegate is null)
+ if (AsyncExecuteDelegate is null)
{
ExecuteDelegate();
}
@@ -53,14 +53,14 @@ protected override void Execute(object parameter)
}
catch (Exception ex)
{
- if(!_registry.HandledException(ex))
+ if (!_registry.HandledException(ex))
{
throw new UnhandledCommandException(ex);
}
}
finally
{
- if(AsyncExecuteDelegate is null)
+ if (AsyncExecuteDelegate is null)
{
IsExecuting = false;
}
diff --git a/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand{T}.cs b/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand{T}.cs
index 8bb286b..c31efcb 100644
--- a/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand{T}.cs
+++ b/src/Prism.Forms.Extended/Commands/ExecutionAwareCommand{T}.cs
@@ -28,11 +28,11 @@ protected override bool CanExecute(object parameter)
try
{
T param = default;
- if(parameter is T TParam)
+ if (parameter is T TParam)
{
param = TParam;
}
- else if(parameter != null && ThrowOnInvalidCast)
+ else if (parameter != null && ThrowOnInvalidCast)
{
throw new InvalidCastException($"The Command expected a typeof '{typeof(T).FullName}' but recieved a parameter of type '{parameter.GetType().FullName}");
}
diff --git a/src/Prism.Forms.Extended/Common/ErrorHandlerRegistry.cs b/src/Prism.Forms.Extended/Common/ErrorHandlerRegistry.cs
index 833093d..95ad09f 100644
--- a/src/Prism.Forms.Extended/Common/ErrorHandlerRegistry.cs
+++ b/src/Prism.Forms.Extended/Common/ErrorHandlerRegistry.cs
@@ -49,9 +49,9 @@ public bool HandledException(Exception ex)
if (ex is null) return true;
var type = ex.GetType();
- foreach(var key in Keys)
+ foreach (var key in Keys)
{
- if(type.IsAssignableFrom(key))
+ if (type.IsAssignableFrom(key))
{
var handler = this[key];
handler?.Invoke(ex);
@@ -59,7 +59,7 @@ public bool HandledException(Exception ex)
}
}
- if(ex is AggregateException ae)
+ if (ex is AggregateException ae)
{
var results = ae.InnerExceptions.Select(e => HandledException(e));
return results.Where(x => x == false).Count() == 0;
diff --git a/src/Prism.Forms.Extended/Ioc/RequiredTypesExtensions.cs b/src/Prism.Forms.Extended/Ioc/RequiredTypesExtensions.cs
index 6e8ba28..040a19d 100644
--- a/src/Prism.Forms.Extended/Ioc/RequiredTypesExtensions.cs
+++ b/src/Prism.Forms.Extended/Ioc/RequiredTypesExtensions.cs
@@ -41,7 +41,7 @@ public static void RegisterRequiredTypes(this IContainerRegistry containerRegist
public static void RegisterPrismCoreServices(this IServiceCollection services)
{
- if(!services.IsRegistered())
+ if (!services.IsRegistered())
{
services.AddSingleton(p =>
{
diff --git a/src/Prism.Forms.Extended/Navigation/ErrorReportingNavigationService.cs b/src/Prism.Forms.Extended/Navigation/ErrorReportingNavigationService.cs
index 9b20ea3..220a831 100644
--- a/src/Prism.Forms.Extended/Navigation/ErrorReportingNavigationService.cs
+++ b/src/Prism.Forms.Extended/Navigation/ErrorReportingNavigationService.cs
@@ -25,7 +25,7 @@ protected async override Task GoBackInternal(INavigationParam
{
var result = await base.GoBackInternal(parameters, useModalNavigation, animated);
- if(result.Exception != null)
+ if (result.Exception != null)
{
EventAggregator.GetEvent().Publish(new NavigationError
{
@@ -40,7 +40,7 @@ protected async override Task GoBackInternal(INavigationParam
protected override async Task GoBackToRootInternal(INavigationParameters parameters)
{
- var result = await base.GoBackToRootInternal(parameters);
+ var result = await base.GoBackToRootInternal(parameters);
if (result.Exception != null)
{
diff --git a/src/Prism.Forms.Extended/Navigation/NavigationBuilder.cs b/src/Prism.Forms.Extended/Navigation/NavigationBuilder.cs
index 0df1e14..2fc3ceb 100644
--- a/src/Prism.Forms.Extended/Navigation/NavigationBuilder.cs
+++ b/src/Prism.Forms.Extended/Navigation/NavigationBuilder.cs
@@ -49,12 +49,12 @@ public NavigationBuilder WithParameters(INavigationParameters parameters)
public NavigationBuilder WithParameters(params (string key, object value)[] parameters)
{
- if(_parameters is null)
+ if (_parameters is null)
{
_parameters = new NavigationParameters();
}
- foreach((var key, var value) in parameters)
+ foreach ((var key, var value) in parameters)
{
_parameters.Add(key, value);
}
diff --git a/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceProvider.cs b/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceProvider.cs
index 4f21a18..596e6c0 100644
--- a/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceProvider.cs
+++ b/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceProvider.cs
@@ -38,7 +38,7 @@ private object GetConcreteImplementation(Type serviceType)
return sp.GetService(serviceType);
}
- if(serviceType.IsValueType)
+ if (serviceType.IsValueType)
{
return Activator.CreateInstance(serviceType);
}
diff --git a/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceScope.cs b/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceScope.cs
index 3502297..b9b9ffd 100644
--- a/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceScope.cs
+++ b/src/Prism.Microsoft.DependencyInjection.Extensions/ConcreteAwareServiceScope.cs
@@ -13,7 +13,7 @@ public ConcreteAwareServiceScope(IServiceScope serviceScope)
public IServiceProvider ServiceProvider { get; }
#region IDisposable Support
-
+
protected virtual void Dispose(bool disposing)
{
diff --git a/src/Prism.Microsoft.DependencyInjection.Extensions/MicrsoftDependencyInjectionExtensions.cs b/src/Prism.Microsoft.DependencyInjection.Extensions/MicrsoftDependencyInjectionExtensions.cs
index 5293909..f5d7521 100644
--- a/src/Prism.Microsoft.DependencyInjection.Extensions/MicrsoftDependencyInjectionExtensions.cs
+++ b/src/Prism.Microsoft.DependencyInjection.Extensions/MicrsoftDependencyInjectionExtensions.cs
@@ -13,7 +13,7 @@ public static class MicrsoftDependencyInjectionExtensions
{
public static IServiceCollection ServiceCollection(this IContainerRegistry containerRegistry)
{
- if(containerRegistry is PrismContainerExtension pce)
+ if (containerRegistry is PrismContainerExtension pce)
{
return pce.Services;
}
diff --git a/src/Prism.Microsoft.DependencyInjection.Extensions/NamedServiceRegistry.cs b/src/Prism.Microsoft.DependencyInjection.Extensions/NamedServiceRegistry.cs
index 5a7a4a7..4135a5b 100644
--- a/src/Prism.Microsoft.DependencyInjection.Extensions/NamedServiceRegistry.cs
+++ b/src/Prism.Microsoft.DependencyInjection.Extensions/NamedServiceRegistry.cs
@@ -61,7 +61,7 @@ public Type GetRegistrationType(string key)
private void CheckDuplicate(string name, Type serviceType)
{
var registry = GetServiceRegistry(name, serviceType);
- if(registry != null)
+ if (registry != null)
{
Console.WriteLine($"'{serviceType.FullName}' with the name '{name}' has already been registered and will be replaced.");
Services.Remove(registry);
@@ -87,7 +87,7 @@ class NamedSingletonService : NamedService
public override object GetService(IServiceProvider serviceProvider)
{
- if(Instance is null)
+ if (Instance is null)
{
Instance = serviceProvider.GetOrConstructService(ImplementationType);
}
diff --git a/src/Prism.Microsoft.DependencyInjection.Extensions/PrismContainerExtension.cs b/src/Prism.Microsoft.DependencyInjection.Extensions/PrismContainerExtension.cs
index 4376bb9..de35ac7 100644
--- a/src/Prism.Microsoft.DependencyInjection.Extensions/PrismContainerExtension.cs
+++ b/src/Prism.Microsoft.DependencyInjection.Extensions/PrismContainerExtension.cs
@@ -71,14 +71,14 @@ private static IContainerExtension TryGetContainer()
public IServiceCollection Services { get; private set; }
- private IServiceScope _parentScope=null;
+ private IServiceScope _parentScope = null;
private IServiceProvider _instance;
public IServiceProvider Instance
{
get
{
bool createScope = false;
- if(requiresRebuild || _instance is null)
+ if (requiresRebuild || _instance is null)
{
if (_serviceScope != null)
{
@@ -88,7 +88,7 @@ public IServiceProvider Instance
_instance = new ConcreteAwareServiceProvider(Services.BuildServiceProvider());
requiresRebuild = false;
- if(createScope)
+ if (createScope)
{
_parentScope = _instance.CreateScope();
_serviceScope = new ConcreteAwareServiceScope(_parentScope);
@@ -119,9 +119,9 @@ public PrismContainerExtension(IServiceCollection services)
public void SetServiceCollection(IServiceCollection services)
{
- if(Services.Any())
+ if (Services.Any())
{
- foreach(var service in Services)
+ foreach (var service in Services)
{
services.Add(service);
}
@@ -210,7 +210,7 @@ public IContainerRegistry Register(Type from, Type to, string name)
Services.AddTransient(to);
NamedServiceRegistry.Add(name, from, to);
- if(from == typeof(object) && to.Namespace.Contains("Views"))
+ if (from == typeof(object) && to.Namespace.Contains("Views"))
{
}
@@ -234,7 +234,7 @@ public IContainerRegistry RegisterServices(Action registerSe
public IContainerRegistry RegisterMany(Type implementingType, params Type[] serviceTypes)
{
requiresRebuild = true;
- if(serviceTypes is null || serviceTypes.Count() == 0)
+ if (serviceTypes is null || serviceTypes.Count() == 0)
{
serviceTypes = implementingType.GetInterfaces();
}
@@ -419,7 +419,7 @@ public IScopedProvider CreateScope()
public void Dispose()
{
- if(_serviceScope != null)
+ if (_serviceScope != null)
{
_serviceScope.Dispose();
_serviceScope = null;
diff --git a/src/Shiny.Prism/Modularity/IModuleCatalogExtensions.cs b/src/Shiny.Prism/Modularity/IModuleCatalogExtensions.cs
index c13ab83..da9c27c 100644
--- a/src/Shiny.Prism/Modularity/IModuleCatalogExtensions.cs
+++ b/src/Shiny.Prism/Modularity/IModuleCatalogExtensions.cs
@@ -14,7 +14,7 @@ public static bool HasStartupModules(this IModuleCatalog moduleCatalog, out IEnu
{
startupModules = FilterForStartup(moduleCatalog.Modules);
- if(startupModules.Any())
+ if (startupModules.Any())
{
startupModules = moduleCatalog.CompleteListWithDependencies(startupModules);
}
@@ -22,7 +22,7 @@ public static bool HasStartupModules(this IModuleCatalog moduleCatalog, out IEnu
return startupModules.Any();
}
- private static IEnumerable FilterForStartup(IEnumerable modules) =>
+ private static IEnumerable FilterForStartup(IEnumerable modules) =>
modules.Where(m => Type.GetType(m.ModuleType)
.GetInterfaces()
.Any(x => x == typeof(IStartupModule))
diff --git a/src/Shiny.Prism/Modularity/ShinyPrismModuleInitializer.cs b/src/Shiny.Prism/Modularity/ShinyPrismModuleInitializer.cs
index 4327740..e124048 100644
--- a/src/Shiny.Prism/Modularity/ShinyPrismModuleInitializer.cs
+++ b/src/Shiny.Prism/Modularity/ShinyPrismModuleInitializer.cs
@@ -57,7 +57,7 @@ internal static class IShinyPrismModuleInitailzierExtensions
{
public static void LoadShinyModules(this IShinyPrismModuleInitializer initializer, IEnumerable modules)
{
- foreach(var module in modules)
+ foreach (var module in modules)
{
initializer.LoadShinyModule(module);
}
diff --git a/src/Shiny.Prism/Navigation/NavigationExtensions.cs b/src/Shiny.Prism/Navigation/NavigationExtensions.cs
index fd03a4c..0bfbe3d 100644
--- a/src/Shiny.Prism/Navigation/NavigationExtensions.cs
+++ b/src/Shiny.Prism/Navigation/NavigationExtensions.cs
@@ -10,7 +10,7 @@ public static class NavigationExtensions
public static void UseNavigationDelegate(this IServiceCollection services)
{
services.AddSingleton();
- if(!services.Any(x => x.ServiceType == typeof(IApplicationProvider)))
+ if (!services.Any(x => x.ServiceType == typeof(IApplicationProvider)))
{
services.AddSingleton();
}
diff --git a/src/Shiny.Prism/Navigation/NavigationServiceDelegate.cs b/src/Shiny.Prism/Navigation/NavigationServiceDelegate.cs
index ed8237b..4a667c6 100644
--- a/src/Shiny.Prism/Navigation/NavigationServiceDelegate.cs
+++ b/src/Shiny.Prism/Navigation/NavigationServiceDelegate.cs
@@ -76,7 +76,7 @@ Task INavigationService.NavigateAsync(string name)
Task INavigationService.NavigateAsync(string name, INavigationParameters parameters)
{
var navService = GetNavigationService();
- if(navService is null)
+ if (navService is null)
{
return PrismNotInitialized();
}
@@ -132,7 +132,7 @@ private INavigationService GetNavigationService()
if (PrismApplicationBase.Current is null) return null;
IContainerProvider container = Container;
- var navService = container.IsRegistered(NavigationServiceName) ?
+ var navService = container.IsRegistered(NavigationServiceName) ?
container.Resolve(NavigationServiceName) :
container.Resolve();
diff --git a/src/Shiny.Prism/PrismStartup.cs b/src/Shiny.Prism/PrismStartup.cs
index 12a8c18..c5d304c 100644
--- a/src/Shiny.Prism/PrismStartup.cs
+++ b/src/Shiny.Prism/PrismStartup.cs
@@ -37,7 +37,7 @@ void IShinyStartup.ConfigureServices(IServiceCollection services)
IServiceProvider IShinyStartup.CreateServiceProvider(IServiceCollection services)
{
var container = ContainerLocator.Current;
- if(container is null && (container = CreateContainerExtension()) is null)
+ if (container is null && (container = CreateContainerExtension()) is null)
{
throw new NullReferenceException("Call PrismContainerExtension.Init() prior to initializing PrismApplication");
}
@@ -47,7 +47,7 @@ IServiceProvider IShinyStartup.CreateServiceProvider(IServiceCollection services
var moduleCatalog = container.Resolve();
ConfigureModuleCatalog(moduleCatalog);
- if(moduleCatalog.Modules.Any() && moduleCatalog.HasStartupModules(out var startupModules))
+ if (moduleCatalog.Modules.Any() && moduleCatalog.HasStartupModules(out var startupModules))
{
var moduleInitializer = container.Resolve() as IShinyPrismModuleInitializer;
moduleInitializer.LoadShinyModules(startupModules);
diff --git a/tests/Prism.Container.Extensions.Shared.Tests/Mocks/MockDbContext.cs b/tests/Prism.Container.Extensions.Shared.Tests/Mocks/MockDbContext.cs
index 863b0a3..adcac53 100644
--- a/tests/Prism.Container.Extensions.Shared.Tests/Mocks/MockDbContext.cs
+++ b/tests/Prism.Container.Extensions.Shared.Tests/Mocks/MockDbContext.cs
@@ -9,7 +9,7 @@ namespace Prism.Container.Extensions.Shared.Mocks
{
public class MockDbContext : DbContext
{
- public MockDbContext([NotNull] DbContextOptions options)
+ public MockDbContext([NotNull] DbContextOptions options)
: base(options)
{
}
diff --git a/tests/Prism.Forms.Extended.Mocks/Mocks/AppMock.xaml.cs b/tests/Prism.Forms.Extended.Mocks/Mocks/AppMock.xaml.cs
index 6dcf28a..dd68d94 100644
--- a/tests/Prism.Forms.Extended.Mocks/Mocks/AppMock.xaml.cs
+++ b/tests/Prism.Forms.Extended.Mocks/Mocks/AppMock.xaml.cs
@@ -16,7 +16,7 @@ public partial class AppMock : PrismApplication
{
public AppMock()
{
-
+
}
public new INavigationService NavigationService => base.NavigationService;
diff --git a/tests/Prism.Forms.Extended.Mocks/Mocks/Navigation/MockNavigationService.cs b/tests/Prism.Forms.Extended.Mocks/Mocks/Navigation/MockNavigationService.cs
index a04961e..af7e479 100644
--- a/tests/Prism.Forms.Extended.Mocks/Mocks/Navigation/MockNavigationService.cs
+++ b/tests/Prism.Forms.Extended.Mocks/Mocks/Navigation/MockNavigationService.cs
@@ -25,11 +25,11 @@ public Task GoBackAsync(INavigationParameters parameters)
public Task GoBackAsync(INavigationParameters parameters, bool? useModalNavigation, bool animated)
{
- if(parameters is null)
+ if (parameters is null)
{
parameters = new NavigationParameters();
}
- if(useModalNavigation.HasValue)
+ if (useModalNavigation.HasValue)
{
parameters.Add(KnownNavigationParameters.UseModalNavigation, useModalNavigation);
}
diff --git a/tests/Prism.Forms.Extended.Mocks/Tests/PrismApplicationTests.cs b/tests/Prism.Forms.Extended.Mocks/Tests/PrismApplicationTests.cs
index 86b1ca6..b8fe3e3 100644
--- a/tests/Prism.Forms.Extended.Mocks/Tests/PrismApplicationTests.cs
+++ b/tests/Prism.Forms.Extended.Mocks/Tests/PrismApplicationTests.cs
@@ -122,7 +122,7 @@ public async Task UsesExplicitValue()
Assert.True(iOSPage.GetUseSafeArea(app.MainPage));
- result = await app.NavigationService.NavigateAsync("/ViewB");
+ result = await app.NavigationService.NavigateAsync("/ViewB");
Assert.True(result.Success);
Assert.IsType(app.MainPage);
@@ -144,7 +144,7 @@ public void ErrorReportingNavigationServiceIsRegistered()
// The unnamed resolve is Scoped while the Named is transient
ex = Record.Exception(() => navService = app.Container.Resolve(PrismApplicationBase.NavigationServiceName));
- if(ex is ContainerResolutionException cre)
+ if (ex is ContainerResolutionException cre)
{
var errors = cre.GetErrors();
}
diff --git a/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/ContainerTests.cs b/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/ContainerTests.cs
index 28c8c42..4e28eb9 100644
--- a/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/ContainerTests.cs
+++ b/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/ContainerTests.cs
@@ -24,7 +24,7 @@ public ContainerTests(ITestOutputHelper testOutputHelper) =>
[Fact]
public void StaticInstanceSameAsNewInstance()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -36,7 +36,7 @@ public void StaticInstanceSameAsNewInstance()
[Fact]
public void StaticInstanceSameAsCreateInstance()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -48,7 +48,7 @@ public void StaticInstanceSameAsCreateInstance()
[Fact]
public void CreateCanOnlyBeCalledOnce()
{
- lock(testLock)
+ lock (testLock)
{
var newInstance1 = CreateContainer();
Assert.Same(newInstance1, PrismContainerExtension.Current);
@@ -62,7 +62,7 @@ public void CreateCanOnlyBeCalledOnce()
[Fact]
public void IServiceProviderIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -73,7 +73,7 @@ public void IServiceProviderIsRegistered()
[Fact]
public void IContainerProviderIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -84,7 +84,7 @@ public void IContainerProviderIsRegistered()
[Fact]
public void RegisterManyHasSameTypeAcrossServices()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterMany();
@@ -110,7 +110,7 @@ public void RegisterManyHasSameTypeAcrossServices()
[Fact]
public void RegisterManyHasSameInstanceAcrossServices()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterManySingleton();
@@ -136,7 +136,7 @@ public void RegisterManyHasSameInstanceAcrossServices()
[Fact]
public void RegisterTransientService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.Register();
@@ -173,7 +173,7 @@ public void RegisterTransientNamedService()
[Fact]
public void RegisterSingletonService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterSingleton();
@@ -191,7 +191,7 @@ public void RegisterSingletonService()
[Fact]
public void RegisterInstanceResolveSameInstance()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var foo = new Foo();
@@ -206,7 +206,7 @@ public void RegisterInstanceResolveSameInstance()
[Fact]
public void RegisterInstanceResolveSameNamedInstance()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var foo = new Foo();
@@ -221,7 +221,7 @@ public void RegisterInstanceResolveSameNamedInstance()
[Fact]
public void RegisterSingletonNamedService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterSingleton("fooBar");
@@ -244,7 +244,7 @@ public void RegisterSingletonNamedService()
[Fact]
public void FactoryCreatesTransientTypeWithoutContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var message = "expected";
@@ -263,7 +263,7 @@ public void FactoryCreatesTransientTypeWithoutContainerProvider()
[Fact]
public void FactoryCreatesSingletonTypeWithoutContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var message = "expected";
@@ -375,7 +375,7 @@ public void FactoryCreatesSingletonTypeWithoutContainerProvider()
[Fact]
public void FactoryCreatesTransientTypeWithContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -398,7 +398,7 @@ public void FactoryCreatesTransientTypeWithContainerProvider()
[Fact]
public void FactoryCreatesTransientTypeWithContainerProviderWithGeneric()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -421,7 +421,7 @@ public void FactoryCreatesTransientTypeWithContainerProviderWithGeneric()
[Fact]
public void FactoryCreatesSingletonTypeWithContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -444,7 +444,7 @@ public void FactoryCreatesSingletonTypeWithContainerProvider()
[Fact]
public void FactoryCreatesSingletonTypeWithContainerProviderWithGeneric()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -467,7 +467,7 @@ public void FactoryCreatesSingletonTypeWithContainerProviderWithGeneric()
[Fact]
public void ResolveWithSpecifiedTypeOverridesRegistration()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.Register();
@@ -486,7 +486,7 @@ public void ResolveWithSpecifiedTypeOverridesRegistration()
[Fact]
public void ContainerIsMutable()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.Register();
diff --git a/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/MicrosoftExtensionsTests.cs b/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/MicrosoftExtensionsTests.cs
index ee8aeb0..01fdd9c 100644
--- a/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/MicrosoftExtensionsTests.cs
+++ b/tests/Prism.Microsoft.DependencyInjection.Extensions.Tests/MicrosoftExtensionsTests.cs
@@ -40,7 +40,7 @@ public void TransientServiceIsRegistered()
[Fact]
public void SingletonServiceIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -65,7 +65,7 @@ public void SingletonServiceIsRegistered()
[Fact]
public void SingletonInstanceIsResolved()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -91,7 +91,7 @@ public void SingletonInstanceIsResolved()
[Fact]
public void SingletonFactoryIsResolved()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -149,7 +149,7 @@ public void TransientFactoryIsResolved()
[Fact]
public void ScopedServiceIsSupported()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
diff --git a/tests/Prism.Unity.Extensions.Tests/ContainerTests.cs b/tests/Prism.Unity.Extensions.Tests/ContainerTests.cs
index 08cf9e1..8e65834 100644
--- a/tests/Prism.Unity.Extensions.Tests/ContainerTests.cs
+++ b/tests/Prism.Unity.Extensions.Tests/ContainerTests.cs
@@ -24,7 +24,7 @@ public ContainerTests(ITestOutputHelper testOutputHelper) =>
[Fact]
public void StaticInstanceSameAsNewInstance()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -36,7 +36,7 @@ public void StaticInstanceSameAsNewInstance()
[Fact]
public void StaticInstanceSameAsCreateInstance()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -48,7 +48,7 @@ public void StaticInstanceSameAsCreateInstance()
[Fact]
public void CreateCanOnlyBeCalledOnce()
{
- lock(testLock)
+ lock (testLock)
{
var newInstance1 = CreateContainer();
Assert.Same(newInstance1, PrismContainerExtension.Current);
@@ -62,7 +62,7 @@ public void CreateCanOnlyBeCalledOnce()
[Fact]
public void IServiceProviderIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -73,7 +73,7 @@ public void IServiceProviderIsRegistered()
[Fact]
public void IContainerProviderIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -84,7 +84,7 @@ public void IContainerProviderIsRegistered()
[Fact]
public void RegisterManyHasSameTypeAcrossServices()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterMany();
@@ -110,7 +110,7 @@ public void RegisterManyHasSameTypeAcrossServices()
[Fact]
public void RegisterManyHasSameInstanceAcrossServices()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterManySingleton();
@@ -139,7 +139,7 @@ public void RegisterManyHasSameInstanceAcrossServices()
[Fact]
public void RegisterTransientService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.Register();
@@ -176,7 +176,7 @@ public void RegisterTransientNamedService()
[Fact]
public void RegisterSingletonService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterSingleton();
@@ -194,7 +194,7 @@ public void RegisterSingletonService()
[Fact]
public void RegisterInstanceResolveSameInstance()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var foo = new Foo();
@@ -209,7 +209,7 @@ public void RegisterInstanceResolveSameInstance()
[Fact]
public void RegisterInstanceResolveSameNamedInstance()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var foo = new Foo();
@@ -224,7 +224,7 @@ public void RegisterInstanceResolveSameNamedInstance()
[Fact]
public void RegisterSingletonNamedService()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.RegisterSingleton("fooBar");
@@ -247,7 +247,7 @@ public void RegisterSingletonNamedService()
[Fact]
public void FactoryCreatesTransientTypeWithoutContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var message = "expected";
@@ -266,7 +266,7 @@ public void FactoryCreatesTransientTypeWithoutContainerProvider()
[Fact]
public void FactoryCreatesSingletonTypeWithoutContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
var message = "expected";
@@ -378,7 +378,7 @@ public void FactoryCreatesSingletonTypeWithoutContainerProvider()
[Fact]
public void FactoryCreatesTransientTypeWithContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -401,7 +401,7 @@ public void FactoryCreatesTransientTypeWithContainerProvider()
[Fact]
public void FactoryCreatesTransientTypeWithContainerProviderWithGeneric()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -424,7 +424,7 @@ public void FactoryCreatesTransientTypeWithContainerProviderWithGeneric()
[Fact]
public void FactoryCreatesSingletonTypeWithContainerProvider()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -447,7 +447,7 @@ public void FactoryCreatesSingletonTypeWithContainerProvider()
[Fact]
public void FactoryCreatesSingletonTypeWithContainerProviderWithGeneric()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
@@ -470,7 +470,7 @@ public void FactoryCreatesSingletonTypeWithContainerProviderWithGeneric()
[Fact]
public void ResolveWithSpecifiedTypeOverridesRegistration()
{
- lock(testLock)
+ lock (testLock)
{
var c = CreateContainer();
c.Register();
diff --git a/tests/Prism.Unity.Extensions.Tests/MicrosoftExtensionsTests.cs b/tests/Prism.Unity.Extensions.Tests/MicrosoftExtensionsTests.cs
index f513f3e..88923c6 100644
--- a/tests/Prism.Unity.Extensions.Tests/MicrosoftExtensionsTests.cs
+++ b/tests/Prism.Unity.Extensions.Tests/MicrosoftExtensionsTests.cs
@@ -40,7 +40,7 @@ public void TransientServiceIsRegistered()
[Fact]
public void SingletonServiceIsRegistered()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -65,7 +65,7 @@ public void SingletonServiceIsRegistered()
[Fact]
public void SingletonInstanceIsResolved()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
@@ -148,7 +148,7 @@ public void TransientFactoryIsResolved()
[Fact]
public void ScopedServiceIsSupported()
{
- lock(testLock)
+ lock (testLock)
{
PrismContainerExtension.Reset();
GC.Collect();
diff --git a/tests/Shiny.Prism.Tests/Mocks/MockStartup.cs b/tests/Shiny.Prism.Tests/Mocks/MockStartup.cs
index c76438c..a1435d1 100644
--- a/tests/Shiny.Prism.Tests/Mocks/MockStartup.cs
+++ b/tests/Shiny.Prism.Tests/Mocks/MockStartup.cs
@@ -22,7 +22,7 @@ public MockStartup(ITestOutputHelper testOutputHelper, bool setContainer = true)
{
_testOutputHelper = testOutputHelper;
- if(!setContainer)
+ if (!setContainer)
{
RegenerateContainer();
}
@@ -61,7 +61,7 @@ public void Write(string eventName, string description, params (string Key, stri
private void WriteParams((string Key, string Value)[] parameters)
{
- foreach((string Key, string Value) in parameters)
+ foreach ((string Key, string Value) in parameters)
{
_testOutputHelper.WriteLine($"{Key}: {Value}");
}
diff --git a/tests/Shiny.Prism.Tests/Mocks/Modularity/MockModuleStartup.cs b/tests/Shiny.Prism.Tests/Mocks/Modularity/MockModuleStartup.cs
index d3f420a..9773f14 100644
--- a/tests/Shiny.Prism.Tests/Mocks/Modularity/MockModuleStartup.cs
+++ b/tests/Shiny.Prism.Tests/Mocks/Modularity/MockModuleStartup.cs
@@ -8,7 +8,7 @@ namespace Shiny.Prism.Mocks.Modularity
{
public class MockModuleStartup : MockStartup
{
- public MockModuleStartup(ITestOutputHelper testOutputHelper)
+ public MockModuleStartup(ITestOutputHelper testOutputHelper)
: base(testOutputHelper)
{
}