Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup net48 code #14489

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/Controls/ShortcutToolbar.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
using Dynamo.UI.Commands;
using Dynamo.ViewModels;
using Dynamo.Wpf.ViewModels.Core;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif
using Greg.AuthProviders;
using System.Linq;
using System.Windows;
Expand Down
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/Controls/StartPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,7 @@
using Dynamo.Utilities;
using Dynamo.ViewModels;
using Dynamo.Wpf.Properties;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.UI.Controls
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
using System;
using Dynamo.Graph.Nodes.CustomNodes;
using Dynamo.Wpf.ViewModels;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
#else
using Prism.Commands;
#endif
using DelegateCommand = Dynamo.UI.Commands.DelegateCommand;

namespace Dynamo.ViewModels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
using Dynamo.PackageManager;
using Dynamo.Utilities;
using Dynamo.Wpf.Properties;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.ViewModels
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
using System.IO;
using System.Windows;
using System.Windows.Input;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.PackageManager.UI
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,7 @@
using Dynamo.Wpf.Utilities;
using Greg.AuthProviders;
using Greg.Responses;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
#else
using Prism.Commands;
#endif

namespace Dynamo.ViewModels
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
using Dynamo.ViewModels;
using Dynamo.Wpf.ViewModels;
using Greg.Responses;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
#else
using Prism.Commands;
#endif

namespace Dynamo.PackageManager.ViewModels
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@
using Lucene.Net.Index;
using Lucene.Net.QueryParsers.Classic;
using Lucene.Net.Search;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using Prism.Commands;
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.PackageManager
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using Dynamo.Controls;
using Dynamo.ViewModels;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif
using System.Collections.ObjectModel;

namespace Dynamo.PackageManager
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,8 @@
using Dynamo.PackageManager;
using Dynamo.Wpf.Properties;
using Dynamo.Wpf.Utilities;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
using Microsoft.Practices.Prism.Commands;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
using Prism.Commands;
#endif

namespace Dynamo.ViewModels
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@
using PythonNodeModels;
using Double = System.Double;
using String = System.String;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
using Microsoft.Practices.Prism.Commands;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
using Prism.Commands;
#endif

