Browse Source

Use CallerMemberNameAttribute in DecompilerSettings.

pull/863/head
Siegfried Pammer 8 years ago
parent
commit
627e4bff68
  1. 47
      ICSharpCode.Decompiler/DecompilerSettings.cs

47
ICSharpCode.Decompiler/DecompilerSettings.cs

@ -18,6 +18,7 @@
using System; using System;
using System.ComponentModel; using System.ComponentModel;
using System.Runtime.CompilerServices;
using ICSharpCode.Decompiler.CSharp.OutputVisitor; using ICSharpCode.Decompiler.CSharp.OutputVisitor;
namespace ICSharpCode.Decompiler namespace ICSharpCode.Decompiler
@ -37,7 +38,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (anonymousMethods != value) { if (anonymousMethods != value) {
anonymousMethods = value; anonymousMethods = value;
OnPropertyChanged("AnonymousMethods"); OnPropertyChanged();
} }
} }
} }
@ -52,7 +53,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (anonymousTypes != value) { if (anonymousTypes != value) {
anonymousTypes = value; anonymousTypes = value;
OnPropertyChanged("AnonymousTypes"); OnPropertyChanged();
} }
} }
} }
@ -67,7 +68,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (expressionTrees != value) { if (expressionTrees != value) {
expressionTrees = value; expressionTrees = value;
OnPropertyChanged("ExpressionTrees"); OnPropertyChanged();
} }
} }
} }
@ -82,7 +83,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (yieldReturn != value) { if (yieldReturn != value) {
yieldReturn = value; yieldReturn = value;
OnPropertyChanged("YieldReturn"); OnPropertyChanged();
} }
} }
} }
@ -97,7 +98,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (asyncAwait != value) { if (asyncAwait != value) {
asyncAwait = value; asyncAwait = value;
OnPropertyChanged("AsyncAwait"); OnPropertyChanged();
} }
} }
} }
@ -112,7 +113,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (automaticProperties != value) { if (automaticProperties != value) {
automaticProperties = value; automaticProperties = value;
OnPropertyChanged("AutomaticProperties"); OnPropertyChanged();
} }
} }
} }
@ -127,7 +128,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (automaticEvents != value) { if (automaticEvents != value) {
automaticEvents = value; automaticEvents = value;
OnPropertyChanged("AutomaticEvents"); OnPropertyChanged();
} }
} }
} }
@ -142,7 +143,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (usingStatement != value) { if (usingStatement != value) {
usingStatement = value; usingStatement = value;
OnPropertyChanged("UsingStatement"); OnPropertyChanged();
} }
} }
} }
@ -157,7 +158,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (forEachStatement != value) { if (forEachStatement != value) {
forEachStatement = value; forEachStatement = value;
OnPropertyChanged("ForEachStatement"); OnPropertyChanged();
} }
} }
} }
@ -172,7 +173,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (lockStatement != value) { if (lockStatement != value) {
lockStatement = value; lockStatement = value;
OnPropertyChanged("LockStatement"); OnPropertyChanged();
} }
} }
} }
@ -184,7 +185,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (switchStatementOnString != value) { if (switchStatementOnString != value) {
switchStatementOnString = value; switchStatementOnString = value;
OnPropertyChanged("SwitchStatementOnString"); OnPropertyChanged();
} }
} }
} }
@ -196,7 +197,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (usingDeclarations != value) { if (usingDeclarations != value) {
usingDeclarations = value; usingDeclarations = value;
OnPropertyChanged("UsingDeclarations"); OnPropertyChanged();
} }
} }
} }
@ -208,7 +209,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (queryExpressions != value) { if (queryExpressions != value) {
queryExpressions = value; queryExpressions = value;
OnPropertyChanged("QueryExpressions"); OnPropertyChanged();
} }
} }
} }
@ -220,7 +221,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (fullyQualifyAmbiguousTypeNames != value) { if (fullyQualifyAmbiguousTypeNames != value) {
fullyQualifyAmbiguousTypeNames = value; fullyQualifyAmbiguousTypeNames = value;
OnPropertyChanged("FullyQualifyAmbiguousTypeNames"); OnPropertyChanged();
} }
} }
} }
@ -235,7 +236,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (useDebugSymbols != value) { if (useDebugSymbols != value) {
useDebugSymbols = value; useDebugSymbols = value;
OnPropertyChanged("UseDebugSymbols"); OnPropertyChanged();
} }
} }
} }
@ -250,7 +251,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (objectCollectionInitializers != value) { if (objectCollectionInitializers != value) {
objectCollectionInitializers = value; objectCollectionInitializers = value;
OnPropertyChanged("ObjectCollectionInitializers"); OnPropertyChanged();
} }
} }
} }
@ -265,7 +266,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (showXmlDocumentation != value) { if (showXmlDocumentation != value) {
showXmlDocumentation = value; showXmlDocumentation = value;
OnPropertyChanged("ShowXmlDocumentation"); OnPropertyChanged();
} }
} }
} }
@ -277,7 +278,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (foldBraces != value) { if (foldBraces != value) {
foldBraces = value; foldBraces = value;
OnPropertyChanged("FoldBraces"); OnPropertyChanged();
} }
} }
} }
@ -293,7 +294,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (introduceIncrementAndDecrement != value) { if (introduceIncrementAndDecrement != value) {
introduceIncrementAndDecrement = value; introduceIncrementAndDecrement = value;
OnPropertyChanged("IntroduceIncrementAndDecrement"); OnPropertyChanged();
} }
} }
} }
@ -308,7 +309,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (makeAssignmentExpressions != value) { if (makeAssignmentExpressions != value) {
makeAssignmentExpressions = value; makeAssignmentExpressions = value;
OnPropertyChanged("MakeAssignmentExpressions"); OnPropertyChanged();
} }
} }
} }
@ -323,7 +324,7 @@ namespace ICSharpCode.Decompiler
set { set {
if (alwaysGenerateExceptionVariableForCatchBlocks != value) { if (alwaysGenerateExceptionVariableForCatchBlocks != value) {
alwaysGenerateExceptionVariableForCatchBlocks = value; alwaysGenerateExceptionVariableForCatchBlocks = value;
OnPropertyChanged("AlwaysGenerateExceptionVariableForCatchBlocks"); OnPropertyChanged();
} }
} }
} }
@ -345,14 +346,14 @@ namespace ICSharpCode.Decompiler
throw new ArgumentNullException(); throw new ArgumentNullException();
if (csharpFormattingOptions != value) { if (csharpFormattingOptions != value) {
csharpFormattingOptions = value; csharpFormattingOptions = value;
OnPropertyChanged("CSharpFormattingOptions"); OnPropertyChanged();
} }
} }
} }
public event PropertyChangedEventHandler PropertyChanged; public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged(string propertyName) protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{ {
if (PropertyChanged != null) { if (PropertyChanged != null) {
PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); PropertyChanged(this, new PropertyChangedEventArgs(propertyName));

Loading…
Cancel
Save