Skip to content

Commit

Permalink
Running code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-englert committed May 19, 2018
1 parent c007552 commit 6711249
Show file tree
Hide file tree
Showing 21 changed files with 32 additions and 71 deletions.
4 changes: 0 additions & 4 deletions ResXManager.Infrastructure/ICredentialItem.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
namespace tomenglertde.ResXManager.Infrastructure
{
using System;
using System.ComponentModel;
using System.Diagnostics.Contracts;

using JetBrains.Annotations;

using PropertyChanged;

public interface ICredentialItem : INotifyPropertyChanged
{
[NotNull]
Expand Down
23 changes: 0 additions & 23 deletions ResXManager.Infrastructure/ITracer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@

using TomsToolbox.Desktop.Composition;

[ContractClass(typeof(TracerContract))]
public interface ITracer
{
void TraceError([Localizable(false)][NotNull] string value);
Expand All @@ -23,28 +22,6 @@ public interface ITracer
void WriteLine([Localizable(false)][NotNull] string value);
}

[ContractClassFor(typeof(ITracer))]
internal abstract class TracerContract : ITracer
{
void ITracer.TraceError(string value)
{
Contract.Requires(value != null);
throw new System.NotImplementedException();
}

void ITracer.TraceWarning(string value)
{
Contract.Requires(value != null);
throw new System.NotImplementedException();
}

void ITracer.WriteLine(string value)
{
Contract.Requires(value != null);
throw new System.NotImplementedException();
}
}

public static class TracerExtensions
{
public static void TraceError([NotNull] this ITracer tracer, [Localizable(false)][NotNull] string format, [NotNull][ItemNotNull] params object[] args)
Expand Down
6 changes: 3 additions & 3 deletions ResXManager.Model/CodeReferenceTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -373,14 +373,14 @@ internal CodeReference([NotNull] ProjectFile projectFile, int lineNumber, [NotNu
LineSegments = lineSegments;
}

public int LineNumber { get; private set; }
public int LineNumber { get; }

[CanBeNull]
public ProjectFile ProjectFile { get; private set; }
public ProjectFile ProjectFile { get; }

[ItemNotNull]
[CanBeNull]
public IList<string> LineSegments { get; private set; }
public IList<string> LineSegments { get; }
}

internal static class CodeReferenceExtensionMethods
Expand Down
2 changes: 1 addition & 1 deletion ResXManager.Model/ExcelExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Linq;
using System.Text;

using DocumentFormat.OpenXml;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
Expand Down
8 changes: 4 additions & 4 deletions ResXManager.VSIX/FodyWeavers.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Weavers>
<AutoProperties/>
<Throttle/>
<PropertyChanged/>
<LoadAssembliesOnStartup IncludeAssemblies="System.Windows.Interactivity|Microsoft.Expression.Interactions|DataGridExtensions"/>
<AutoProperties />
<Throttle />
<PropertyChanged />
<LoadAssembliesOnStartup IncludeAssemblies="System.Windows.Interactivity|Microsoft.Expression.Interactions|DataGridExtensions" />
</Weavers>
4 changes: 2 additions & 2 deletions ResXManager.VSIX/ItemKind.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.VSIX
{
using JetBrains.Annotations;

using Microsoft.VisualStudio;

internal static class ItemKind
Expand Down
1 change: 0 additions & 1 deletion ResXManager.VSIX/MyToolWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Documents;
using System.Windows.Threading;

using JetBrains.Annotations;

Expand Down
1 change: 0 additions & 1 deletion ResXManager.VSIX/OutputWindowTracer.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
namespace tomenglertde.ResXManager.VSIX
{
using System;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
Expand Down
4 changes: 2 additions & 2 deletions ResXManager.VSIX/Visuals/ShowErrorsConfigurationView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
<TextBlock Text="{x:Static properties:Resources.ShowErrorsConfiguration_ShowAs}" DockPanel.Dock="Left" VerticalAlignment="Center" />
<Decorator Width="8" DockPanel.Dock="Left" />
<ComboBox ItemsSource="{Binding Source={x:Type shell:TaskErrorCategory}, Converter={x:Static toms:EnumToValuesConverter.Default}}"
SelectedItem="{Binding Configuration.TaskErrorCategory}"
Width="200" HorizontalAlignment="Left"/>
SelectedItem="{Binding Configuration.TaskErrorCategory}"
Width="200" HorizontalAlignment="Left" />
</DockPanel>
</StackPanel>
</UserControl>
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace tomenglertde.ResXManager.VSIX.Visuals
{
using System.ComponentModel;
using System.ComponentModel.Composition;

using JetBrains.Annotations;
Expand Down
4 changes: 0 additions & 4 deletions ResXManager.VSIX/Visuals/VsixShellView.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
namespace tomenglertde.ResXManager.VSIX.Visuals
{
using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.ComponentModel.Composition.Hosting;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Windows;
using System.Windows.Media;

Expand Down
6 changes: 3 additions & 3 deletions ResXManager.View/Appearance.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View
namespace tomenglertde.ResXManager.View
{
using System.Windows;

using JetBrains.Annotations;

public static class Appearance
{
[CanBeNull]
Expand Down
6 changes: 3 additions & 3 deletions ResXManager.View/ColumnHeaders/ColumnHeader.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View.ColumnHeaders
namespace tomenglertde.ResXManager.View.ColumnHeaders
{
using System.Windows.Controls;

using JetBrains.Annotations;

public class ColumnHeader : ContentControl, IColumnHeader
{
public ColumnHeader([CanBeNull] object content, ColumnType columnType)
Expand Down
6 changes: 3 additions & 3 deletions ResXManager.View/Converters/CultureToXmlLanguageConverter.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View.Converters
namespace tomenglertde.ResXManager.View.Converters
{
using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Markup;

using JetBrains.Annotations;

public class CultureToXmlLanguageConverter : IValueConverter
{
[NotNull]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View.Converters
namespace tomenglertde.ResXManager.View.Converters
{
using System;
using System.Collections.Generic;
Expand All @@ -9,6 +7,8 @@ namespace tomenglertde.ResXManager.View.Converters
using System.Windows.Controls;
using System.Windows.Data;

using JetBrains.Annotations;

using tomenglertde.ResXManager.View.Tools;

public sealed class IsCellSelectionInvariantConverter : IValueConverter
Expand Down
6 changes: 3 additions & 3 deletions ResXManager.View/Converters/LanguageColumnFilterConverter.cs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View.Converters
namespace tomenglertde.ResXManager.View.Converters
{
using System;
using System.Globalization;
using System.Windows.Controls;
using System.Windows.Data;

using JetBrains.Annotations;

using tomenglertde.ResXManager.View.ColumnHeaders;

public class LanguageColumnFilterConverter : IValueConverter
Expand Down
6 changes: 3 additions & 3 deletions ResXManager.View/Themes/ResourceKeys.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
using JetBrains.Annotations;

namespace tomenglertde.ResXManager.View.Themes
namespace tomenglertde.ResXManager.View.Themes
{
using System.Windows;

using JetBrains.Annotations;

public static class ResourceKeys
{
/// <summary>
Expand Down
2 changes: 0 additions & 2 deletions ResXManager.View/Tools/CultureOverrideEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
namespace tomenglertde.ResXManager.View.Tools
{
using System;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Globalization;

Expand Down
4 changes: 2 additions & 2 deletions ResXManager.View/Visuals/ResourceView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
</UserControl.Resources>

<UserControl.InputBindings>
<KeyBinding Key="N" Modifiers="Control" Command="{toms:Import tools:AddNewKeyCommand}" CommandParameter="{Binding ElementName=LayoutRoot}"/>
<KeyBinding Key="Insert" Modifiers="Shift" Command="{toms:Import tools:AddNewKeyCommand}" CommandParameter="{Binding ElementName=LayoutRoot}"/>
<KeyBinding Key="N" Modifiers="Control" Command="{toms:Import tools:AddNewKeyCommand}" CommandParameter="{Binding ElementName=LayoutRoot}" />
<KeyBinding Key="Insert" Modifiers="Shift" Command="{toms:Import tools:AddNewKeyCommand}" CommandParameter="{Binding ElementName=LayoutRoot}" />
</UserControl.InputBindings>

<Grid FocusManager.FocusedElement="{Binding ElementName=DataGrid}">
Expand Down
1 change: 0 additions & 1 deletion ResXManager.View/Visuals/ResourceView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
using tomenglertde.ResXManager.Model;
using tomenglertde.ResXManager.View.Tools;

using TomsToolbox.Desktop.Composition;
using TomsToolbox.Wpf;
using TomsToolbox.Wpf.Composition;
using TomsToolbox.Wpf.Converters;
Expand Down
2 changes: 0 additions & 2 deletions ResXManager.View/Visuals/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
{
using System.Collections.Specialized;
using System.ComponentModel.Composition;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Diagnostics.Contracts;
using System.Windows.Threading;

Expand Down

0 comments on commit 6711249

Please sign in to comment.