@@ -48,7 +48,7 @@ public void RunFuncOfTaskOfTMTA()
4848 [ Fact ]
4949 public void LeaveAndReturnToMainThread ( )
5050 {
51- var fullyCompleted = false ;
51+ bool fullyCompleted = false ;
5252 this . asyncPump . Run ( async delegate
5353 {
5454 Assert . Equal ( this . originalThreadManagedId , Environment . CurrentManagedThreadId ) ;
@@ -238,7 +238,7 @@ public void SwitchToMainThreadAsyncTransitionsCanSeeAsyncLocals()
238238 Exception ? delegateFailure = null ;
239239
240240 var asyncLocal = new System . Threading . AsyncLocal < object > ( ) ;
241- var asyncLocalValue = new object ( ) ;
241+ object asyncLocalValue = new object ( ) ;
242242
243243 // The point of this test is to verify that the transitioning/transitioned
244244 // methods on the JoinableTaskFactory can see into the AsyncLocal<T>.Value
@@ -2235,7 +2235,7 @@ public void BeginAsyncWithResultOnMTAKicksOffOtherAsyncPumpWorkCanCompleteSynchr
22352235 } ) . Result ;
22362236
22372237 Assert . False ( joinable . Task . IsCompleted ) ;
2238- var result = joinable . Join ( ) ;
2238+ int result = joinable . Join ( ) ;
22392239 Assert . Equal < int > ( 5 , result ) ;
22402240 Assert . True ( taskFinished ) ;
22412241 Assert . True ( joinable . Task . IsCompleted ) ;
@@ -2631,7 +2631,7 @@ public void JoinWorkStealingRetainsThreadAffinityUI()
26312631 public void JoinWorkStealingRetainsThreadAffinityBackground ( )
26322632 {
26332633 bool synchronousCompletionStarting = false ;
2634- var asyncTask = Task . Run ( delegate
2634+ Task < JoinableTask > asyncTask = Task . Run ( delegate
26352635 {
26362636 return this . asyncPump . RunAsync ( async delegate
26372637 {
@@ -4006,7 +4006,7 @@ public void JoinableTaskOfT_TaskPropertyBeforeReturning()
40064006 public void IsCompletedTrueDoesNotLock ( )
40074007 {
40084008 using var context = new JoinableTaskContext ( ) ;
4009- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4009+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
40104010 Assert . NotNull ( syncContextLock ) ;
40114011
40124012 JoinableTask joinableTask = context . Factory . RunAsync ( ( ) => Task . CompletedTask ) ;
@@ -4038,7 +4038,7 @@ public void IsCompletedTrueDoesNotLock()
40384038 public void JoinCompletedDoesNotLock ( )
40394039 {
40404040 using var context = new JoinableTaskContext ( ) ;
4041- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4041+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
40424042 Assert . NotNull ( syncContextLock ) ;
40434043
40444044 JoinableTask joinableTask = context . Factory . RunAsync ( ( ) => Task . CompletedTask ) ;
@@ -4070,7 +4070,7 @@ public void JoinCompletedDoesNotLock()
40704070 public void JoinAsyncCompletedDoesNotLock ( )
40714071 {
40724072 using var context = new JoinableTaskContext ( ) ;
4073- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4073+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
40744074 Assert . NotNull ( syncContextLock ) ;
40754075
40764076 JoinableTask joinableTask = context . Factory . RunAsync ( ( ) => Task . CompletedTask ) ;
@@ -4106,7 +4106,7 @@ public void JoinAsyncCompletedDoesNotLock()
41064106 public void GetAwaiterCompletedDoesNotLock ( )
41074107 {
41084108 using var context = new JoinableTaskContext ( ) ;
4109- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4109+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
41104110 Assert . NotNull ( syncContextLock ) ;
41114111
41124112 JoinableTask joinableTask = context . Factory . RunAsync ( ( ) => Task . CompletedTask ) ;
@@ -4140,7 +4140,7 @@ public void GetAwaiterCompletedDoesNotLock()
41404140 public void JoinCompletedTDoesNotLock ( )
41414141 {
41424142 using var context = new JoinableTaskContext ( ) ;
4143- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4143+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
41444144 Assert . NotNull ( syncContextLock ) ;
41454145
41464146 JoinableTask < int > joinableTask = context . Factory . RunAsync ( ( ) => Task . FromResult ( 0 ) ) ;
@@ -4172,7 +4172,7 @@ public void JoinCompletedTDoesNotLock()
41724172 public void JoinAsyncCompletedTDoesNotLock ( )
41734173 {
41744174 using var context = new JoinableTaskContext ( ) ;
4175- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4175+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
41764176 Assert . NotNull ( syncContextLock ) ;
41774177
41784178 JoinableTask < int > joinableTask = context . Factory . RunAsync ( ( ) => Task . FromResult ( 0 ) ) ;
@@ -4210,7 +4210,7 @@ public void JoinAsyncCompletedTDoesNotLock()
42104210 public void GetAwaiterCompletedTDoesNotLock ( )
42114211 {
42124212 using var context = new JoinableTaskContext ( ) ;
4213- var syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
4213+ object syncContextLock = typeof ( JoinableTaskContext ) . GetProperty ( "SyncContextLock" , BindingFlags . NonPublic | BindingFlags . Instance ) ! . GetValue ( context ) ! ;
42144214 Assert . NotNull ( syncContextLock ) ;
42154215
42164216 JoinableTask < int > joinableTask = context . Factory . RunAsync ( ( ) => Task . FromResult ( 0 ) ) ;
@@ -4520,7 +4520,7 @@ private WeakReference JoinableTaskReleasedBySyncContextAfterCompletion_Helper(ou
45204520
45214521 private void RunFuncOfTaskHelper ( )
45224522 {
4523- var initialThread = Environment . CurrentManagedThreadId ;
4523+ int initialThread = Environment . CurrentManagedThreadId ;
45244524 this . asyncPump . Run ( async delegate
45254525 {
45264526 Assert . Equal ( initialThread , Environment . CurrentManagedThreadId ) ;
@@ -4531,7 +4531,7 @@ private void RunFuncOfTaskHelper()
45314531
45324532 private void RunFuncOfTaskOfTHelper ( )
45334533 {
4534- var initialThread = Environment . CurrentManagedThreadId ;
4534+ int initialThread = Environment . CurrentManagedThreadId ;
45354535 var expectedResult = new GenericParameterHelper ( ) ;
45364536 GenericParameterHelper actualResult = this . asyncPump . Run ( async delegate
45374537 {
0 commit comments