|
|
|
|
@ -44,6 +44,20 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
@@ -44,6 +44,20 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
|
|
|
|
|
|
|
|
|
|
public class QueryExpressions |
|
|
|
|
{ |
|
|
|
|
public class MaybeHolder |
|
|
|
|
{ |
|
|
|
|
public Maybe<int> Value; |
|
|
|
|
|
|
|
|
|
#if CS60
|
|
|
|
|
public Maybe<int> this[int index] => default(Maybe<int>); |
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
public Func<Maybe<int>> Factory() |
|
|
|
|
{ |
|
|
|
|
return () => default(Maybe<int>); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public class HbmParam |
|
|
|
|
{ |
|
|
|
|
public string Name { get; set; } |
|
|
|
|
@ -217,6 +231,21 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
@@ -217,6 +231,21 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
|
|
|
|
|
{ |
|
|
|
|
return arglist?.OrderByDescending((string f) => f.Length).ThenBy((string f) => f.ToLower()).ToList(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Maybe<string>? NullConditionalValueTypeQuery(MaybeHolder holder) |
|
|
|
|
{ |
|
|
|
|
return holder?.Value.Where((int value) => value > 0).Select((int value) => value.ToString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Maybe<string>? NullConditionalNestedInvocationQuery(MaybeHolder holder) |
|
|
|
|
{ |
|
|
|
|
return holder?.Factory()().Where((int value) => value > 0).Select((int value) => value.ToString()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public Maybe<string>? NullConditionalIndexerQuery(MaybeHolder holder) |
|
|
|
|
{ |
|
|
|
|
return holder?[0].Where((int value) => value > 0).Select((int value) => value.ToString()); |
|
|
|
|
} |
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
public static IEnumerable<char> Issue1310a(bool test) |
|
|
|
|
|