Skip to content

Commit

Permalink
Replace literal string in favor of nameof()
Browse files Browse the repository at this point in the history
  • Loading branch information
IvenBach committed May 15, 2019
1 parent 6134c87 commit 93b93c3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Rubberduck.Core/UI/Controls/BindableTextEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ public new string Text
}

public static readonly DependencyProperty TextProperty =
DependencyProperty.Register("Text", typeof(string), typeof(BindableTextEditor), new PropertyMetadata((obj, args) =>
DependencyProperty.Register(nameof(Text), typeof(string), typeof(BindableTextEditor), new PropertyMetadata((obj, args) =>
{
var target = (BindableTextEditor)obj;
target.Text = (string)args.NewValue;
}));

protected override void OnTextChanged(EventArgs e)
{
RaisePropertyChanged("Text");
RaisePropertyChanged(nameof(Text));
base.OnTextChanged(e);
}

Expand Down
4 changes: 2 additions & 2 deletions Rubberduck.Core/UI/Settings/IndenterSettingsViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public IndenterSettingsViewModel(Configuration config, IFilePersistenceService<S
private void IndenterSettingsViewModel_PropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
{
// ReSharper disable once ExplicitCallerInfoArgument
if (e.PropertyName != "PreviewSampleCode")
if (e.PropertyName != nameof(PreviewSampleCode))
{
OnPropertyChanged("PreviewSampleCode");
OnPropertyChanged(nameof(PreviewSampleCode));
}
}

Expand Down

0 comments on commit 93b93c3

Please sign in to comment.