|
|
|
@ -88,6 +88,7 @@ namespace ICSharpCode.Decompiler
@@ -88,6 +88,7 @@ namespace ICSharpCode.Decompiler
|
|
|
|
|
} |
|
|
|
|
if (languageVersion < CSharp.LanguageVersion.CSharp7) { |
|
|
|
|
outVariables = false; |
|
|
|
|
throwExpressions = false; |
|
|
|
|
tupleTypes = false; |
|
|
|
|
tupleConversions = false; |
|
|
|
|
discards = false; |
|
|
|
@ -117,7 +118,7 @@ namespace ICSharpCode.Decompiler
@@ -117,7 +118,7 @@ namespace ICSharpCode.Decompiler
|
|
|
|
|
if (introduceRefModifiersOnStructs || introduceReadonlyAndInModifiers || nonTrailingNamedArguments) |
|
|
|
|
return CSharp.LanguageVersion.CSharp7_2; |
|
|
|
|
// C# 7.1 missing
|
|
|
|
|
if (outVariables || tupleTypes || tupleConversions || discards || localFunctions) |
|
|
|
|
if (outVariables || throwExpressions || tupleTypes || tupleConversions || discards || localFunctions) |
|
|
|
|
return CSharp.LanguageVersion.CSharp7; |
|
|
|
|
if (awaitInCatchFinally || useExpressionBodyForCalculatedGetterOnlyProperties || nullPropagation |
|
|
|
|
|| stringInterpolation || dictionaryInitializers || extensionMethodsInCollectionInitializers) |
|
|
|
@ -856,6 +857,23 @@ namespace ICSharpCode.Decompiler
@@ -856,6 +857,23 @@ namespace ICSharpCode.Decompiler
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool throwExpressions = true; |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Gets/Sets whether throw expressions should be used.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[Category("C# 7.0 / VS 2017")] |
|
|
|
|
[Description("DecompilerSettings.UseThrowExpressions")] |
|
|
|
|
public bool ThrowExpressions { |
|
|
|
|
get { return throwExpressions; } |
|
|
|
|
set { |
|
|
|
|
if (throwExpressions != value) { |
|
|
|
|
throwExpressions = value; |
|
|
|
|
OnPropertyChanged(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool tupleConversions = true; |
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|