namespace Dynamo.PackageManager
{
Expand Down
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/ViewModels/Preview/WatchViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@
using Dynamo.Wpf.Properties;
using Dynamo.UI.Commands;
using Dynamo.Utilities;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif
using Dynamo.Configuration;
using CoreNodeModels;

Expand Down
5 changes: 0 additions & 5 deletions src/DynamoCoreWpf/ViewModels/Search/BrowserItemViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,8 @@
using Dynamo.Search.SearchElements;
using Dynamo.ViewModels;
using Dynamo.Wpf.Extensions;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
using Microsoft.Practices.Prism.Commands;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
using Prism.Commands;
#endif

namespace Dynamo.Wpf.ViewModels
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
using Dynamo.Selection;
using Dynamo.ViewModels;
using FontAwesome5;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
#else
using Prism.Commands;
#endif

namespace Dynamo.Wpf.ViewModels
{
Expand Down
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/ViewModels/Search/SearchCategory.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
using System.Windows.Input;
using Dynamo.UI.Commands;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.Wpf.ViewModels
{
Expand Down
4 changes: 0 additions & 4 deletions src/DynamoCoreWpf/ViewModels/ViewModelBase.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
using System;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif
using Newtonsoft.Json;

namespace Dynamo.ViewModels
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
using Dynamo.Engine.CodeCompletion;
using ICSharpCode.AvalonEdit.CodeCompletion;
using ICSharpCode.AvalonEdit.Editing;
#if NETFRAMEWORK
using NotificationObject = Microsoft.Practices.Prism.ViewModel.NotificationObject;
#else
using NotificationObject = Dynamo.Core.NotificationObject;
#endif

namespace Dynamo.UI
{
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoUtilities/ObservableHashSet.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Specialized;
using System.Collections.Generic;
using System.Linq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
using CoreNodeModels;
using Dynamo.Controls;
using Dynamo.Wpf;
#if NETFRAMEWORK
using Microsoft.Practices.Prism.Commands;
#else
using Prism.Commands;
#endif

namespace CoreNodeModelsWpf.Nodes
{
Expand Down
2 changes: 0 additions & 2 deletions src/Tools/DynamoShapeManager/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,6 @@ public static Version GetVersionFromPath(string asmPath, string searchPattern =
var ASMFilePath = Directory.GetFiles(asmPath, searchPattern, SearchOption.TopDirectoryOnly).FirstOrDefault();
if (ASMFilePath != null && File.Exists(ASMFilePath))
{
#if NET6_0_OR_GREATER
if (!OperatingSystem.IsWindows())
{
string fileName = Path.GetFileNameWithoutExtension(ASMFilePath);
Expand All @@ -609,7 +608,6 @@ public static Version GetVersionFromPath(string asmPath, string searchPattern =
}
return new Version($"{version}.0.0");
}
#endif
var asmVersion = FileVersionInfo.GetVersionInfo(ASMFilePath);
var libGversion = new Version(asmVersion.FileMajorPart, asmVersion.FileMinorPart, asmVersion.FileBuildPart);
return libGversion;
Expand Down
9 changes: 1 addition & 8 deletions test/DynamoCoreTests/Configuration/ExecutionSessionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ protected override void GetLibrariesToPreload(List<string> libraries)
libraries.Add("FunctionObject.ds");
base.GetLibrariesToPreload(libraries);
}
#if NET6_0_OR_GREATER

[OneTimeSetUp]
#elif NETFRAMEWORK
[TestFixtureSetUp]
#endif
public void FixtureSetup()
{
ExecutionEvents.GraphPostExecution += ExecutionEvents_GraphPostExecution;
Expand Down Expand Up @@ -55,11 +52,7 @@ private void ExecutionEvents_GraphPreExecution(Session.IExecutionSession session

}

#if NET6_0_OR_GREATER
[OneTimeTearDown]
#elif NETFRAMEWORK
[TestFixtureTearDown]
#endif
public void TearDown()
{
ExecutionEvents.GraphPostExecution -= ExecutionEvents_GraphPostExecution;
Expand Down
84 changes: 0 additions & 84 deletions test/DynamoCoreTests/Crypto/DynamoCyptoTests.cs

This file was deleted.

4 changes: 0 additions & 4 deletions test/DynamoCoreTests/DummyNodeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,7 @@ public void IfDeserializationThrowsDummyNodeStillCreated()
Assert.AreEqual(1, CurrentDynamoModel.CurrentWorkspace.Nodes.OfType<DummyNode>().Count());
var dummyNode = CurrentDynamoModel.CurrentWorkspace.Nodes.OfType<DummyNode>().First();
//runtime behavior has changed for assembly resolve handlers that throw exceptions.
#if NET6_0_OR_GREATER
Assert.AreEqual(2, exceptionCount);
#elif NETFRAMEWORK
Assert.AreEqual(1, exceptionCount);
#endif
AppDomain.CurrentDomain.AssemblyResolve -= handler;
}

Expand Down
9 changes: 1 addition & 8 deletions test/DynamoCoreTests/HomgeneousListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,8 @@ protected override void GetLibrariesToPreload(List<string> libraries)
libraries.Add("FunctionObject.ds");
base.GetLibrariesToPreload(libraries);
}
#if NET6_0_OR_GREATER

[OneTimeSetUp]
#elif NETFRAMEWORK
[TestFixtureSetUp]
#endif
public void FixtureSetup()
{
ExecutionEvents.GraphPostExecution += ExecutionEvents_GraphPostExecution;
Expand Down Expand Up @@ -66,11 +63,7 @@ public void TestMethodResolutionforHeterogeneousListInputs()
});
}

#if NET6_0_OR_GREATER
[OneTimeTearDown]
#elif NETFRAMEWORK
[TestFixtureTearDown]
#endif
public void TearDown()
{
ExecutionEvents.GraphPostExecution -= ExecutionEvents_GraphPostExecution;
Expand Down
Loading
Loading