Permalink
Browse files

Resharper code cleanup pass of HearthCap

  • Loading branch information...
1 parent 973988e commit 663206d98db7b4fa80224faa10ea3725a1e1b745 @remcoros remcoros committed Aug 29, 2015
Showing 375 changed files with 9,198 additions and 10,495 deletions.
@@ -69,7 +69,12 @@
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=XmlDocumentation/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/IntroduceVariableUseVar/UseVarForIntroduceVariableRefactoring/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/EventHandlerPatternLong/@EntryValue">$object$_On$event$</s:String>
+ <s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=Locals/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb_aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateStaticReadonly/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/UserRules/=042e7460_002D3ec6_002D4f1c_002D87c3_002Dfc91240d4c90/@EntryIndexedValue">&lt;Policy&gt;&lt;Descriptor Staticness="Static, Instance" AccessRightKinds="Public" Description="Test Methods"&gt;&lt;ElementKinds&gt;&lt;Kind Name="TEST_MEMBER" /&gt;&lt;/ElementKinds&gt;&lt;/Descriptor&gt;&lt;Policy Inspect="True" Prefix="" Suffix="" Style="Aa_bb" /&gt;&lt;/Policy&gt;</s:String>
- <s:String x:Key="/Default/CodeStyle/Naming/VBNaming/EventHandlerPatternLong/@EntryValue">$object$_On$event$</s:String></wpf:ResourceDictionary>
+ <s:String x:Key="/Default/CodeStyle/Naming/VBNaming/EventHandlerPatternLong/@EntryValue">$object$_On$event$</s:String>
+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>
+ <s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002EJavaScript_002ECodeStyle_002ESettingsUpgrade_002EJsCodeFormatterSettingsUpgrader/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
- <appSettings>
- <add
- key="updatebaseurl"
- value="http://localhost/HSTracker/install"
- xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
- </appSettings>
+ <appSettings>
+ <add
+ key="updatebaseurl"
+ value="http://localhost/HSTracker/install"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
+ </appSettings>
</configuration>
@@ -1,12 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
+
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform">
<appSettings>
<add
- key="updatebaseurl"
- value="http://hearthstonetracker.com/install"
- xdt:Transform="SetAttributes" xdt:Locator="Match(key)"/>
- <add key="webapi_providers"
- xdt:Transform="Remove"
+ key="updatebaseurl"
+ value="http://hearthstonetracker.com/install"
+ xdt:Transform="SetAttributes" xdt:Locator="Match(key)" />
+ <add key="webapi_providers"
+ xdt:Transform="Remove"
xdt:Locator="Match(key)" />
</appSettings>
</configuration>
View
@@ -1,60 +1,61 @@
<?xml version="1.0" encoding="utf-8"?>
+
<configuration>
- <configSections>
- <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
- </configSections>
- <appSettings>
- <add key="updatebaseurl" value="http://localhost/HSTracker/install" />
- <add key="webapi_providers" value="hearthstonetracker,twitter,valuebot" />
- </appSettings>
- <connectionStrings>
- <add name="db" connectionString="Data source=|DataDirectory|db.sdf;" providerName="System.Data.SqlServerCe.4.0" />
- </connectionStrings>
- <startup>
- <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
- </startup>
- <entityFramework>
- <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
- <parameters>
- <parameter value="System.Data.SqlServerCe.4.0" />
- </parameters>
- </defaultConnectionFactory>
- <!--<contexts>
+ <configSections>
+ <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
+ </configSections>
+ <appSettings>
+ <add key="updatebaseurl" value="http://localhost/HSTracker/install" />
+ <add key="webapi_providers" value="hearthstonetracker,twitter,valuebot" />
+ </appSettings>
+ <connectionStrings>
+ <add name="db" connectionString="Data source=|DataDirectory|db.sdf;" providerName="System.Data.SqlServerCe.4.0" />
+ </connectionStrings>
+ <startup>
+ <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
+ </startup>
+ <entityFramework>
+ <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlCeConnectionFactory, EntityFramework">
+ <parameters>
+ <parameter value="System.Data.SqlServerCe.4.0" />
+ </parameters>
+ </defaultConnectionFactory>
+ <!--<contexts>
<context type="HearthCap.Data.HearthStatsDbContext, HearthCap.Data">
<databaseInitializer type="HearthCap.Data.DbInitializer, HearthCap.Data" />
</context>
</contexts>-->
- <providers>
- <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
- <provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
- </providers>
- </entityFramework>
- <runtime>
- <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
- <dependentAssembly>
- <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="RestSharp" />
- <bindingRedirect oldVersion="0.0.0.0-104.4.0.0" newVersion="104.4.0.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Caliburn.Micro" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
- </dependentAssembly>
- <dependentAssembly>
- <assemblyIdentity name="Caliburn.Micro.Platform" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
- <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
- </dependentAssembly>
- </assemblyBinding>
- </runtime>
- <system.data>
- <DbProviderFactories>
- <remove invariant="System.Data.SqlServerCe.4.0" />
- <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
- </DbProviderFactories>
- </system.data>
+ <providers>
+ <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+ <provider invariantName="System.Data.SqlServerCe.4.0" type="System.Data.Entity.SqlServerCompact.SqlCeProviderServices, EntityFramework.SqlServerCompact" />
+ </providers>
+ </entityFramework>
+ <runtime>
+ <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+ <dependentAssembly>
+ <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-7.0.0.0" newVersion="7.0.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="RestSharp" />
+ <bindingRedirect oldVersion="0.0.0.0-104.4.0.0" newVersion="104.4.0.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Caliburn.Micro" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
+ </dependentAssembly>
+ <dependentAssembly>
+ <assemblyIdentity name="Caliburn.Micro.Platform" publicKeyToken="8e5891231f2ed21f" culture="neutral" />
+ <bindingRedirect oldVersion="0.0.0.0-2.0.2.0" newVersion="2.0.2.0" />
+ </dependentAssembly>
+ </assemblyBinding>
+ </runtime>
+ <system.data>
+ <DbProviderFactories>
+ <remove invariant="System.Data.SqlServerCe.4.0" />
+ <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
+ </DbProviderFactories>
+ </system.data>
</configuration>
View
@@ -12,11 +12,11 @@
<ResourceDictionary Source="/MahApps.Metro;component/Styles/Colors.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Blue.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseLight.xaml" />
- <ResourceDictionary Source="/Resources/Theme.xaml"></ResourceDictionary>
+ <ResourceDictionary Source="/Resources/Theme.xaml" />
<ResourceDictionary>
<startUp:AppBootstrapper x:Key="bootstrapper" />
</ResourceDictionary>
- </ResourceDictionary.MergedDictionaries>
+ </ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
-</Application>
+</Application>
View
@@ -1,22 +1,17 @@
-namespace HearthCap
-{
- using System;
- using System.Globalization;
- using System.Linq;
- using System.Threading;
- using System.Windows;
- using System.Windows.Markup;
-
- using Hardcodet.Wpf.TaskbarNotification;
-
- using HearthCap.UI.Controls;
+using System;
+using System.Linq;
+using System.Threading;
+using System.Windows;
+using HearthCap.UI.Controls;
+namespace HearthCap
+{
/// <summary>
- /// Interaction logic for App.xaml
+ /// Interaction logic for App.xaml
/// </summary>
public partial class App : Application
{
- private static Mutex mutex = null;
+ private static Mutex mutex;
public App()
{
@@ -38,7 +33,7 @@ public App()
}
}
- bool isLogon = args.Any(x => x.Contains("-logon"));
+ var isLogon = args.Any(x => x.Contains("-logon"));
if (!isLogon)
{
var splash = new DelayedSplashScreen("Resources/logo1.png");
@@ -52,9 +47,9 @@ protected override void OnStartup(StartupEventArgs e)
}
/// <summary>
- /// Raises the <see cref="E:System.Windows.Application.Exit"/> event.
+ /// Raises the <see cref="E:System.Windows.Application.Exit" /> event.
/// </summary>
- /// <param name="e">An <see cref="T:System.Windows.ExitEventArgs"/> that contains the event data.</param>
+ /// <param name="e">An <see cref="T:System.Windows.ExitEventArgs" /> that contains the event data.</param>
protected override void OnExit(ExitEventArgs e)
{
if (mutex != null)
@@ -1,11 +1,11 @@
-namespace HearthCap.Composition
-{
- using System;
+using System;
+namespace HearthCap.Composition
+{
public interface IServiceLocator
{
T GetInstance<T>(string key = null) where T : class;
-
+
object GetInstance(Type type, string key = null);
}
-}
+}
@@ -1,10 +1,10 @@
-namespace HearthCap.Composition
-{
- using System;
- using System.ComponentModel.Composition;
- using System.ComponentModel.Composition.Hosting;
- using System.Linq;
+using System;
+using System.ComponentModel.Composition;
+using System.ComponentModel.Composition.Hosting;
+using System.Linq;
+namespace HearthCap.Composition
+{
[Export(typeof(IServiceLocator))]
public class MefServiceLocator : IServiceLocator
{
@@ -24,7 +24,7 @@ public MefServiceLocator(CompositionContainer compositionContainer)
public object GetInstance(Type type, string key = null)
{
var str = String.IsNullOrEmpty(key) ? AttributedModelServices.GetContractName(type) : key;
- var obj = this.compositionContainer.GetExportedValues<object>(str).FirstOrDefault<object>();
+ var obj = compositionContainer.GetExportedValues<object>(str).FirstOrDefault();
if (obj == null)
{
throw new InvalidOperationException("Could not locate any exported values for '{0}'.");
@@ -33,4 +33,4 @@ public object GetInstance(Type type, string key = null)
return obj;
}
}
-}
+}
@@ -9,7 +9,7 @@
d:DataContext="{d:DesignInstance Type=about:AboutCommandBarViewModel, IsDesignTimeCreatable=False}"
cal:Bind.AtDesignTime="False">
<UserControl.Resources>
- <ResourceDictionary Source="/Resources/Icons.xaml"></ResourceDictionary>
+ <ResourceDictionary Source="/Resources/Icons.xaml" />
</UserControl.Resources>
<Button cal:Message.Attach="ToggleAbout"
Cursor="Hand">
@@ -25,7 +25,9 @@
<TextBlock Foreground="White"
FontSize="16"
Margin="4 0 0 0"
- FontWeight="SemiBold">About</TextBlock>
+ FontWeight="SemiBold">
+ About
+ </TextBlock>
</StackPanel>
</Button>
</UserControl>
@@ -1,14 +1,11 @@
-namespace HearthCap.Features.About
-{
- using System.ComponentModel.Composition;
-
- using Caliburn.Micro;
-
- using HearthCap.Shell.Commands;
- using HearthCap.Shell.Dialogs;
- using HearthCap.Shell.Flyouts;
- using HearthCap.Shell.WindowCommands;
+using System.ComponentModel.Composition;
+using Caliburn.Micro;
+using HearthCap.Shell.Dialogs;
+using HearthCap.Shell.Flyouts;
+using HearthCap.Shell.WindowCommands;
+namespace HearthCap.Features.About
+{
[Export(typeof(IWindowCommand))]
public class AboutCommandBarViewModel : WindowCommandViewModel
{
@@ -30,4 +27,4 @@ public void ToggleAbout()
eventAggregator.PublishOnBackgroundThread(new ToggleFlyoutCommand("about"));
}
}
-}
+}
Oops, something went wrong.

0 comments on commit 663206d

Please sign in to comment.