Skip to content

Commit

Permalink
Replace DESKTOP symbol with NETFRAMEWORK
Browse files Browse the repository at this point in the history
  • Loading branch information
AArnott committed Nov 5, 2019
1 parent e625f21 commit 79f1931
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/Microsoft.VisualStudio.Threading.Tests/AsyncLocalTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void AsyncLocalPerfTest()
this.Logger.WriteLine("Reading {0} values took {1} ms", values.Length, reads.ElapsedMilliseconds);
}

#if DESKTOP
#if NETFRAMEWORK
[Fact]
public void CallAcrossAppDomainBoundariesWithNonSerializableData()
{
Expand Down Expand Up @@ -255,7 +255,7 @@ await Task.WhenAll(
Assert.Null(asyncLocal.Value);
}

#if DESKTOP
#if NETFRAMEWORK
private class OtherDomainProxy : MarshalByRefObject
{
internal void SomeMethod(int callingAppDomainId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public async Task NoMemoryLeakForManyLocks()
}
}

#if DESKTOP
#if NETFRAMEWORK
[Fact, Trait("TestCategory", "FailsInCloudTest")]
public async Task CallAcrossAppDomainBoundariesWithLock()
{
Expand Down Expand Up @@ -4868,7 +4868,7 @@ private async Task MitigationAgainstAccidentalLockForkingHelper(Func<AsyncReader
}
}

#if DESKTOP
#if NETFRAMEWORK
private class OtherDomainProxy : MarshalByRefObject
{
internal void SomeMethod(int callingAppDomainId)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* *
*********************************************************/

#if DESKTOP
#if NETFRAMEWORK

namespace Microsoft.VisualStudio.Threading.Tests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>

<TargetsDesktop Condition=" '$(TargetFramework)' == 'net472' ">true</TargetsDesktop>
<DefineConstants Condition=" '$(TargetsDesktop)' == 'true' ">$(DefineConstants);DESKTOP;ISOLATED_TEST_SUPPORT</DefineConstants>
<DefineConstants Condition=" '$(TargetFramework)' == 'net472' ">$(DefineConstants);ISOLATED_TEST_SUPPORT</DefineConstants>
</PropertyGroup>
<ItemGroup>
<Compile Include="..\Microsoft.VisualStudio.Threading\InternalUtilities.cs">
Expand Down Expand Up @@ -40,7 +39,7 @@
<ItemGroup>
<ProjectReference Include="..\Microsoft.VisualStudio.Threading\Microsoft.VisualStudio.Threading.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsDesktop)' == 'true' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="System.Configuration" />
<Reference Include="WindowsBase" />
<ProjectReference Include="..\IsolatedTestHost\IsolatedTestHost.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if DESKTOP
#if NETFRAMEWORK
#define UseWpfContext
#endif

Expand All @@ -8,7 +8,7 @@ namespace Microsoft.VisualStudio.Threading.Tests
using System.Collections.Generic;
using System.Reflection;
using System.Threading;
#if DESKTOP
#if NETFRAMEWORK
using System.Windows.Threading;
#endif

Expand Down
6 changes: 3 additions & 3 deletions src/Microsoft.VisualStudio.Threading.Tests/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ internal static T[] ConcurrencyTest<T>(Func<T> action, int concurrency = -1)

internal static DebugAssertionRevert DisableAssertionDialog()
{
#if DESKTOP
#if NETFRAMEWORK
var listener = Debug.Listeners.OfType<DefaultTraceListener>().FirstOrDefault();
if (listener != null)
{
Expand Down Expand Up @@ -194,7 +194,7 @@ internal static Task<bool> ExecuteInIsolationAsync(string testClassName, string
Requires.NotNullOrEmpty(testClassName, nameof(testClassName));
Requires.NotNullOrEmpty(testMethodName, nameof(testMethodName));

#if DESKTOP
#if NETFRAMEWORK
const string testHostProcessName = "IsolatedTestHost.exe";
if (Process.GetCurrentProcess().ProcessName == Path.GetFileNameWithoutExtension(testHostProcessName))
{
Expand Down Expand Up @@ -370,7 +370,7 @@ public void GetResult()
{
public void Dispose()
{
#if DESKTOP
#if NETFRAMEWORK
var listener = Debug.Listeners.OfType<DefaultTraceListener>().FirstOrDefault();
if (listener != null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* *
*********************************************************/

#if DESKTOP
#if NETFRAMEWORK

namespace Microsoft.VisualStudio.Threading
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<CodeAnalysisRuleSet>FxCopRules.ruleset</CodeAnalysisRuleSet>

<TargetsDesktop Condition=" '$(TargetFramework)' == 'net472' ">true</TargetsDesktop>
<DefineConstants Condition=" '$(TargetsDesktop)' == 'true' ">$(DefineConstants);DESKTOP</DefineConstants>

<Summary>Async synchronization primitives, async collections, TPL and dataflow extensions.</Summary>
<Description>Async synchronization primitives, async collections, TPL and dataflow extensions. The JoinableTaskFactory allows synchronously blocking the UI thread for async work. This package is applicable to any .NET application (not just Visual Studio).</Description>
<PackageTags>Threading Async Lock Synchronization Threadsafe</PackageTags>
Expand Down Expand Up @@ -38,7 +35,7 @@
<ItemGroup>
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsDesktop)' == 'true' ">
<ItemGroup Condition=" '$(TargetFramework)' == 'net472' ">
<Reference Include="WindowsBase" />
</ItemGroup>
<ItemGroup>
Expand Down

0 comments on commit 79f1931

Please sign in to comment.