提交 2cb33c4f 编写于 作者: C CyrusNajmabadi

Merge remote-tracking branch 'upstream/master' into lightBulbAsyncGetSelection

......@@ -23,9 +23,6 @@ function Exec-Block([scriptblock]$cmd) {
# - $?: did the powershell script block throw an error
# - $lastexitcode: did a windows command executed by the script block end in error
if ((-not $?) -or ($lastexitcode -ne 0)) {
if (-not $echo) {
Write-Host $output
}
throw "Command failed to execute: $cmd"
}
}
......
......@@ -298,30 +298,15 @@ private BoundBlock VisitAwaitExpression(BoundAwaitExpression node, BoundExpressi
WellKnownMemberNames.GetResult,
resultsDiscarded: resultPlace == null);
var nullAwaiter = F.AssignmentExpression(F.Local(awaiterTemp), F.NullOrDefault(awaiterTemp.Type));
if (resultPlace != null && type.SpecialType != SpecialType.System_Void)
{
// $resultTemp = $awaiterTemp.GetResult();
// $awaiterTemp = null;
// $resultTemp
LocalSymbol resultTemp = F.SynthesizedLocal(type);
return F.Block(
ImmutableArray.Create(awaiterTemp, resultTemp),
awaitIfIncomplete,
F.Assignment(F.Local(resultTemp), getResultCall),
F.ExpressionStatement(nullAwaiter),
F.Assignment(resultPlace, F.Local(resultTemp)));
}
else
{
// $awaiterTemp.GetResult();
// $awaiterTemp = null;
return F.Block(
ImmutableArray.Create(awaiterTemp),
awaitIfIncomplete,
F.ExpressionStatement(getResultCall),
F.ExpressionStatement(nullAwaiter));
}
// [$resultPlace = ] $awaiterTemp.GetResult();
BoundStatement getResultStatement = resultPlace != null && type.SpecialType != SpecialType.System_Void ?
F.Assignment(resultPlace, getResultCall):
F.ExpressionStatement(getResultCall);
return F.Block(
ImmutableArray.Create(awaiterTemp),
awaitIfIncomplete,
getResultStatement);
}
private BoundExpression MakeCallMaybeDynamic(
......
......@@ -599,7 +599,7 @@ public static async Task<int> F(int[] array)
v.VerifyIL("Test.<F>d__2.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", @"
{
// Code size 300 (0x12c)
// Code size 290 (0x122)
.maxstack 5
.locals init (int V_0,
int V_1,
......@@ -671,7 +671,7 @@ .maxstack 5
IL_007f: ldloca.s V_5
IL_0081: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, Test.<F>d__2>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref Test.<F>d__2)""
IL_0086: nop
IL_0087: leave IL_012b
IL_0087: leave IL_0121
>IL_008c: ldarg.0
IL_008d: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_0092: stloc.s V_4
......@@ -683,64 +683,60 @@ .maxstack 5
IL_00a2: dup
IL_00a3: stloc.0
IL_00a4: stfld ""int Test.<F>d__2.<>1__state""
IL_00a9: ldloca.s V_4
IL_00ab: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_00b0: stloc.3
IL_00b1: ldloca.s V_4
IL_00b3: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_00b9: ldarg.0
IL_00ba: ldloc.3
IL_00bb: stfld ""int Test.<F>d__2.<>s__3""
IL_00c0: ldarg.0
IL_00c1: ldarg.0
IL_00c2: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_00c7: ldc.i4.3
IL_00c8: ldarg.0
IL_00c9: ldfld ""int Test.<F>d__2.<>s__2""
IL_00ce: ldarg.0
IL_00cf: ldfld ""int Test.<F>d__2.<>s__3""
IL_00d4: add
IL_00d5: dup
IL_00d6: stloc.3
IL_00d7: stelem.i4
IL_00d8: ldloc.3
IL_00d9: stfld ""int Test.<F>d__2.<>s__4""
IL_00de: ldarg.0
IL_00df: ldfld ""int Test.<F>d__2.<>s__1""
IL_00e4: ldarg.0
IL_00e5: ldfld ""int Test.<F>d__2.<>s__4""
IL_00ea: ldc.i4.4
IL_00eb: call ""int Test.H(int, int, int)""
IL_00f0: pop
IL_00f1: ldarg.0
IL_00f2: ldnull
IL_00f3: stfld ""int[] Test.<F>d__2.<>s__5""
-IL_00f8: ldc.i4.1
IL_00f9: stloc.1
IL_00fa: leave.s IL_0116
IL_00a9: ldarg.0
IL_00aa: ldloca.s V_4
IL_00ac: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_00b1: stfld ""int Test.<F>d__2.<>s__3""
IL_00b6: ldarg.0
IL_00b7: ldarg.0
IL_00b8: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_00bd: ldc.i4.3
IL_00be: ldarg.0
IL_00bf: ldfld ""int Test.<F>d__2.<>s__2""
IL_00c4: ldarg.0
IL_00c5: ldfld ""int Test.<F>d__2.<>s__3""
IL_00ca: add
IL_00cb: dup
IL_00cc: stloc.3
IL_00cd: stelem.i4
IL_00ce: ldloc.3
IL_00cf: stfld ""int Test.<F>d__2.<>s__4""
IL_00d4: ldarg.0
IL_00d5: ldfld ""int Test.<F>d__2.<>s__1""
IL_00da: ldarg.0
IL_00db: ldfld ""int Test.<F>d__2.<>s__4""
IL_00e0: ldc.i4.4
IL_00e1: call ""int Test.H(int, int, int)""
IL_00e6: pop
IL_00e7: ldarg.0
IL_00e8: ldnull
IL_00e9: stfld ""int[] Test.<F>d__2.<>s__5""
-IL_00ee: ldc.i4.1
IL_00ef: stloc.1
IL_00f0: leave.s IL_010c
}
catch System.Exception
{
~IL_00fc: stloc.s V_6
IL_00fe: ldarg.0
IL_00ff: ldc.i4.s -2
IL_0101: stfld ""int Test.<F>d__2.<>1__state""
IL_0106: ldarg.0
IL_0107: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_010c: ldloc.s V_6
IL_010e: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_0113: nop
IL_0114: leave.s IL_012b
~IL_00f2: stloc.s V_6
IL_00f4: ldarg.0
IL_00f5: ldc.i4.s -2
IL_00f7: stfld ""int Test.<F>d__2.<>1__state""
IL_00fc: ldarg.0
IL_00fd: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0102: ldloc.s V_6
IL_0104: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_0109: nop
IL_010a: leave.s IL_0121
}
-IL_0116: ldarg.0
IL_0117: ldc.i4.s -2
IL_0119: stfld ""int Test.<F>d__2.<>1__state""
~IL_011e: ldarg.0
IL_011f: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0124: ldloc.1
IL_0125: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_012a: nop
IL_012b: ret
-IL_010c: ldarg.0
IL_010d: ldc.i4.s -2
IL_010f: stfld ""int Test.<F>d__2.<>1__state""
~IL_0114: ldarg.0
IL_0115: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_011a: ldloc.1
IL_011b: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_0120: nop
IL_0121: ret
}", sequencePoints: "Test+<F>d__2.MoveNext");
}
......
......@@ -2090,7 +2090,7 @@ public static async Task<T> Test<T>(T a)
verifier.VerifyDiagnostics();
verifier.VerifyIL("C.<Test>d__1<T>.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 191 (0xbf)
// Code size 183 (0xb7)
.maxstack 3
.locals init (int V_0,
T V_1,
......@@ -2132,7 +2132,7 @@ .maxstack 3
IL_004e: ldloca.s V_2
IL_0050: ldarg.0
IL_0051: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, C.<Test>d__1<T>>(ref System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, ref C.<Test>d__1<T>)""
IL_0056: leave.s IL_00be
IL_0056: leave.s IL_00b6
IL_0058: ldarg.0
IL_0059: ldfld ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter C.<Test>d__1<T>.<>u__1""
IL_005e: stloc.2
......@@ -2146,34 +2146,32 @@ .maxstack 3
IL_006f: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0074: ldloca.s V_2
IL_0076: call ""void System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.GetResult()""
IL_007b: ldloca.s V_2
IL_007d: initobj ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter""
IL_0083: ldarg.0
IL_0084: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0089: ldfld ""T System.ValueTuple<T, T>.Item1""
IL_008e: stloc.1
IL_008f: leave.s IL_00aa
IL_007b: ldarg.0
IL_007c: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0081: ldfld ""T System.ValueTuple<T, T>.Item1""
IL_0086: stloc.1
IL_0087: leave.s IL_00a2
}
catch System.Exception
{
IL_0091: stloc.s V_4
IL_0089: stloc.s V_4
IL_008b: ldarg.0
IL_008c: ldc.i4.s -2
IL_008e: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0093: ldarg.0
IL_0094: ldc.i4.s -2
IL_0096: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_009b: ldarg.0
IL_009c: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00a1: ldloc.s V_4
IL_00a3: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_00a8: leave.s IL_00be
IL_0094: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_0099: ldloc.s V_4
IL_009b: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_00a0: leave.s IL_00b6
}
IL_00a2: ldarg.0
IL_00a3: ldc.i4.s -2
IL_00a5: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00aa: ldarg.0
IL_00ab: ldc.i4.s -2
IL_00ad: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00b2: ldarg.0
IL_00b3: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00b8: ldloc.1
IL_00b9: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00be: ret
IL_00ab: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00b0: ldloc.1
IL_00b1: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00b6: ret
}
");
}
......@@ -2206,7 +2204,7 @@ public static async Task<string> Test<T>(T a)
verifier.VerifyDiagnostics();
verifier.VerifyIL("C.<Test>d__1<T>.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 197 (0xc5)
// Code size 189 (0xbd)
.maxstack 3
.locals init (int V_0,
string V_1,
......@@ -2248,7 +2246,7 @@ .maxstack 3
IL_004e: ldloca.s V_2
IL_0050: ldarg.0
IL_0051: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, C.<Test>d__1<T>>(ref System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, ref C.<Test>d__1<T>)""
IL_0056: leave.s IL_00c4
IL_0056: leave.s IL_00bc
IL_0058: ldarg.0
IL_0059: ldfld ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter C.<Test>d__1<T>.<>u__1""
IL_005e: stloc.2
......@@ -2262,35 +2260,33 @@ .maxstack 3
IL_006f: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0074: ldloca.s V_2
IL_0076: call ""void System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.GetResult()""
IL_007b: ldloca.s V_2
IL_007d: initobj ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter""
IL_0083: ldarg.0
IL_0084: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0089: constrained. ""System.ValueTuple<T, T>""
IL_008f: callvirt ""string object.ToString()""
IL_0094: stloc.1
IL_0095: leave.s IL_00b0
IL_007b: ldarg.0
IL_007c: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0081: constrained. ""System.ValueTuple<T, T>""
IL_0087: callvirt ""string object.ToString()""
IL_008c: stloc.1
IL_008d: leave.s IL_00a8
}
catch System.Exception
{
IL_0097: stloc.s V_4
IL_008f: stloc.s V_4
IL_0091: ldarg.0
IL_0092: ldc.i4.s -2
IL_0094: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0099: ldarg.0
IL_009a: ldc.i4.s -2
IL_009c: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00a1: ldarg.0
IL_00a2: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string> C.<Test>d__1<T>.<>t__builder""
IL_00a7: ldloc.s V_4
IL_00a9: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.SetException(System.Exception)""
IL_00ae: leave.s IL_00c4
IL_009a: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string> C.<Test>d__1<T>.<>t__builder""
IL_009f: ldloc.s V_4
IL_00a1: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.SetException(System.Exception)""
IL_00a6: leave.s IL_00bc
}
IL_00a8: ldarg.0
IL_00a9: ldc.i4.s -2
IL_00ab: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00b0: ldarg.0
IL_00b1: ldc.i4.s -2
IL_00b3: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00b8: ldarg.0
IL_00b9: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string> C.<Test>d__1<T>.<>t__builder""
IL_00be: ldloc.1
IL_00bf: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.SetResult(string)""
IL_00c4: ret
IL_00b1: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string> C.<Test>d__1<T>.<>t__builder""
IL_00b6: ldloc.1
IL_00b7: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<string>.SetResult(string)""
IL_00bc: ret
}
");
}
......@@ -2349,7 +2345,7 @@ public U Test<U>(U val)
verifier.VerifyDiagnostics();
verifier.VerifyIL("C.<Test>d__1<T>.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 197 (0xc5)
// Code size 189 (0xbd)
.maxstack 3
.locals init (int V_0,
T V_1,
......@@ -2391,7 +2387,7 @@ .maxstack 3
IL_004e: ldloca.s V_2
IL_0050: ldarg.0
IL_0051: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, C.<Test>d__1<T>>(ref System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, ref C.<Test>d__1<T>)""
IL_0056: leave.s IL_00c4
IL_0056: leave.s IL_00bc
IL_0058: ldarg.0
IL_0059: ldfld ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter C.<Test>d__1<T>.<>u__1""
IL_005e: stloc.2
......@@ -2405,36 +2401,34 @@ .maxstack 3
IL_006f: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0074: ldloca.s V_2
IL_0076: call ""void System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.GetResult()""
IL_007b: ldloca.s V_2
IL_007d: initobj ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter""
IL_0083: ldarg.0
IL_0084: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0089: ldarg.0
IL_008a: ldfld ""T C.<Test>d__1<T>.a""
IL_008f: call ""T System.ValueTuple<T, T>.Test<T>(T)""
IL_0094: stloc.1
IL_0095: leave.s IL_00b0
IL_007b: ldarg.0
IL_007c: ldflda ""(T f1, T f2) C.<Test>d__1<T>.<x>5__1""
IL_0081: ldarg.0
IL_0082: ldfld ""T C.<Test>d__1<T>.a""
IL_0087: call ""T System.ValueTuple<T, T>.Test<T>(T)""
IL_008c: stloc.1
IL_008d: leave.s IL_00a8
}
catch System.Exception
{
IL_0097: stloc.s V_4
IL_008f: stloc.s V_4
IL_0091: ldarg.0
IL_0092: ldc.i4.s -2
IL_0094: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0099: ldarg.0
IL_009a: ldc.i4.s -2
IL_009c: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00a1: ldarg.0
IL_00a2: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00a7: ldloc.s V_4
IL_00a9: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_00ae: leave.s IL_00c4
IL_009a: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_009f: ldloc.s V_4
IL_00a1: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_00a6: leave.s IL_00bc
}
IL_00a8: ldarg.0
IL_00a9: ldc.i4.s -2
IL_00ab: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00b0: ldarg.0
IL_00b1: ldc.i4.s -2
IL_00b3: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00b8: ldarg.0
IL_00b9: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00be: ldloc.1
IL_00bf: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00c4: ret
IL_00b1: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00b6: ldloc.1
IL_00b7: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00bc: ret
}
");
}
......@@ -2493,7 +2487,7 @@ public U Test<U>(U val)
verifier.VerifyDiagnostics();
verifier.VerifyIL("C.<Test>d__1<T>.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 187 (0xbb)
// Code size 179 (0xb3)
.maxstack 3
.locals init (int V_0,
T V_1,
......@@ -2533,7 +2527,7 @@ .maxstack 3
IL_0044: ldloca.s V_2
IL_0046: ldarg.0
IL_0047: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, C.<Test>d__1<T>>(ref System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, ref C.<Test>d__1<T>)""
IL_004c: leave.s IL_00ba
IL_004c: leave.s IL_00b2
IL_004e: ldarg.0
IL_004f: ldfld ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter C.<Test>d__1<T>.<>u__1""
IL_0054: stloc.2
......@@ -2547,36 +2541,34 @@ .maxstack 3
IL_0065: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_006a: ldloca.s V_2
IL_006c: call ""void System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.GetResult()""
IL_0071: ldloca.s V_2
IL_0073: initobj ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter""
IL_0079: ldarg.0
IL_007a: ldflda ""(int f1, int f2) C.<Test>d__1<T>.<x>5__1""
IL_007f: ldarg.0
IL_0080: ldfld ""T C.<Test>d__1<T>.a""
IL_0085: call ""T System.ValueTuple<int, int>.Test<T>(T)""
IL_008a: stloc.1
IL_008b: leave.s IL_00a6
IL_0071: ldarg.0
IL_0072: ldflda ""(int f1, int f2) C.<Test>d__1<T>.<x>5__1""
IL_0077: ldarg.0
IL_0078: ldfld ""T C.<Test>d__1<T>.a""
IL_007d: call ""T System.ValueTuple<int, int>.Test<T>(T)""
IL_0082: stloc.1
IL_0083: leave.s IL_009e
}
catch System.Exception
{
IL_008d: stloc.s V_4
IL_0085: stloc.s V_4
IL_0087: ldarg.0
IL_0088: ldc.i4.s -2
IL_008a: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_008f: ldarg.0
IL_0090: ldc.i4.s -2
IL_0092: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_0097: ldarg.0
IL_0098: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_009d: ldloc.s V_4
IL_009f: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_00a4: leave.s IL_00ba
IL_0090: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_0095: ldloc.s V_4
IL_0097: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetException(System.Exception)""
IL_009c: leave.s IL_00b2
}
IL_009e: ldarg.0
IL_009f: ldc.i4.s -2
IL_00a1: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00a6: ldarg.0
IL_00a7: ldc.i4.s -2
IL_00a9: stfld ""int C.<Test>d__1<T>.<>1__state""
IL_00ae: ldarg.0
IL_00af: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00b4: ldloc.1
IL_00b5: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00ba: ret
IL_00a7: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T> C.<Test>d__1<T>.<>t__builder""
IL_00ac: ldloc.1
IL_00ad: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<T>.SetResult(T)""
IL_00b2: ret
}
");
}
......@@ -19264,7 +19256,7 @@ static async Task<long> Test()
// NOTE: !!! There should be an IL local for " (byte x, int y) v2 " , it should not be captured
verifier.VerifyIL("C.<Test>d__1.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 201 (0xc9)
// Code size 193 (0xc1)
.maxstack 3
.locals init (int V_0,
long V_1,
......@@ -19311,7 +19303,7 @@ .maxstack 3
IL_0058: ldloca.s V_3
IL_005a: ldarg.0
IL_005b: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, C.<Test>d__1>(ref System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter, ref C.<Test>d__1)""
IL_0060: leave.s IL_00c8
IL_0060: leave.s IL_00c0
IL_0062: ldarg.0
IL_0063: ldfld ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter C.<Test>d__1.<>u__1""
IL_0068: stloc.3
......@@ -19325,34 +19317,32 @@ .maxstack 3
IL_0079: stfld ""int C.<Test>d__1.<>1__state""
IL_007e: ldloca.s V_3
IL_0080: call ""void System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter.GetResult()""
IL_0085: ldloca.s V_3
IL_0087: initobj ""System.Runtime.CompilerServices.YieldAwaitable.YieldAwaiter""
IL_008d: ldarg.0
IL_008e: ldflda ""(long a, int b) C.<Test>d__1.<v1>5__1""
IL_0093: ldfld ""long System.ValueTuple<long, int>.Item1""
IL_0098: stloc.1
IL_0099: leave.s IL_00b4
IL_0085: ldarg.0
IL_0086: ldflda ""(long a, int b) C.<Test>d__1.<v1>5__1""
IL_008b: ldfld ""long System.ValueTuple<long, int>.Item1""
IL_0090: stloc.1
IL_0091: leave.s IL_00ac
}
catch System.Exception
{
IL_009b: stloc.s V_5
IL_0093: stloc.s V_5
IL_0095: ldarg.0
IL_0096: ldc.i4.s -2
IL_0098: stfld ""int C.<Test>d__1.<>1__state""
IL_009d: ldarg.0
IL_009e: ldc.i4.s -2
IL_00a0: stfld ""int C.<Test>d__1.<>1__state""
IL_00a5: ldarg.0
IL_00a6: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long> C.<Test>d__1.<>t__builder""
IL_00ab: ldloc.s V_5
IL_00ad: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long>.SetException(System.Exception)""
IL_00b2: leave.s IL_00c8
IL_009e: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long> C.<Test>d__1.<>t__builder""
IL_00a3: ldloc.s V_5
IL_00a5: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long>.SetException(System.Exception)""
IL_00aa: leave.s IL_00c0
}
IL_00ac: ldarg.0
IL_00ad: ldc.i4.s -2
IL_00af: stfld ""int C.<Test>d__1.<>1__state""
IL_00b4: ldarg.0
IL_00b5: ldc.i4.s -2
IL_00b7: stfld ""int C.<Test>d__1.<>1__state""
IL_00bc: ldarg.0
IL_00bd: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long> C.<Test>d__1.<>t__builder""
IL_00c2: ldloc.1
IL_00c3: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long>.SetResult(long)""
IL_00c8: ret
IL_00b5: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long> C.<Test>d__1.<>t__builder""
IL_00ba: ldloc.1
IL_00bb: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<long>.SetResult(long)""
IL_00c0: ret
}
");
}
......
......@@ -2969,7 +2969,7 @@ public async Task<int> F()
v0.VerifyIL("C.<F>d__0.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", @"
{
// Code size 254 (0xfe)
// Code size 246 (0xf6)
.maxstack 3
.locals init (int V_0,
int V_1,
......@@ -3047,7 +3047,7 @@ .maxstack 3
IL_0094: ldloca.s V_3
IL_0096: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, C.<F>d__0>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref C.<F>d__0)""
IL_009b: nop
IL_009c: leave.s IL_00fd
IL_009c: leave.s IL_00f5
>IL_009e: ldarg.0
IL_009f: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> C.<F>d__0.<>u__1""
IL_00a4: stloc.2
......@@ -3062,34 +3062,32 @@ .maxstack 3
IL_00ba: ldloca.s V_2
IL_00bc: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_00c1: pop
IL_00c2: ldloca.s V_2
IL_00c4: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
-IL_00ca: ldc.i4.1
IL_00cb: stloc.1
IL_00cc: leave.s IL_00e8
-IL_00c2: ldc.i4.1
IL_00c3: stloc.1
IL_00c4: leave.s IL_00e0
}
catch System.Exception
{
~IL_00ce: stloc.s V_4
~IL_00c6: stloc.s V_4
IL_00c8: ldarg.0
IL_00c9: ldc.i4.s -2
IL_00cb: stfld ""int C.<F>d__0.<>1__state""
IL_00d0: ldarg.0
IL_00d1: ldc.i4.s -2
IL_00d3: stfld ""int C.<F>d__0.<>1__state""
IL_00d8: ldarg.0
IL_00d9: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> C.<F>d__0.<>t__builder""
IL_00de: ldloc.s V_4
IL_00e0: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_00e5: nop
IL_00e6: leave.s IL_00fd
IL_00d1: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> C.<F>d__0.<>t__builder""
IL_00d6: ldloc.s V_4
IL_00d8: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_00dd: nop
IL_00de: leave.s IL_00f5
}
-IL_00e8: ldarg.0
IL_00e9: ldc.i4.s -2
IL_00eb: stfld ""int C.<F>d__0.<>1__state""
~IL_00f0: ldarg.0
IL_00f1: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> C.<F>d__0.<>t__builder""
IL_00f6: ldloc.1
IL_00f7: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_00fc: nop
IL_00fd: ret
-IL_00e0: ldarg.0
IL_00e1: ldc.i4.s -2
IL_00e3: stfld ""int C.<F>d__0.<>1__state""
~IL_00e8: ldarg.0
IL_00e9: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> C.<F>d__0.<>t__builder""
IL_00ee: ldloc.1
IL_00ef: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_00f4: nop
IL_00f5: ret
}
", sequencePoints: "C+<F>d__0.MoveNext");
......
......@@ -4373,6 +4373,94 @@ static void Main()
</symbols>");
}
[Fact(Skip = "https://github.com/dotnet/roslyn/issues/18844"), WorkItem(18844, "https://github.com/dotnet/roslyn/issues/18844")]
public void UsingStatement_Embedded()
{
var source = @"
class C
{
bool F()
{
bool x = true;
bool value = false;
using (var stream = new System.IO.MemoryStream())
if (x)
{
value = true;
}
else
value = false;
return value;
}
}
";
var c = CreateCompilationWithMscorlibAndSystemCore(source, options: TestOptions.DebugDll);
var v = CompileAndVerify(c);
v.VerifyIL("C.F", @"
{
// Code size 45 (0x2d)
.maxstack 1
.locals init (bool V_0, //x
bool V_1, //value
System.IO.MemoryStream V_2, //stream
bool V_3,
bool V_4)
// sequence point: {
IL_0000: nop
// sequence point: bool x = true;
IL_0001: ldc.i4.1
IL_0002: stloc.0
// sequence point: bool value = false;
IL_0003: ldc.i4.0
IL_0004: stloc.1
// sequence point: var stream = new System.IO.MemoryStream()
IL_0005: newobj ""System.IO.MemoryStream..ctor()""
IL_000a: stloc.2
.try
{
// sequence point: if (x)
IL_000b: ldloc.0
IL_000c: stloc.3
// sequence point: <hidden>
IL_000d: ldloc.3
IL_000e: brfalse.s IL_0016
// sequence point: {
IL_0010: nop
// sequence point: value = true;
IL_0011: ldc.i4.1
IL_0012: stloc.1
// sequence point: }
IL_0013: nop
IL_0014: br.s IL_0018
// sequence point: value = false;
IL_0016: ldc.i4.0
IL_0017: stloc.1
// sequence point: <hidden>
IL_0018: leave.s IL_0025
}
finally
{
// sequence point: <hidden>
IL_001a: ldloc.2
IL_001b: brfalse.s IL_0024
IL_001d: ldloc.2
IL_001e: callvirt ""void System.IDisposable.Dispose()""
IL_0023: nop
IL_0024: endfinally
}
// sequence point: return value;
IL_0025: ldloc.1
IL_0026: stloc.s V_4
IL_0028: br.s IL_002a
// sequence point: }
IL_002a: ldloc.s V_4
IL_002c: ret
}
", sequencePoints: "C.F", source: source);
}
#endregion
// LockStatement tested in CodeGenLock
......
......@@ -1894,11 +1894,11 @@ class C
var calls = actualIL.Split(new[] { '\n', '\r' }, System.StringSplitOptions.RemoveEmptyEntries).Where(s => s.Contains("OnCompleted")).ToArray();
Assert.Equal(calls.Length, 6);
Assert.Equal(" IL_0056: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitOnCompleted<T1, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T1, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[0]);
Assert.Equal(" IL_00c1: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T2, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T2, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[1]);
Assert.Equal(" IL_012c: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T3, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T3, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[2]);
Assert.Equal(" IL_019a: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitOnCompleted<T4, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T4, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[3]);
Assert.Equal(" IL_020a: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T5, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T5, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[4]);
Assert.Equal(" IL_027a: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T6, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T6, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[5]);
Assert.Equal(" IL_00b9: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T2, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T2, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[1]);
Assert.Equal(" IL_011c: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T3, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T3, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[2]);
Assert.Equal(" IL_0182: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitOnCompleted<T4, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T4, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[3]);
Assert.Equal(" IL_01ea: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T5, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T5, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[4]);
Assert.Equal(" IL_0252: call \"void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<T6, C.<F>d__0<T1, T2, T3, T4, T5, T6>>(ref T6, ref C.<F>d__0<T1, T2, T3, T4, T5, T6>)\"", calls[5]);
}
[Fact]
......
......@@ -108,7 +108,6 @@
<Compile Include="EventHookup\IHACK_EventHookupDismissalOnBufferChangePreventerService.cs" />
<Compile Include="ExtractInterface\ExtractInterfaceCommandHandler.cs" />
<Compile Include="ExtractMethod\ExtractMethodCommandHandler.cs" />
<Compile Include="FindReferences\CSharpFindReferencesService.cs" />
<Compile Include="FindUsages\CSharpFindUsagesService.cs" />
<Compile Include="Formatting\CSharpEditorFormattingService.cs" />
<Compile Include="Formatting\Indentation\CSharpIndentationService.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
using System.Composition;
using Microsoft.CodeAnalysis.Editor.FindReferences;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.Host.Mef;
namespace Microsoft.CodeAnalysis.Editor.CSharp.FindReferences
{
[ExportLanguageService(typeof(IFindReferencesService), LanguageNames.CSharp), Shared]
internal class CSharpFindReferencesService : AbstractFindReferencesService
{
[ImportingConstructor]
public CSharpFindReferencesService(
[ImportMany] IEnumerable<IDefinitionsAndReferencesPresenter> referencedSymbolsPresenters,
[ImportMany] IEnumerable<INavigableItemsPresenter> navigableItemsPresenters)
: base(referencedSymbolsPresenters, navigableItemsPresenters)
{
}
}
}
\ No newline at end of file
......@@ -10,7 +10,7 @@ namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeActions.MoveType
{
public partial class MoveTypeTests : CSharpMoveTypeTestsBase
{
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestMissing_OnMatchingFileName()
{
var code =
......@@ -19,7 +19,7 @@ public async Task TestMissing_OnMatchingFileName()
await TestMissingInRegularAndScriptAsync(code);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestMissing_Nested_OnMatchingFileName_Simple()
{
var code =
......@@ -31,7 +31,7 @@ public async Task TestMissing_Nested_OnMatchingFileName_Simple()
await TestMissingInRegularAndScriptAsync(code);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestMatchingFileName_CaseSensitive()
{
var code =
......@@ -40,7 +40,7 @@ public async Task TestMatchingFileName_CaseSensitive()
await TestActionCountAsync(code, count: 2);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestForSpans1()
{
var code =
......@@ -50,7 +50,7 @@ class Class2 { }";
await TestMissingInRegularAndScriptAsync(code);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestForSpans2()
{
var code =
......@@ -64,7 +64,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WorkItem(14008, "https://github.com/dotnet/roslyn/issues/14008")]
public async Task TestMoveToNewFileWithFolders()
{
......@@ -88,7 +88,7 @@ class Class2 { }
destinationDocumentText, destinationDocumentContainers: ImmutableArray.Create("A", "B"));
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestForSpans3()
{
var code =
......@@ -98,7 +98,7 @@ class Class2 { }";
await TestMissingInRegularAndScriptAsync(code);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestForSpans4()
{
var code =
......@@ -112,7 +112,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithNoContainerNamespace()
{
var code =
......@@ -126,7 +126,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithWithUsingsAndNoContainerNamespace()
{
var code =
......@@ -149,7 +149,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithWithMembers()
{
var code =
......@@ -185,7 +185,7 @@ void Print(int x)
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithWithMembers2()
{
var code =
......@@ -235,7 +235,7 @@ void Print(int x)
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveAnInterface()
{
var code =
......@@ -249,7 +249,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveAStruct()
{
var code =
......@@ -263,7 +263,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveAnEnum()
{
var code =
......@@ -277,7 +277,7 @@ class Class2 { }";
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithWithContainerNamespace()
{
var code =
......@@ -303,7 +303,7 @@ class Class1 { }
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypeToNewFile_Simple()
{
var code =
......@@ -340,7 +340,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypePreserveModifiers()
{
var code =
......@@ -377,7 +377,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WorkItem(14004, "https://github.com/dotnet/roslyn/issues/14004")]
public async Task MoveNestedTypeToNewFile_Attributes1()
{
......@@ -419,7 +419,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WorkItem(14484, "https://github.com/dotnet/roslyn/issues/14484")]
public async Task MoveNestedTypeToNewFile_Comments1()
{
......@@ -463,7 +463,7 @@ class Class2
ignoreTrivia: false);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypeToNewFile_Simple_DottedName()
{
var code =
......@@ -500,7 +500,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText, index: 1);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypeToNewFile_ParentHasOtherMembers()
{
var code =
......@@ -543,7 +543,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypeToNewFile_HasOtherTopLevelMembers()
{
var code =
......@@ -595,7 +595,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveNestedTypeToNewFile_HasMembers()
{
var code =
......@@ -643,7 +643,7 @@ class Class2
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WorkItem(13969, "https://github.com/dotnet/roslyn/issues/13969")]
public async Task MoveTypeInFileWithComplexHierarchy()
{
......@@ -755,7 +755,7 @@ class InnerClass3
await TestMoveTypeToNewFileAsync(code, codeAfterMove, expectedDocumentName, destinationDocumentText);
}
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeUsings1()
{
var code =
......@@ -794,7 +794,7 @@ class Inner {
}
[WorkItem(16283, "https://github.com/dotnet/roslyn/issues/16283")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestLeadingTrivia1()
{
var code =
......@@ -832,7 +832,7 @@ class Inner2
}
[WorkItem(17171, "https://github.com/dotnet/roslyn/issues/17171")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestInsertFinalNewLine()
{
var code =
......@@ -875,7 +875,7 @@ class Inner2
}
[WorkItem(17171, "https://github.com/dotnet/roslyn/issues/17171")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task TestInsertFinalNewLine2()
{
var code =
......@@ -917,7 +917,7 @@ class Inner2
}
[WorkItem(16282, "https://github.com/dotnet/roslyn/issues/16282")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeRemoveOuterInheritanceTypes()
{
var code =
......@@ -946,7 +946,7 @@ class Inner : IWhatever {
}
[WorkItem(17930, "https://github.com/dotnet/roslyn/issues/17930")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithDirectives1()
{
var code =
......@@ -998,7 +998,7 @@ public class Inner
}
[WorkItem(17930, "https://github.com/dotnet/roslyn/issues/17930")]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/18766"), Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsMoveType)]
public async Task MoveTypeWithDirectives2()
{
var code =
......
......@@ -10,10 +10,9 @@
using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces;
using Microsoft.CodeAnalysis.Extensions;
using Microsoft.CodeAnalysis.Text;
using Roslyn.Utilities;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
using Microsoft.CodeAnalysis.Editor.UnitTests.Utilities;
namespace Microsoft.CodeAnalysis.Editor.CSharp.UnitTests.CodeRefactorings
{
......@@ -28,7 +27,7 @@ public async Task TestExceptionInComputePreview()
}
}
[Fact]
[WpfFact]
public void TestExceptionInDisplayText()
{
using (var workspace = CreateWorkspaceFromFile("class D {}", new TestParameters()))
......@@ -83,8 +82,8 @@ private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider p
}
private static void RefactoringSetup(
TestWorkspace workspace, CodeRefactoringProvider provider, List<CodeAction> codeActions,
out EditorLayerExtensionManager.ExtensionManager extensionManager,
TestWorkspace workspace, CodeRefactoringProvider provider, List<CodeAction> codeActions,
out EditorLayerExtensionManager.ExtensionManager extensionManager,
out VisualStudio.Text.ITextBuffer textBuffer)
{
var document = GetDocument(workspace);
......@@ -96,4 +95,4 @@ private async Task ActionSets(TestWorkspace workspace, CodeRefactoringProvider p
textBuffer = document.GetTextAsync().Result.Container.GetTextBuffer();
}
}
}
}
\ No newline at end of file
......@@ -1967,6 +1967,44 @@ void M()
Console.WriteLine(_);
}
}
}");
}
[WorkItem(18668, "https://github.com/dotnet/roslyn/issues/18668")]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInlineDeclaration)]
public async Task TestDefiniteAssignmentIssueWithVar()
{
await TestMissingInRegularAndScriptAsync(
@"
using System;
class C
{
static void M(bool condition)
{
[|var|] x = 1;
var result = condition && int.TryParse(""2"", out x);
Console.WriteLine(x);
}
}");
}
[WorkItem(18668, "https://github.com/dotnet/roslyn/issues/18668")]
[Fact, Trait(Traits.Feature, Traits.Features.CodeActionsInlineDeclaration)]
public async Task TestDefiniteAssignmentIssueWithNonVar()
{
await TestMissingInRegularAndScriptAsync(
@"
using System;
class C
{
static void M(bool condition)
{
[|int|] x = 1;
var result = condition && int.TryParse(""2"", out x);
Console.WriteLine(x);
}
}");
}
}
......
......@@ -398,7 +398,6 @@
<Compile Include="Implementation\EndConstructGeneration\IEndConstructGenerationService.cs" />
<Compile Include="Implementation\ExtractInterface\AbstractExtractInterfaceCommandHandler.cs" />
<Compile Include="Implementation\ExtractMethod\AbstractExtractMethodCommandHandler.cs" />
<Compile Include="FindReferences\AbstractFindReferencesService.cs" />
<Compile Include="FindReferences\FindReferencesCommandHandler.cs" />
<Compile Include="FindReferences\IFindReferencesService.cs" />
<Compile Include="Implementation\ForegroundNotification\ForegroundNotificationService.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor.FindUsages;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.Editor.Shared.Utilities;
using Microsoft.CodeAnalysis.FindSymbols;
using Microsoft.CodeAnalysis.FindUsages;
using Microsoft.CodeAnalysis.Navigation;
using Microsoft.CodeAnalysis.Shared.Extensions;
using Roslyn.Utilities;
namespace Microsoft.CodeAnalysis.Editor.FindReferences
{
internal abstract partial class AbstractFindReferencesService :
ForegroundThreadAffinitizedObject, IFindReferencesService
{
private readonly IEnumerable<IDefinitionsAndReferencesPresenter> _referenceSymbolPresenters;
private readonly IEnumerable<INavigableItemsPresenter> _navigableItemPresenters;
protected AbstractFindReferencesService(
IEnumerable<IDefinitionsAndReferencesPresenter> referenceSymbolPresenters,
IEnumerable<INavigableItemsPresenter> navigableItemPresenters)
{
_referenceSymbolPresenters = referenceSymbolPresenters;
_navigableItemPresenters = navigableItemPresenters;
}
private async Task<Tuple<IEnumerable<ReferencedSymbol>, Solution>> FindReferencedSymbolsAsync(
Document document, int position, IWaitContext waitContext)
{
var cancellationToken = waitContext.CancellationToken;
var symbolAndProject = await FindUsagesHelpers.GetRelevantSymbolAndProjectAtPositionAsync(
document, position, cancellationToken).ConfigureAwait(false);
if (symbolAndProject == null)
{
return null;
}
var symbol = symbolAndProject?.symbol;
var project = symbolAndProject?.project;
var displayName = FindUsagesHelpers.GetDisplayName(symbol);
waitContext.Message = string.Format(
EditorFeaturesResources.Finding_references_of_0, displayName);
var result = await SymbolFinder.FindReferencesAsync(symbol, project.Solution, cancellationToken).ConfigureAwait(false);
return Tuple.Create(result, project.Solution);
}
public bool TryFindReferences(Document document, int position, IWaitContext waitContext)
{
var cancellationToken = waitContext.CancellationToken;
var result = this.FindReferencedSymbolsAsync(document, position, waitContext).WaitAndGetResult(cancellationToken);
return TryDisplayReferences(result, cancellationToken);
}
private bool TryDisplayReferences(IEnumerable<INavigableItem> result)
{
if (result != null && result.Any())
{
var title = result.First().DisplayTaggedParts.JoinText();
foreach (var presenter in _navigableItemPresenters)
{
presenter.DisplayResult(title, result);
return true;
}
}
return false;
}
private bool TryDisplayReferences(
Tuple<IEnumerable<ReferencedSymbol>, Solution> result,
CancellationToken cancellationToken)
{
if (result != null && result.Item1 != null)
{
var solution = result.Item2;
var factory = solution.Workspace.Services.GetService<IDefinitionsAndReferencesFactory>();
var definitionsAndReferences = factory.CreateDefinitionsAndReferences(
solution, result.Item1, includeHiddenLocations: false, cancellationToken: cancellationToken);
foreach (var presenter in _referenceSymbolPresenters)
{
presenter.DisplayResult(definitionsAndReferences);
return true;
}
}
return false;
}
}
}
\ No newline at end of file
......@@ -74,15 +74,12 @@ public void ExecuteCommand(FindReferencesCommandArgs args, Action nextHandler)
private bool TryExecuteCommand(int caretPosition, Document document)
{
var streamingService = document.GetLanguageService<IFindUsagesService>();
var synchronousService = document.GetLanguageService<IFindReferencesService>();
var streamingPresenter = GetStreamingPresenter();
// See if we're running on a host that can provide streaming results.
// We'll both need a FAR service that can stream results to us, and
// a presenter that can accept streamed results.
var streamingEnabled = document.Project.Solution.Workspace.Options.GetOption(FeatureOnOffOptions.StreamingFindReferences, document.Project.Language);
if (streamingEnabled && streamingService != null && streamingPresenter != null)
if (streamingService != null && streamingPresenter != null)
{
StreamingFindReferences(document, caretPosition, streamingService, streamingPresenter);
return true;
......@@ -92,6 +89,7 @@ private bool TryExecuteCommand(int caretPosition, Document document)
// or the host has no way to present results in a streaming manner.
// Fall back to the old non-streaming approach to finding and presenting
// results.
var synchronousService = document.GetLanguageService<IFindReferencesService>();
if (synchronousService != null)
{
FindReferences(document, synchronousService, caretPosition);
......
......@@ -14,6 +14,7 @@
using Microsoft.CodeAnalysis.Shared.Extensions;
using Microsoft.CodeAnalysis.Text;
using Microsoft.CodeAnalysis.Text.Shared.Extensions;
using Microsoft.CodeAnalysis.Utilities;
using Microsoft.VisualStudio.Text;
using Microsoft.VisualStudio.Text.Differencing;
using Microsoft.VisualStudio.Text.Editor;
......@@ -48,6 +49,8 @@ internal class PreviewFactoryService : ForegroundThreadAffinitizedObject, IPrevi
IDifferenceBufferFactoryService differenceBufferService,
IWpfDifferenceViewerFactoryService differenceViewerService)
{
Contract.ThrowIfTrue(this.ForegroundKind == ForegroundThreadDataKind.Unknown);
_textBufferFactoryService = textBufferFactoryService;
_contentTypeRegistryService = contentTypeRegistryService;
_projectionBufferFactoryService = projectionBufferFactoryService;
......
......@@ -90,10 +90,6 @@ internal static class FeatureOnOffOptions
public static readonly PerLanguageOption<bool> RefactoringVerification = new PerLanguageOption<bool>(
nameof(FeatureOnOffOptions), nameof(RefactoringVerification), defaultValue: false);
[ExportOption]
public static readonly PerLanguageOption<bool> StreamingFindReferences = new PerLanguageOption<bool>(
nameof(FeatureOnOffOptions), nameof(StreamingFindReferences), defaultValue: true);
[ExportOption]
public static readonly PerLanguageOption<bool> StreamingGoToImplementation = new PerLanguageOption<bool>(
nameof(FeatureOnOffOptions), nameof(StreamingGoToImplementation), defaultValue: true);
......
......@@ -70,6 +70,8 @@ internal static ForegroundThreadData CurrentForegroundThreadData
internal TaskScheduler ForegroundTaskScheduler => _foregroundThreadDataWhenCreated.TaskScheduler;
internal ForegroundThreadDataKind ForegroundKind => _foregroundThreadDataWhenCreated.Kind;
// HACK: This is a dangerous way of establishing the 'foreground' thread affinity of an
// AppDomain. This method should be deleted in favor of forcing derivations of this type
// to either explicitly inherit WPF Dispatcher thread or provide an explicit thread
......
......@@ -213,8 +213,6 @@
<Compile Include="Extensions\ITextSnapshotExtensionsTests.cs" />
<Compile Include="Extensions\ITextSnapshotLineExtensionsTests.cs" />
<Compile Include="Extensions\SetExtensionTests.cs" />
<Compile Include="FindReferences\FindReferencesCommandHandlerTests.cs" />
<Compile Include="FindReferences\MockDefinitionsAndReferencesPresenter.cs" />
<Compile Include="LineSeparators\AdornmentManagerTests.cs" />
<Compile Include="LinkedFiles\LinkedFileDiffMergingEditorTests.cs" />
<Compile Include="MetadataAsSource\AbstractMetadataAsSourceTests.cs" />
......
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis.Editor.Commands;
using Microsoft.CodeAnalysis.Editor.FindReferences;
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.Editor.UnitTests.Utilities;
using Microsoft.CodeAnalysis.Editor.UnitTests.Workspaces;
using Microsoft.CodeAnalysis.FindUsages;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.VisualStudio.Text;
using Roslyn.Test.Utilities;
using Roslyn.Utilities;
using Xunit;
namespace Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
{
public class FindReferencesCommandHandlerTests
{
[WpfFact, Trait(Traits.Feature, Traits.Features.FindReferences)]
public void TestFindReferencesSynchronousCall()
{
using (var workspace = TestWorkspace.CreateCSharp("class C { C() { new C(); } }"))
{
var findReferencesPresenter = new MockDefinitionsAndReferencesPresenter();
var handler = new FindReferencesCommandHandler(
TestWaitIndicator.Default,
SpecializedCollections.SingletonEnumerable(findReferencesPresenter),
SpecializedCollections.EmptyEnumerable<Lazy<IStreamingFindUsagesPresenter>>(),
workspace.ExportProvider.GetExports<IAsynchronousOperationListener, FeatureMetadata>());
var textView = workspace.Documents[0].GetTextView();
textView.Caret.MoveTo(new SnapshotPoint(textView.TextSnapshot, 7));
handler.ExecuteCommand(new FindReferencesCommandArgs(
textView,
textView.TextBuffer), () => { });
AssertResult(findReferencesPresenter.DefinitionsAndReferences, "C", ".ctor");
}
}
private bool AssertResult(
DefinitionsAndReferences definitionsAndReferences,
params string[] definitions)
{
return definitionsAndReferences.Definitions.Select(r => r.DisplayParts.JoinText())
.SetEquals(definitions);
}
}
}
\ No newline at end of file
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.CodeAnalysis.Editor.Host;
using Microsoft.CodeAnalysis.FindUsages;
namespace Microsoft.CodeAnalysis.Editor.UnitTests.FindReferences
{
internal class MockDefinitionsAndReferencesPresenter : IDefinitionsAndReferencesPresenter
{
public DefinitionsAndReferences DefinitionsAndReferences;
public void DisplayResult(DefinitionsAndReferences definitionsAndReferences)
{
DefinitionsAndReferences = definitionsAndReferences;
}
}
}
\ No newline at end of file
......@@ -91,7 +91,6 @@
<Compile Include="EndConstructGeneration\VisualBasicEndConstructGenerationService.vb" />
<Compile Include="ExtractInterface\ExtractInterfaceCommandHandler.vb" />
<Compile Include="ExtractMethod\ExtractMethodCommandHandler.vb" />
<Compile Include="FindReferences\VisualBasicFindReferencesService.vb" />
<Compile Include="FindUsages\VisualBasicFindUsagesService.vb" />
<Compile Include="Formatting\Indentation\SmartTokenFormatter.vb" />
<Compile Include="Formatting\Indentation\SmartTokenFormatterCommandHandler.vb" />
......
......@@ -20,10 +20,11 @@ internal sealed class DocumentLocationDefinitionItem : DefinitionItem
ImmutableArray<TaggedText> displayParts,
ImmutableArray<TaggedText> nameDisplayParts,
ImmutableArray<DocumentSpan> sourceSpans,
ImmutableDictionary<string, string> properties,
bool displayIfNoReferences)
: base(tags, displayParts, nameDisplayParts,
ImmutableArray.Create(new TaggedText(TextTags.Text, sourceSpans[0].Document.Project.Name)),
sourceSpans, displayIfNoReferences)
ImmutableArray.Create(new TaggedText(TextTags.Text, sourceSpans[0].Document.Project.Name)),
sourceSpans, properties, displayIfNoReferences)
{
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册