From 7ebd8ff17e877bf26e11e45386529343aa3d7908 Mon Sep 17 00:00:00 2001 From: Jorgen Dahl Date: Thu, 21 Dec 2023 22:03:42 -0500 Subject: [PATCH] DYN-6314: Remove obsolete methods (#14556) * StartupUtils.cs * Configurations.cs * IPathResolver.cs * PathManager.cs * NodeModelAssemblyLoader.cs * CompiledEventArgs.cs * CompilingEventArgs.cs * EngineController.cs * StartupParams.cs * Function.cs * NodeInputData.cs * NodeModel.cs * NodeOutputData.cs * CustomNodeWorkspaceModel.cs * HomeWorkspaceModel.cs * SerializationConverters.cs * WorkspaceModel.cs * LibraryServices.cs * DynamoAnalyticsClient.cs * DynamoLogger.cs * IAnalyticsSession.cs * DynamoModel.cs * DynamoModelEvents.cs * DefaultRenderPackageFactory.cs * ViewLoadedParams.cs * HelixRenderPackage.cs * UsageReportingAgreementPrompt.xaml.cs * Converters.cs * SharedResourceDictionary.cs * AnnotationViewModel.cs * Revert "UsageReportingAgreementPrompt.xaml.cs" This reverts commit b1706ae1ac323e9a72d08fda0fe9d341ce2d49b0. * StartupUtils.cs - Remove comment * PreferenceSettings.cs * DynamoViewModelDelegateCommands.cs * DynamoViewModelEvents.cs * NodeViewModel.cs * PortViewModel.cs * PreferencesViewModel.cs * PackageManagerClientViewModel.cs * PackageManagerSearchElementViewModel.cs * PackagePathViewModel.cs * PackageViewModel.cs * DynamoGeometryModel3D.cs * CodeCompletionEditor.xaml.cs * NodeManipulator.cs * Package.cs * PackageDownloadHandle.cs * PackageLoader.cs * PackageManagerClient.cs * PackageManagerSearchElement.cs * PackageUtilities.cs * PathHelper.cs * AssociativeGraph.cs * Core.cs * Executable.cs * CLRDLLModule.cs * CLRFFIFunctionPointer.cs * TraceUtils.cs * AssociativeAST.cs * ProcedureTable.cs * MirrorData.cs * ClassUtils.cs * CompilerUtils.cs * MathUtils.cs * LiveRunner.cs * CustomSelection.cs * Python.cs * CPythonEvaluator.cs * Units.cs * Units.cs * PythonNode.cs * UnitNodeModels.cs * NodeViewCustomizations.cs * DynamoUnitsDisplay.cs * GraphicsDataInterfaces.cs * PythonServices.cs * Utilities.cs * WorkspaceDependencyViewExtension.cs * DynamoViewModel.cs * IPreferences.cs * Units.cs * SignDynamo * Revert "PythonNode.cs" This reverts commit b13b2bc23b6540cb19fce1ec6cb822398d1d5520. * Revert "PythonServices.cs" This reverts commit cd2f73ca703596f80903f172a9bf84ceba7b2733. * PythonNode.cs * PythonServices.cs * GraphNodeManagerViewModel.cs * NodeInputData.cs * NodeModel.cs * DynamoModel.cs * DynamoModelEvents.cs * HelixRenderPackage.cs * Converters.cs * DynamoViewModel.cs * PortViewModel.cs * AttachedProperties.cs * DynamoEffectsManager.cs * DynamoGeometryModel3D.cs * DynamoLineGeometryModel3D.cs * DynamoPointGeometryModel3D.cs * HelixWatch3DViewModel.cs * Watch3DView.xaml.cs * AssociativeAST.cs * NodeViewCustomizations.cs * DYN-1729 * Converters.cs * PublishPackageViewModel.cs * PackageManagerSearchView.xaml.cs * PythonServices.cs * StartupUtils.cs * DynamoConverters.xaml * NodeInputData.cs * DyanmoModel.cs * PreferenceSettings.cs * NodeModel.cs * DynamoUnitsDisplay.cs * Function.cs * DynamoModelEventTest.cs * Revert "NodeInputData.cs" This reverts commit c9fc4e896dbffc3e8aa27938aa1d1e2d61702c66. * Revert "AssociativeAST.cs" This reverts commit b546950934b68655437e2d6ba5bd01c6d3a23e99. * Revert "Watch3DView.xaml.cs" This reverts commit 869991f492ca569e4d9f8733cf1437ab66f6d130. * Revert "HelixWatch3DViewModel.cs" This reverts commit dd7024d80faa1da6030055563ac116f5e8e31462. * Revert "DynamoPointGeometryModel3D.cs" This reverts commit 7c06198d945ea4d5d27136ce61aed9ff6d8c13c6. * Revert "DynamoLineGeometryModel3D.cs" This reverts commit d790e1186acd37c4c3fc16556cdff6c2eabbbdf3. * Revert "DynamoGeometryModel3D.cs" This reverts commit 575c2d74b6d6b99c833445e25a466398e800e611. * Revert "DynamoEffectsManager.cs" This reverts commit 4f28416198fafec02b9b26e04b153aa965755b52. * Revert "AttachedProperties.cs" This reverts commit 770e5c32a2fe3a5899a733d12cf974eebf844df7. * Revert "HelixRenderPackage.cs" This reverts commit d31acc0b6e67da6904169849ed4cceb9b923ddab. * NodeInputData.cs * Revert "DYN-1729" This reverts commit 55b445b8d2df7e0b786ff84aa45eae254fb4956e. * DYN-1729 * Revert "NodeViewCustomizations.cs" This reverts commit 30f05f3caf13f5429f4b8155be48e6a71ad1f249. * Revert "ViewLoadedParams.cs" This reverts commit 436d828c56afec5aeaab01153b23bbf165ed0e24. * ViewLoadedParams.cs * NodeModelAssemblyLoader.cs * StartupUtils.cs * NodeModel.cs * Revert "PreferenceSettings.cs" This reverts commit 3a13eab8c125429eba0bc62c6a0e4fbaa2ba7df8. * ViewLoadedParams * Fix view extension * Add back tests --- src/DynamoApplications/StartupUtils.cs | 2 - .../Configuration/Configurations.cs | 18 --- src/DynamoCore/Configuration/IPathResolver.cs | 6 - src/DynamoCore/Configuration/IPreferences.cs | 2 +- src/DynamoCore/Configuration/PathManager.cs | 10 -- .../Configuration/PreferenceSettings.cs | 2 +- .../Core/NodeModelAssemblyLoader.cs | 4 +- .../CodeGeneration/CompiledEventArgs.cs | 14 +- .../CodeGeneration/CompilingEventArgs.cs | 14 +- src/DynamoCore/Engine/EngineController.cs | 11 -- src/DynamoCore/Extensions/StartupParams.cs | 44 ------ .../Graph/Nodes/CustomNodes/Function.cs | 16 +-- src/DynamoCore/Graph/Nodes/NodeInputData.cs | 6 +- src/DynamoCore/Graph/Nodes/NodeModel.cs | 96 +------------ src/DynamoCore/Graph/Nodes/NodeOutputData.cs | 10 -- .../Graph/Workspaces/HomeWorkspaceModel.cs | 82 +---------- .../Workspaces/SerializationConverters.cs | 21 --- .../Graph/Workspaces/WorkspaceModel.cs | 22 --- src/DynamoCore/Library/LibraryServices.cs | 11 -- .../Logging/DynamoAnalyticsClient.cs | 7 - src/DynamoCore/Logging/DynamoLogger.cs | 66 --------- src/DynamoCore/Logging/IAnalyticsSession.cs | 7 +- src/DynamoCore/Models/DynamoModel.cs | 20 +-- src/DynamoCore/Models/DynamoModelCommands.cs | 2 +- src/DynamoCore/Models/DynamoModelEvents.cs | 14 -- .../Scheduler/UpdateGraphAsyncTask.cs | 4 +- .../DefaultRenderPackageFactory.cs | 2 +- src/DynamoCoreWpf/Commands/DynamoCommands.cs | 2 +- .../Extensions/ViewLoadedParams.cs | 6 - src/DynamoCoreWpf/Properties/AssemblyInfo.cs | 2 + .../Rendering/HelixRenderPackage.cs | 39 +----- src/DynamoCoreWpf/UI/Converters.cs | 56 +------- .../UI/SharedResourceDictionary.cs | 8 -- .../UI/Themes/Modern/DynamoConverters.xaml | 1 - .../ViewModels/Core/AnnotationViewModel.cs | 9 -- .../ViewModels/Core/DynamoViewModel.cs | 4 +- .../Core/DynamoViewModelDelegateCommands.cs | 6 - .../ViewModels/Core/DynamoViewModelEvents.cs | 34 ----- .../ViewModels/Core/NodeViewModel.cs | 15 +-- .../ViewModels/Core/PortViewModel.cs | 110 +-------------- .../ViewModels/Menu/PreferencesViewModel.cs | 21 --- .../PackageManagerClientViewModel.cs | 27 +--- .../PackageManagerSearchElementViewModel.cs | 5 - .../PackageManager/PackagePathViewModel.cs | 2 - .../PackageManager/PackageViewModel.cs | 6 - .../PackageManager/PublishPackageViewModel.cs | 9 -- .../Watch3D/DynamoGeometryModel3D.cs | 2 +- .../CodeCompletionEditor.xaml.cs | 11 -- .../PackageManagerSearchView.xaml.cs | 3 +- src/DynamoManipulation/NodeManipulator.cs | 9 +- src/DynamoPackages/Package.cs | 16 --- src/DynamoPackages/PackageDownloadHandle.cs | 24 +--- src/DynamoPackages/PackageLoader.cs | 67 --------- src/DynamoPackages/PackageManagerClient.cs | 20 --- .../PackageManagerSearchElement.cs | 34 ----- src/DynamoPackages/PackageUtilities.cs | 34 ----- .../PackageManagerViewExtension.cs | 2 +- src/DynamoUtilities/PathHelper.cs | 13 -- src/Engine/ProtoCore/AssociativeGraph.cs | 20 --- src/Engine/ProtoCore/Core.cs | 8 -- src/Engine/ProtoCore/DSASM/Executable.cs | 7 +- src/Engine/ProtoCore/FFI/CLRDLLModule.cs | 4 - .../ProtoCore/FFI/CLRFFIFunctionPointer.cs | 127 +----------------- src/Engine/ProtoCore/FFI/FFIHandler.cs | 4 +- src/Engine/ProtoCore/FFI/PInvokeFFI.cs | 6 - src/Engine/ProtoCore/Parser/AssociativeAST.cs | 59 -------- src/Engine/ProtoCore/ProcedureTable.cs | 31 ----- src/Engine/ProtoCore/Reflection/MirrorData.cs | 27 ---- .../SyntaxAnalysis/AssociativeAstVisitor.cs | 14 +- .../ProtoCore/SyntaxAnalysis/AstVisitor.cs | 6 - .../SyntaxAnalysis/Interface/Associative.cs | 3 - src/Engine/ProtoCore/Utils/ClassUtils.cs | 35 +---- src/Engine/ProtoCore/Utils/CompilerUtils.cs | 16 --- src/Engine/ProtoCore/Utils/MathUtils.cs | 26 +--- src/Engine/ProtoScript/Runners/LiveRunner.cs | 14 -- .../GraphNodeManagerViewModel.cs | 3 +- .../CoreNodeModels/Input/BasicInteractive.cs | 9 +- .../CoreNodeModels/Input/BoolSelector.cs | 6 +- .../CoreNodeModels/Input/CustomSelection.cs | 33 +---- .../CoreNodeModels/Input/DateTime.cs | 4 +- src/Libraries/CoreNodeModels/Input/String.cs | 9 +- src/Libraries/CoreNodes/Python.cs | 21 +-- src/Libraries/DSCPython/CPythonEvaluator.cs | 5 - .../DynamoUnits/Properties/AssemblyInfo.cs | 4 - src/Libraries/DynamoUnits/Units.cs | 30 ++--- .../UnitsNodeModels/UnitNodeModels.cs | 7 +- .../UnitsUI/NodeViewCustomizations.cs | 8 +- .../LibraryViewController.cs | 14 -- .../ScriptingObject.cs | 5 - src/NodeServices/Analytics.cs | 13 -- src/NodeServices/DynamoUnitsDisplay.cs | 4 +- src/NodeServices/GraphicsDataInterfaces.cs | 2 +- src/NodeServices/IAnalyticsClient.cs | 7 - src/NodeServices/Properties/AssemblyInfo.cs | 1 + src/NodeServices/PythonServices.cs | 4 +- src/Tools/DynamoShapeManager/Utilities.cs | 77 ----------- .../WorkspaceDependencyViewExtension.cs | 5 - test/DynamoCoreTests/AnalyticsTests.cs | 3 - .../Graph/Nodes/NodeModelTests.cs | 7 +- .../Logging/DynamoLoggerTest.cs | 4 +- .../Models/DynamoModelEventsTest.cs | 8 +- test/DynamoCoreTests/Nodes/FormulaTests.cs | 4 +- test/DynamoCoreWpfTests/ConverterTests.cs | 20 --- .../PackageManagerExtensionLoadingTests.cs | 4 +- .../PublishPackageViewModelTests.cs | 2 +- test/DynamoCoreWpfTests/WorkspaceSaving.cs | 2 +- .../LiveRunnerTests/MicroFeatureTests.cs | 44 +++--- .../DynamoPythonTests/PythonEvalTests.cs | 2 +- .../PackageManagerClientTests.cs | 51 ------- .../PackageUtilitiesTests.cs | 60 --------- .../DynamoApplicationTests.cs | 3 +- .../bin/SampleViewExtension.dll | Bin 9728 -> 7168 bytes .../en-US/SampleViewExtension.resources.dll | Bin 0 -> 4096 bytes test/pkgs/sampleViewExtension/pkg.json | 18 ++- 114 files changed, 154 insertions(+), 1866 deletions(-) delete mode 100644 src/DynamoPackages/PackageUtilities.cs delete mode 100644 test/Libraries/PackageManagerTests/PackageUtilitiesTests.cs create mode 100644 test/pkgs/sampleViewExtension/bin/en-US/SampleViewExtension.resources.dll diff --git a/src/DynamoApplications/StartupUtils.cs b/src/DynamoApplications/StartupUtils.cs index d45ba8928e0..34ea0111b6d 100644 --- a/src/DynamoApplications/StartupUtils.cs +++ b/src/DynamoApplications/StartupUtils.cs @@ -131,8 +131,6 @@ internal void SetDisableAnalytics() public bool NoConsole { get; set; } public string UserDataFolder { get; set; } public string CommonDataFolder { get; set; } - [Obsolete("This property will be removed in Dynamo 3.0 - please use AnalyticsInfo")] - public string HostName { get; set; } public bool DisableAnalytics { get; set; } public bool NoNetworkMode { get; set; } public HostAnalyticsInfo AnalyticsInfo { get; set; } diff --git a/src/DynamoCore/Configuration/Configurations.cs b/src/DynamoCore/Configuration/Configurations.cs index bd42b49c333..af406801340 100644 --- a/src/DynamoCore/Configuration/Configurations.cs +++ b/src/DynamoCore/Configuration/Configurations.cs @@ -38,18 +38,6 @@ public class Configurations /// public static readonly double IntegerSliderTextBoxWidth = 30.0; - /// - /// Maximum width of Watch Node - /// - [Obsolete("This property is no longer used. Remove in Dynamo 3.0")] - public static readonly double MaxWatchNodeWidth = 280.0; - - /// - /// Maximum height of Watch Node - /// - [Obsolete("This property is no longer used. Remove in Dynamo 3.0")] - public static readonly double MaxWatchNodeHeight = 310.0; - #endregion #region Usage Reporting Error Message @@ -252,12 +240,6 @@ public class Configurations #region CodeBlockNode - /// - /// Default height of CodeBlock's port. Now obsolete. - /// Inputs height are set in the normal way, outputs height is set to CodeBlockOutputPortHeightInPixels - /// - [Obsolete] public static readonly double CodeBlockPortHeightInPixels = 17.573333333333336; - /// /// Code Block outputs have a condensed port height /// diff --git a/src/DynamoCore/Configuration/IPathResolver.cs b/src/DynamoCore/Configuration/IPathResolver.cs index 2a28ec40a0d..5273787238a 100644 --- a/src/DynamoCore/Configuration/IPathResolver.cs +++ b/src/DynamoCore/Configuration/IPathResolver.cs @@ -173,12 +173,6 @@ public interface IPathManager /// string PythonTemplateFilePath { get; } - /// - /// Full path to the legacy GalleryContent xml file. - /// - [System.Obsolete("This property will be removed in Dynamo 3.0")] - string GalleryFilePath { get; } - /// /// Folders in which node assemblies can be located. /// diff --git a/src/DynamoCore/Configuration/IPreferences.cs b/src/DynamoCore/Configuration/IPreferences.cs index 7798668f18b..4134b2705c2 100644 --- a/src/DynamoCore/Configuration/IPreferences.cs +++ b/src/DynamoCore/Configuration/IPreferences.cs @@ -49,7 +49,7 @@ public interface IPreferences /// /// Indicates whether background preview is active or not. /// - [Obsolete("Property will be deprecated in Dynamo 3.0, please use BackgroundPreviews")] + [Obsolete("Property will be deprecated in a future version of Dynamo, please use BackgroundPreviews")] bool IsBackgroundPreviewActive { get; set; } /// diff --git a/src/DynamoCore/Configuration/PathManager.cs b/src/DynamoCore/Configuration/PathManager.cs index a05e97f7f1c..6a794e8ab04 100644 --- a/src/DynamoCore/Configuration/PathManager.cs +++ b/src/DynamoCore/Configuration/PathManager.cs @@ -66,13 +66,9 @@ internal static Lazy public const string ViewExtensionsDirectoryName = "viewExtensions"; public const string DefinitionsDirectoryName = "definitions"; public const string SamplesDirectoryName = "samples"; - [Obsolete("This property will be removed in Dynamo 3.0")] - public const string GalleryDirectoryName = "gallery"; public const string BackupDirectoryName = "backup"; public const string PreferenceSettingsFileName = "DynamoSettings.xml"; public const string PythonTemplateFileName = "PythonTemplate.py"; - [Obsolete("This property will be removed in Dynamo 3.0")] - public const string GalleryContentsFileName = "GalleryContents.xml"; private readonly int majorFileVersion; private readonly int minorFileVersion; @@ -264,12 +260,6 @@ public string PythonTemplateFilePath get { return pythonTemplateFilePath; } } - [Obsolete("This property will be removed in Dynamo 3.0")] - public string GalleryFilePath - { - get; - } - public IEnumerable NodeDirectories { get { return nodeDirectories; } diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs index f480519c04b..bab27fa97f6 100644 --- a/src/DynamoCore/Configuration/PreferenceSettings.cs +++ b/src/DynamoCore/Configuration/PreferenceSettings.cs @@ -333,7 +333,7 @@ public double DefaultScaleFactor /// /// Indicates whether background preview is active or not. /// - [Obsolete("Property will be deprecated in Dynamo 3.0, please use BackgroundPreviews")] + [Obsolete("Property will be deprecated in a future version of Dynamo, please use BackgroundPreviews")] public bool IsBackgroundPreviewActive { get diff --git a/src/DynamoCore/Core/NodeModelAssemblyLoader.cs b/src/DynamoCore/Core/NodeModelAssemblyLoader.cs index 26cc971aa82..fe5cc404f54 100644 --- a/src/DynamoCore/Core/NodeModelAssemblyLoader.cs +++ b/src/DynamoCore/Core/NodeModelAssemblyLoader.cs @@ -23,9 +23,9 @@ public class NodeModelAssemblyLoader : LogSourceBase /// /// Used at startup to avoid reloading NodeModels from assemblies that have already been loaded. /// Is NOT kept in sync with latest loaded assemblies - use LoadedAssemblies Property for that. + /// TODO refactor and use LoadedAssemblies instead /// - [Obsolete("Will be made internal, please use LoadedAssemblies Property.")] - public readonly HashSet LoadedAssemblyNames = new HashSet(); + internal readonly HashSet LoadedAssemblyNames = new HashSet(); private readonly HashSet loadedAssemblies = new HashSet(); /// diff --git a/src/DynamoCore/Engine/CodeGeneration/CompiledEventArgs.cs b/src/DynamoCore/Engine/CodeGeneration/CompiledEventArgs.cs index ac1e69c3a68..b06596a0c49 100644 --- a/src/DynamoCore/Engine/CodeGeneration/CompiledEventArgs.cs +++ b/src/DynamoCore/Engine/CodeGeneration/CompiledEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using ProtoCore.AST.AssociativeAST; @@ -23,18 +23,6 @@ internal CompiledEventArgs(Guid node, IEnumerable astNodes) AstNodes = astNodes; } - /// - /// Guid of node that has been built to AST nodes. - /// - [Obsolete("This item is being obsoleted due to the confusing namimg, the new property to use is NodeId")] - public Guid Node - { - get - { - return nodeId; - } - } - /// /// Guid of node that has been built to AST nodes. /// diff --git a/src/DynamoCore/Engine/CodeGeneration/CompilingEventArgs.cs b/src/DynamoCore/Engine/CodeGeneration/CompilingEventArgs.cs index fe07701fbcd..ca4739b77f2 100644 --- a/src/DynamoCore/Engine/CodeGeneration/CompilingEventArgs.cs +++ b/src/DynamoCore/Engine/CodeGeneration/CompilingEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Dynamo.Engine.CodeGeneration { @@ -15,18 +15,6 @@ public CompilingEventArgs(Guid node) nodeId = node; } - /// - /// Guid of NodeModel that is being compiled to AST. - /// - [Obsolete("This item is being obsoleted due to the incorrect namimg, the new property to use is NodeId")] - public Guid Node - { - get - { - return nodeId; - } - } - /// /// Guid of NodeModel that is being compiled to AST. /// diff --git a/src/DynamoCore/Engine/EngineController.cs b/src/DynamoCore/Engine/EngineController.cs index 63b9b665a95..8b0d030da7c 100644 --- a/src/DynamoCore/Engine/EngineController.cs +++ b/src/DynamoCore/Engine/EngineController.cs @@ -655,17 +655,6 @@ public CompilationServices(LibraryServices libraryServices) priorNames = libraryServices.GetPriorNames(); } - /// - /// Pre-compiles Design script code in code block node. - /// - /// Container for compilation related parameters - /// true if code compilation succeeds, false otherwise - [Obsolete("This method is deprecated and will be removed in Dynamo 3.0")] - public bool PreCompileCodeBlock(ref ParseParam parseParams) - { - return CompilerUtils.PreCompileCodeBlock(compilationCore, parseParams, priorNames); - } - /// /// Pre-compiles Design script code in code block node. /// diff --git a/src/DynamoCore/Extensions/StartupParams.cs b/src/DynamoCore/Extensions/StartupParams.cs index 033a800e4f5..bc5789c8729 100644 --- a/src/DynamoCore/Extensions/StartupParams.cs +++ b/src/DynamoCore/Extensions/StartupParams.cs @@ -67,50 +67,6 @@ public class StartupParams /// internal bool IsGeometryLibraryLoaded { get; } - /// - /// Initializes a new instance of the class. - /// - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - [Obsolete("Use internal constructor")] - public StartupParams(IAuthProvider provider, IPathManager pathManager, - ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, - Version dynamoVersion, IPreferences preferences) - { - this.authProvider = provider; - this.pathManager = pathManager; - this.libraryLoader = libraryLoader; - this.customNodeManager = customNodeManager; - this.dynamoVersion = dynamoVersion; - this.preferences = preferences; - } - /// - /// Initializes a new instance of the class. - /// - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel - /// for DynamoModel> - [Obsolete("Use internal constructor")] - public StartupParams(IAuthProvider provider, IPathManager pathManager, - ILibraryLoader libraryLoader, ICustomNodeManager customNodeManager, - Version dynamoVersion, IPreferences preferences, LinterManager linterManager) - { - this.authProvider = provider; - this.pathManager = pathManager; - this.libraryLoader = libraryLoader; - this.customNodeManager = customNodeManager; - this.dynamoVersion = dynamoVersion; - this.preferences = preferences; - this.linterManager = linterManager; - } /// /// Initializes a new instance of the class. /// diff --git a/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs b/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs index 8073e42cbf0..50c6c683ed2 100644 --- a/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs +++ b/src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs @@ -394,12 +394,10 @@ public Symbol() ElementResolver = new ElementResolver(); } - // TODO - Dynamo 3.0 - use JSONConstructor on this method - // and remove custom logic in nodeReadConverter for symbol nodes. - /// /// Initializes a new instance of the class. /// + [JsonConstructor] public Symbol(IEnumerable inPorts, IEnumerable outPorts, TypedParameter parameter, ElementResolver elementResolver) : base(inPorts, outPorts) { ArgumentLacing = LacingStrategy.Disabled; @@ -407,18 +405,6 @@ public Symbol(IEnumerable inPorts, IEnumerable outPorts, T ElementResolver = elementResolver ?? new ElementResolver(); } - /// - /// Initializes a new instance of the class. - /// - [JsonConstructor] - [Obsolete("This method will be removed in Dynamo 3.0 - please use the constructor with ElementResolver parameter ")] - public Symbol(IEnumerable inPorts, IEnumerable outPorts, TypedParameter parameter) : base(inPorts, outPorts) - { - ArgumentLacing = LacingStrategy.Disabled; - InputSymbol = parameter.ToCommentNameString(); - ElementResolver = new ElementResolver(); - } - /// /// Represents string input. /// diff --git a/src/DynamoCore/Graph/Nodes/NodeInputData.cs b/src/DynamoCore/Graph/Nodes/NodeInputData.cs index e0a7ce8b617..b07816482bf 100644 --- a/src/DynamoCore/Graph/Nodes/NodeInputData.cs +++ b/src/DynamoCore/Graph/Nodes/NodeInputData.cs @@ -14,7 +14,7 @@ namespace Dynamo.Graph.Nodes // So Type2 is not deserialized at all in previous versions of Dynamo. // Type's setter limits the possible values to a subset of the enum to avoid clients setting this to a value that would break file // deserialization in previous dynamo versions. - // TODO We should unify these properties (Type and Type2) when possible (Dynamo 3.x) + // TODO We should unify these properties (Type and Type2) when possible n a future version of dynamo /// /// Possible graph input types. @@ -140,8 +140,8 @@ public NodeInputTypes Type {typeof(float),NodeInputTypes.numberInput}, }; - [Obsolete("To be removed in Dynamo 3.x")] - public static NodeInputTypes getNodeInputTypeFromType(Type type) + [Obsolete("To be removed in a future version of Dynamo")] + internal static NodeInputTypes GetNodeInputTypeFromType(Type type) { NodeInputTypes output; if (dotNetTypeToNodeInputType.TryGetValue(type, out output)) diff --git a/src/DynamoCore/Graph/Nodes/NodeModel.cs b/src/DynamoCore/Graph/Nodes/NodeModel.cs index bf3f3df1859..3c7ee595848 100644 --- a/src/DynamoCore/Graph/Nodes/NodeModel.cs +++ b/src/DynamoCore/Graph/Nodes/NodeModel.cs @@ -403,28 +403,6 @@ public bool IsInErrorState [JsonIgnore] public bool PreviewPinned { get; internal set; } - /// - /// Text that is displayed as this Node's tooltip. - /// - [JsonIgnore] - [Obsolete("This property is deprecated and will be removed in a future version of Dynamo.")] - public string ToolTipText - { - get - { - var builder = new System.Text.StringBuilder(); - foreach(var info in Infos) - { - builder.AppendLine(info.ToString()); - } - return builder.ToString(); - } - set - { - RaisePropertyChanged(nameof(ToolTipText)); - } - } - /// /// Collection of warnings, errors and info items applied to the NodeModel. /// @@ -476,12 +454,6 @@ public string Name public ObservableCollection InPorts { get { return inPorts; } - [IsObsolete("Property setter will be deprecated in Dynamo 3.0")] - set - { - inPorts = value; - RaisePropertyChanged("InPorts"); - } } /// @@ -491,12 +463,6 @@ public ObservableCollection InPorts public ObservableCollection OutPorts { get { return outPorts; } - [IsObsolete("Property setter will be deprecated in Dynamo 3.0")] - set - { - outPorts = value; - RaisePropertyChanged("OutPorts"); - } } [JsonIgnore] @@ -1870,18 +1836,6 @@ public void Error(string p) infos.Add(new Info(p, ElementState.Error)); } - /// - /// Set an info on a node. - /// - /// The info text. - [Obsolete("Info(string p) is deprecated, please use Info(string p, bool isPersistent = false) instead.")] - - public void Info(string p) - { - State = ElementState.Info; - infos.Add(new Info(p, ElementState.Info)); - } - /// /// Set an info on a node. /// @@ -1987,6 +1941,7 @@ internal double GetPortVerticalOffset(PortModel portModel) /// /// Reads inputs list and adds ports for each input. + /// TODO: DYN-6445 - evaluate if this API can be removed. /// [Obsolete("RegisterInputPorts is deprecated, please use the InPortNamesAttribute, InPortDescriptionsAttribute, and InPortTypesAttribute instead.")] public void RegisterInputPorts(IEnumerable portDatas) @@ -2012,6 +1967,7 @@ public void RegisterInputPorts(IEnumerable portDatas) /// /// Reads outputs list and adds ports for each output + /// TODO: DYN-6445 - evaluate if this API can be removed. /// [Obsolete("RegisterOutputPorts is deprecated, please use the OutPortNamesAttribute, OutPortDescriptionsAttribute, and OutPortTypesAttribute instead.")] public void RegisterOutputPorts(IEnumerable portDatas) @@ -2255,54 +2211,6 @@ private void OnPortDisconnected(PortModel port, ConnectorModel connector) #endregion - #region Code Serialization - - /// - /// Creates a Scheme representation of this dynNode and all connected dynNodes. - /// - /// S-Expression - [Obsolete("PrintExpression is deprecated and will be removed, please refer to the Node2Code functionality instead for conversion to DesignScript code.")] - public virtual string PrintExpression() - { - string nick = Name.Replace(' ', '_'); - - if (!InPorts.Any(p => p.IsConnected)) - return nick; - - string s = ""; - - if (InPorts.All(p => p.IsConnected)) - { - s += "(" + nick; - foreach (int data in Enumerable.Range(0, InPorts.Count)) - { - Tuple input; - TryGetInput(data, out input); - s += " " + input.Item2.PrintExpression(); - } - s += ")"; - } - else - { - s += "(lambda (" + string.Join(" ", InPorts.Where((_, i) => !InPorts[i].IsConnected).Select(x => x.Name)) - + ") (" + nick; - foreach (int data in Enumerable.Range(0, InPorts.Count)) - { - s += " "; - Tuple input; - if (TryGetInput(data, out input)) - s += input.Item2.PrintExpression(); - else - s += InPorts[data].Name; - } - s += "))"; - } - - return s; - } - - #endregion - #region ISelectable Interface public override void Deselect() diff --git a/src/DynamoCore/Graph/Nodes/NodeOutputData.cs b/src/DynamoCore/Graph/Nodes/NodeOutputData.cs index 37745222dea..4ae6066335f 100644 --- a/src/DynamoCore/Graph/Nodes/NodeOutputData.cs +++ b/src/DynamoCore/Graph/Nodes/NodeOutputData.cs @@ -49,16 +49,6 @@ public class NodeOutputData /// public string InitialValue { get; set; } /// - /// Obsolete property due to typo in API. Please use InitialValue. - /// - [JsonIgnore] - [Obsolete("Property will be deprecated in Dynamo 3.0, please use InitialValue")] - public string IntitialValue - { - get { return InitialValue; } - set { InitialValue = value; } - } - /// /// Description displayed to user of this output node. /// public string Description { get; set; } diff --git a/src/DynamoCore/Graph/Workspaces/HomeWorkspaceModel.cs b/src/DynamoCore/Graph/Workspaces/HomeWorkspaceModel.cs index fece34b574f..412a2e00891 100644 --- a/src/DynamoCore/Graph/Workspaces/HomeWorkspaceModel.cs +++ b/src/DynamoCore/Graph/Workspaces/HomeWorkspaceModel.cs @@ -285,32 +285,6 @@ internal virtual void OnSetNodeDeltaState(DeltaComputeStateEventArgs e) #region Constructors - /// - /// Initializes a new empty instance of the class - /// - /// object assosiated with this home workspace - /// to coordinate the interactions between some DesignScript sub components. - /// object to add tasks in queue to execute - /// Node factory to create nodes - /// Indicates if detailed descriptions should be logged - /// Indicates if current code is running in tests - /// Name of file where the workspace is saved - [Obsolete("please use the version with linterManager parameter.")] - public HomeWorkspaceModel(EngineController engine, DynamoScheduler scheduler, - NodeFactory factory, bool verboseLogging, bool isTestMode, string fileName = "") - : this(engine, - scheduler, - factory, - Enumerable.Empty>>(), - Enumerable.Empty(), - Enumerable.Empty(), - Enumerable.Empty(), - Enumerable.Empty(), - new ElementResolver(), - new WorkspaceInfo() { FileName = fileName, Name = "Home" }, - verboseLogging, - isTestMode) { } - /// /// Initializes a new empty instance of the class /// @@ -339,22 +313,6 @@ public HomeWorkspaceModel(EngineController engine, DynamoScheduler scheduler, linterManager) { } - [Obsolete("please use the version with linterManager parameter.")] - public HomeWorkspaceModel(Guid guid, EngineController engine, - DynamoScheduler scheduler, - NodeFactory factory, - IEnumerable>> traceData, - IEnumerable nodes, - IEnumerable notes, - IEnumerable annotations, - IEnumerable presets, - ElementResolver resolver, - WorkspaceInfo info, - bool verboseLogging, - bool isTestMode):this(engine, scheduler, factory, traceData, nodes, notes, - annotations, presets, resolver, info, verboseLogging, isTestMode) - { Guid = guid; } - public HomeWorkspaceModel(Guid guid, EngineController engine, DynamoScheduler scheduler, NodeFactory factory, @@ -371,42 +329,6 @@ public HomeWorkspaceModel(Guid guid, EngineController engine, annotations, presets, resolver, info, verboseLogging, isTestMode, linterManager) { Guid = guid; } - /// - /// Initializes a new instance of the class - /// by given information about it and specified item collections - /// - /// object assosiated with this home workspace - /// to coordinate the interactions between some DesignScript sub components. - /// object to add tasks in queue to execute - /// Node factory to create nodes - /// Preloaded trace data - /// Node collection of the workspace - /// Note collection of the workspace - /// Group collection of the workspace - /// Preset collection of the workspace - /// ElementResolver responsible for resolving - /// a partial class name to its fully resolved name - /// Information for creating custom node workspace - /// Indicates if detailed descriptions should be logged - /// Indicates if current code is running in tests - [Obsolete("please use the version with linterManager parameter.")] - public HomeWorkspaceModel(EngineController engine, - DynamoScheduler scheduler, - NodeFactory factory, - IEnumerable>> traceData, - IEnumerable nodes, - IEnumerable notes, - IEnumerable annotations, - IEnumerable presets, - ElementResolver resolver, - WorkspaceInfo info, - bool verboseLogging, - bool isTestMode) - : base(nodes, notes,annotations, info, factory,presets, resolver) - { - InitializeHomeWorkspace(engine, traceData, scheduler, info, verboseLogging, isTestMode); - } - /// /// Initializes a new instance of the class /// by given information about it and specified item collections @@ -776,7 +698,7 @@ private void OnUpdateGraphCompleted(AsyncTask task) var node = workspace.Nodes.FirstOrDefault(n => n.GUID == guid); if (node == null) continue; - using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.ToolTipText), nameof(NodeModel.Infos), nameof(NodeModel.State))) + using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.Infos), nameof(NodeModel.State))) { node.Warning(warning.Value); // Update node warning message. } @@ -789,7 +711,7 @@ private void OnUpdateGraphCompleted(AsyncTask task) var node = workspace.Nodes.FirstOrDefault(n => n.GUID == guid); if (node == null) continue; - using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.ToolTipText), nameof(NodeModel.Infos), nameof(NodeModel.State))) + using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.Infos), nameof(NodeModel.State))) { node.Info(string.Join(Environment.NewLine, info.Value.Select(w => w.Message))); } diff --git a/src/DynamoCore/Graph/Workspaces/SerializationConverters.cs b/src/DynamoCore/Graph/Workspaces/SerializationConverters.cs index 4fa4b7dda3d..713e095b9e9 100644 --- a/src/DynamoCore/Graph/Workspaces/SerializationConverters.cs +++ b/src/DynamoCore/Graph/Workspaces/SerializationConverters.cs @@ -77,22 +77,6 @@ private CodeBlockNodeModel DeserializeAsCBN(string code, JObject obj, Guid guid) return codeBlockNode; } - - - [Obsolete("This constructor will be removed in Dynamo 3.0, please use new NodeReadConverter constructor with additional parameters to support node migration.")] - public NodeReadConverter(CustomNodeManager manager, LibraryServices libraryServices, bool isTestMode = false) - { - this.manager = manager; - this.libraryServices = libraryServices; - this.isTestMode = isTestMode; - // We only do this in test mode because it should not be required- - // see comment below in NodeReadConverter.ReadJson - and it could be slow. - if (this.isTestMode) - { - this.loadedAssemblies = this.buildMapOfLoadedAssemblies(); - } - } - public NodeReadConverter(CustomNodeManager manager, LibraryServices libraryServices, NodeFactory nodeFactory, bool isTestMode = false) { this.manager = manager; @@ -293,11 +277,6 @@ public override object ReadJson(JsonReader reader, Type objectType, object exist { node = (NodeModel)obj.ToObject(type); - // if node is an customNode input symbol - assign the element resolver. - if(node is Nodes.CustomNodes.Symbol) - { - (node as Nodes.CustomNodes.Symbol).ElementResolver = ElementResolver; - } // We don't need to remap ports for any nodes with json constructors which pass ports remapPorts = false; } diff --git a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs index f11681ff4fe..23ff3951986 100644 --- a/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs +++ b/src/DynamoCore/Graph/Workspaces/WorkspaceModel.cs @@ -2040,28 +2040,6 @@ internal bool containsInvalidInputSymbols() return this.Nodes.OfType().Any(node => !node.Parameter.NameIsValid); } - [Obsolete("Method will be deprecated in Dynamo 3.0.")] - private void SerializeElementResolver(XmlDocument xmlDoc) - { - Debug.Assert(xmlDoc != null); - - var root = xmlDoc.DocumentElement; - - var mapElement = xmlDoc.CreateElement("NamespaceResolutionMap"); - - foreach (var element in ElementResolver.ResolutionMap) - { - var resolverElement = xmlDoc.CreateElement("ClassMap"); - - resolverElement.SetAttribute("partialName", element.Key); - resolverElement.SetAttribute("resolvedName", element.Value.Key); - resolverElement.SetAttribute("assemblyName", element.Value.Value); - - mapElement.AppendChild(resolverElement); - } - root.AppendChild(mapElement); - } - internal void SendModelEvent(Guid modelGuid, string eventName, int value) { var retrievedModel = GetModelInternal(modelGuid); diff --git a/src/DynamoCore/Library/LibraryServices.cs b/src/DynamoCore/Library/LibraryServices.cs index 8eb8ef867f8..6b78418f09e 100644 --- a/src/DynamoCore/Library/LibraryServices.cs +++ b/src/DynamoCore/Library/LibraryServices.cs @@ -1170,22 +1170,11 @@ public LibraryLoadFailedEventArgs(string libraryPath, string reason, bool throwO public class LibraryLoadedEventArgs : EventArgs { - // TODO: Remove in 3.0 - [Obsolete("This constructor is obsolete. Use constructor that accepts collection of library paths instead.")] - public LibraryLoadedEventArgs(string libraryPath) - { - LibraryPath = libraryPath; - } - public LibraryLoadedEventArgs(IEnumerable libraryPaths) { LibraryPaths = libraryPaths; } - // TODO: Remove in 3.0 - [Obsolete("This property is obsolete. Use property LibraryPaths that returns collection of paths instead.")] - public string LibraryPath { get; } - /// /// Paths to libraries that are loaded. /// diff --git a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs index 333dbf54117..f1e3dafab6b 100644 --- a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs +++ b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs @@ -37,8 +37,6 @@ public void Dispose() public string UserId { get; private set; } public string SessionId { get; private set; } - [Obsolete("Do not use, will be removed, was only used by legacy instrumentation.")] - public ILogger Logger => throw new NotImplementedException(); public static String GetUserID() { @@ -464,11 +462,6 @@ private FileOperationEvent.Actions FileAction(Actions operation) throw new ArgumentException("Invalid action for FileOperation."); } - [Obsolete("Function will be removed in Dynamo 3.0 as Dynamo will no longer support GA instrumentation.")] - public void LogPiiInfo(string tag, string data) - { - } - public void Dispose() { // If the Analytics Client was initialized, shut it down. diff --git a/src/DynamoCore/Logging/DynamoLogger.cs b/src/DynamoCore/Logging/DynamoLogger.cs index 1fa7d6b6d08..23bbe0b620f 100644 --- a/src/DynamoCore/Logging/DynamoLogger.cs +++ b/src/DynamoCore/Logging/DynamoLogger.cs @@ -154,68 +154,6 @@ public IEnumerable StartupNotifications get { return notifications; } } - /// - /// Initializes a new instance of class - /// with specified debug settings and directory where to write logs - /// - /// Debug settings - /// Directory path where log file will be written - [Obsolete("This will be removed in 3.0, please use DynamoLogger(debugSettings, logDirectory, isTestMode, isCLIMode, isServiceMode) instead.")] - public DynamoLogger(DebugSettings debugSettings, string logDirectory) : this(debugSettings, logDirectory, false) - { - - } - - /// - /// Initializes a new instance of class - /// with specified debug settings and directory where to write logs - /// - /// Debug settings - /// Directory path where log file will be written - /// Test mode is true or false. - [Obsolete("This will be removed in 3.0, please use DynamoLogger(debugSettings, logDirectory, isTestMode, isCLIMode, isServiceMode) instead.")] - public DynamoLogger(DebugSettings debugSettings, string logDirectory, Boolean isTestMode) - { - lock (guardMutex) - { - this.debugSettings = debugSettings; - _isDisposed = false; - - WarningLevel = WarningLevel.Mild; - Warning = ""; - - notifications = new List(); - - testMode = isTestMode; - - if (!testMode) - { - StartLoggingToConsoleAndFile(logDirectory); - } - - XmlDocumentationExtensions.LogToConsole += Log; - } - } - - /// - /// Initializes a new instance of class - /// with specified debug settings and directory where to write logs - /// - /// Debug settings - /// Directory path where log file will be written - /// Test mode is true or false. - /// We want to allow logging when CLI mode is true even if we are in test mode. - [Obsolete("This will be removed in 3.0, please use DynamoLogger(debugSettings, logDirectory, isTestMode, isCLIMode, isServiceMode) instead.")] - public DynamoLogger(DebugSettings debugSettings, string logDirectory, Boolean isTestMode, Boolean isCLIMode) - :this(debugSettings, logDirectory, isTestMode) - { - cliMode = isCLIMode; - if (cliMode) - { - StartLoggingToConsoleAndFile(logDirectory); - } - } - /// /// Initializes a new instance of class /// with specified debug settings and directory where to write logs @@ -271,10 +209,6 @@ private void Log(string message, LogLevel level, bool reportModification) { lock (this.guardMutex) { - //Don't overwhelm the logging system - if (debugSettings.VerboseLogging) - Analytics.LogPiiInfo("LogMessage-" + level.ToString(), message); - // In test mode, write the logs only to std out. if (testMode && !cliMode) { diff --git a/src/DynamoCore/Logging/IAnalyticsSession.cs b/src/DynamoCore/Logging/IAnalyticsSession.cs index da823da1ffb..20a39666f87 100644 --- a/src/DynamoCore/Logging/IAnalyticsSession.cs +++ b/src/DynamoCore/Logging/IAnalyticsSession.cs @@ -6,8 +6,7 @@ namespace Dynamo.Logging /// Defines analytics session interface. This interface is defined for /// internal use and mocking the tests only. /// - [Obsolete("Interface should be Internal, do not use.")] - public interface IAnalyticsSession : IDisposable + internal interface IAnalyticsSession : IDisposable { /// /// Get unique user id. @@ -24,9 +23,5 @@ public interface IAnalyticsSession : IDisposable /// The Session is closed when Dispose() is called. /// void Start(); - /// - /// Returns a logger to record usage. - /// - ILogger Logger { get; } } } diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index 357a84295d1..27c372b4fd3 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -211,8 +211,8 @@ public static string Version /// /// Name of the Host (i.e. DynamoRevit/DynamoStudio) /// - [Obsolete("This property will be removed in Dynamo 3.0 - please use HostAnalyticsInfo")] - public string HostName { get; set; } + [Obsolete("This property will be removed in a future version of Dynamo - please use HostAnalyticsInfo")] + internal string HostName { get; set; } /// /// Host analytics info @@ -571,12 +571,6 @@ public struct DefaultStartConfiguration : IStartConfiguration /// public string DefaultPythonEngine { get; set; } - /// - /// Disables ADP for the entire process for the lifetime of the process. - /// - [Obsolete("This property is no longer used and will be removed in Dynamo 3.0 - please use Dynamo.Logging.Analytics.DisableAnalytics instead.")] - public bool DisableADP { get; set; } - public HostAnalyticsInfo HostAnalyticsInfo { get; set; } /// @@ -3365,9 +3359,6 @@ private void DisplayXmlDummyNodeWarning() var xmlDummyNodeCount = this.CurrentWorkspace.Nodes.OfType(). Where(node => node.OriginalNodeContent is XmlElement).Count(); - Logging.Analytics.LogPiiInfo("XmlDummyNodeWarning", - xmlDummyNodeCount.ToString()); - string summary = Resources.UnresolvedNodesWarningShortMessage; var description = Resources.UnresolvedNodesWarningMessage; const string imageUri = "/DynamoCoreWpf;component/UI/Images/task_dialog_future_file.png"; @@ -3400,10 +3391,6 @@ private void DisplayObsoleteFileMessage(string fullFilePath, Version fileVersion var fileVer = ((fileVersion != null) ? fileVersion.ToString() : "Unknown"); var currVer = ((currVersion != null) ? currVersion.ToString() : "Unknown"); - Logging.Analytics.LogPiiInfo( - "ObsoleteFileMessage", - fullFilePath + " :: fileVersion:" + fileVer + " :: currVersion:" + currVer); - string summary = Resources.FileCannotBeOpened; var description = string.Format( @@ -3473,9 +3460,6 @@ private bool DisplayFutureFileMessage(string fullFilePath, Version fileVersion, var fileVer = ((fileVersion != null) ? fileVersion.ToString() : Resources.UnknownVersion); var currVer = ((currVersion != null) ? currVersion.ToString() : Resources.UnknownVersion); - Logging.Analytics.LogPiiInfo("FutureFileMessage", fullFilePath + - " :: fileVersion:" + fileVer + " :: currVersion:" + currVer); - string summary = Resources.FutureFileSummary; var description = string.Format(Resources.FutureFileDescription, fullFilePath, fileVersion, currVersion); diff --git a/src/DynamoCore/Models/DynamoModelCommands.cs b/src/DynamoCore/Models/DynamoModelCommands.cs index 44c6252b62c..b2259ab6ca7 100644 --- a/src/DynamoCore/Models/DynamoModelCommands.cs +++ b/src/DynamoCore/Models/DynamoModelCommands.cs @@ -326,7 +326,7 @@ private void MakeConnectionImpl(MakeConnectionCommand command) EndShiftReconnections(nodeId, command.PortIndex, command.Type); break; - // TODO - can be removed in Dynamo 3.0 - DYN-1729 + // TODO - can be removed in a future version of Dynamo - DYN-1729 case MakeConnectionCommand.Mode.EndAndStartCtrlConnection: BeginCreateConnections(nodeId, command.PortIndex, command.Type); break; diff --git a/src/DynamoCore/Models/DynamoModelEvents.cs b/src/DynamoCore/Models/DynamoModelEvents.cs index 3d5143e9130..c21dc4ed4c4 100644 --- a/src/DynamoCore/Models/DynamoModelEvents.cs +++ b/src/DynamoCore/Models/DynamoModelEvents.cs @@ -311,20 +311,6 @@ public virtual void OnRunCompleted(object sender, bool success) public delegate void CrashPromptHandler(object sender, CrashPromptArgs e); public event CrashPromptHandler RequestsCrashPrompt; - /// - /// Shows the crash error reporting window. - /// This method will always try to show the Autodesk CER UI first (if the CER tool is found on disk). - /// If the CER tool is not found, the Dynamo in-house crash prompt will be shown. - /// - /// - /// Can be called with CrashErrorReportArgs or CrashPromptArgs - [Obsolete("Will be removed in Dynamo3.0. Please use 'OnRequestsCrashPrompt(CrashErrorReportArgs args)' instead.")] - public void OnRequestsCrashPrompt(object sender, CrashPromptArgs args) - { - if (RequestsCrashPrompt != null) - RequestsCrashPrompt(this, args); - } - /// /// Shows the crash error reporting window. /// This method will always try to show the Autodesk CER UI first (if the CER tool is found on disk). diff --git a/src/DynamoCore/Scheduler/UpdateGraphAsyncTask.cs b/src/DynamoCore/Scheduler/UpdateGraphAsyncTask.cs index 6c4c6ade36f..692be1b52e7 100644 --- a/src/DynamoCore/Scheduler/UpdateGraphAsyncTask.cs +++ b/src/DynamoCore/Scheduler/UpdateGraphAsyncTask.cs @@ -153,14 +153,14 @@ protected override void HandleTaskCompletionCore() // Clear node warning or info messages because if node is involved in new graph execution, message should be refreshed if (node.State == ElementState.Warning) { - using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.ToolTipText), nameof(NodeModel.Infos), nameof(NodeModel.State))) + using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.Infos), nameof(NodeModel.State))) { node.ClearErrorsAndWarnings(); } } if (node.State == ElementState.Info) { - using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.ToolTipText), nameof(NodeModel.Infos), nameof(NodeModel.State))) + using (node.PropertyChangeManager.SetPropsToSuppress(nameof(NodeModel.Infos), nameof(NodeModel.State))) { node.ClearInfoMessages(); } diff --git a/src/DynamoCore/Visualization/DefaultRenderPackageFactory.cs b/src/DynamoCore/Visualization/DefaultRenderPackageFactory.cs index 87509b8f404..e25a570c428 100644 --- a/src/DynamoCore/Visualization/DefaultRenderPackageFactory.cs +++ b/src/DynamoCore/Visualization/DefaultRenderPackageFactory.cs @@ -545,7 +545,7 @@ public void AddTextureMapForMeshVerticesRange(int startIndex, int endIndex, byte /// This flag is used by the UpdateRenderPackageAsyncTask implementation to flag /// any third party usage of deprecated color methods in IRenderPackage API /// - [Obsolete("Do not use! This will be removed in Dynamo 3.0")] + [Obsolete("Do not use! This will be removed in a future version of Dynamo")] public bool AllowLegacyColorOperations { get; set; } = true; #endregion diff --git a/src/DynamoCoreWpf/Commands/DynamoCommands.cs b/src/DynamoCoreWpf/Commands/DynamoCommands.cs index d5a56811f52..3bfddf86bd3 100644 --- a/src/DynamoCoreWpf/Commands/DynamoCommands.cs +++ b/src/DynamoCoreWpf/Commands/DynamoCommands.cs @@ -249,7 +249,7 @@ private void MakeConnectionImpl(DynamoModel.MakeConnectionCommand command) nodeId, command.PortIndex, command.Type); break; - // TODO - can be removed in Dynamo 3.0 - DYN-1729 + // TODO - can be removed in a future version of Dynamo - DYN-1729 case DynamoModel.MakeConnectionCommand.Mode.EndAndStartCtrlConnection: CurrentSpaceViewModel.BeginCreateConnections( nodeId, command.PortIndex, command.Type); diff --git a/src/DynamoCoreWpf/Extensions/ViewLoadedParams.cs b/src/DynamoCoreWpf/Extensions/ViewLoadedParams.cs index 09d11ca2a65..da4f34b63f7 100644 --- a/src/DynamoCoreWpf/Extensions/ViewLoadedParams.cs +++ b/src/DynamoCoreWpf/Extensions/ViewLoadedParams.cs @@ -86,12 +86,6 @@ internal ViewLoadedParams(DynamoView dynamoV, DynamoViewModel dynamoVM) : DynamoSelection.Instance.Selection.CollectionChanged += OnSelectionCollectionChanged; } - [Obsolete("Method will be deprecated in Dynamo 3.0, please use AddExtensionMenuItem")] - public void AddMenuItem(MenuBarType type, MenuItem menuItem, int index = -1) - { - AddItemToMenu(type, menuItem, index); - } - /// /// Adds a menu item to the extensions menu /// Items will be ordered alphabetically diff --git a/src/DynamoCoreWpf/Properties/AssemblyInfo.cs b/src/DynamoCoreWpf/Properties/AssemblyInfo.cs index 68be0a310fe..e7eb2a727b6 100644 --- a/src/DynamoCoreWpf/Properties/AssemblyInfo.cs +++ b/src/DynamoCoreWpf/Properties/AssemblyInfo.cs @@ -53,6 +53,8 @@ [assembly: InternalsVisibleTo("DynamoPackagesWPF")] [assembly: InternalsVisibleTo("DynamoPlayer.Extension")] [assembly: InternalsVisibleTo("DynamoPlayer.Workflows")] +[assembly: InternalsVisibleTo("DynamoPlayer.WorkflowsUi")] +[assembly: InternalsVisibleTo("UnitsUI")] [assembly: InternalsVisibleTo("DynamoPlayer")] [assembly: InternalsVisibleTo("DynamoConnector")] diff --git a/src/DynamoCoreWpf/Rendering/HelixRenderPackage.cs b/src/DynamoCoreWpf/Rendering/HelixRenderPackage.cs index da422bafe25..e3f1571a6f4 100644 --- a/src/DynamoCoreWpf/Rendering/HelixRenderPackage.cs +++ b/src/DynamoCoreWpf/Rendering/HelixRenderPackage.cs @@ -81,43 +81,6 @@ public HelixRenderPackage() /// public double[] Transform { get; private set; } - /// - /// Set the transform that is applied to all geometry in the renderPackage. - /// - /// - [Obsolete("This method will be removed in 3.0. Use SetTransform(double[] matrix) instead.")] - public void SetTransform(Autodesk.DesignScript.Geometry.CoordinateSystem transform) - { - var xaxis = transform.XAxis; - var yaxis = transform.YAxis; - var zaxis = transform.ZAxis; - var org = transform.Origin; - - var csAsMat = new System.Windows.Media.Media3D.Matrix3D(xaxis.X, xaxis.Z, -xaxis.Y, 0, - zaxis.X, zaxis.Z, -zaxis.Y, 0, - -yaxis.X, -yaxis.Z, yaxis.Y, 0, - org.X, org.Z, -org.Y, 1); - - - this.Transform = csAsMat.ToArray(); - } - - - /// - /// Set the transform that is applied to all geometry in the renderPackage - /// by computing the matrix that transforms between from and to. - /// - /// - /// - [Obsolete("This method will be removed in 3.0.")] - public void SetTransform(Autodesk.DesignScript.Geometry.CoordinateSystem from, Autodesk.DesignScript.Geometry.CoordinateSystem to) - { - var inverse = from.Inverse(); - var final = inverse.PreMultiplyBy(to); - - this.SetTransform(final); - } - /// /// Set the transform that is applied to all geometry in the renderPackage, @@ -836,7 +799,7 @@ public void AddTextureMapForMeshVerticesRange(int startIndex, int endIndex, byte /// This flag is used by the UpdateRenderPackageAsyncTask implementation to flag /// any third party usage of deprecated color methods in IRenderPackageSupplement.MeshVerticesRangesAssociatedWithTextureMaps /// - [Obsolete("Do not use! This will be removed in Dynamo 3.0")] + [Obsolete("Do not use! This will be removed in a future version of Dynamo")] public bool AllowLegacyColorOperations { get; set; } = true; #endregion diff --git a/src/DynamoCoreWpf/UI/Converters.cs b/src/DynamoCoreWpf/UI/Converters.cs index 5e90ac14558..3cee7a63bbd 100644 --- a/src/DynamoCoreWpf/UI/Converters.cs +++ b/src/DynamoCoreWpf/UI/Converters.cs @@ -169,26 +169,6 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu } } - - /// - /// Controls the visibility of tooltip that displays python dependency in Package manager for each package version - /// - [Obsolete("This class will be removed in Dynamo 3.0")] - public class EmptyDepStringToCollapsedConverter : IValueConverter - { - public object Convert(object value, Type targetType, object parameter, - CultureInfo culture) - { - return Visibility.Collapsed; - } - - public object ConvertBack(object value, Type targetType, object parameter, - CultureInfo culture) - { - return null; - } - } - public class PackageSearchStateToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, @@ -1758,38 +1738,6 @@ public object ConvertBack(object value, Type targetType, object parameter, Syste } } - //TODO remove(this is not used anywhere) in Dynamo 3.0 - public class ZoomToVisibilityConverter : IValueConverter - { - /// - /// Returns hidden for small zoom sizes - appears unused. - /// - /// zoom size - /// unused - /// unused - /// unused - /// - public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - try - { - double zoom = System.Convert.ToDouble(value, CultureInfo.InvariantCulture); - if (zoom < .5) - return Visibility.Hidden; - } - catch (Exception e) - { - Console.WriteLine($"problem attempting to parse zoomsize or param {value}{ e.Message}"); - } - return Visibility.Visible; - } - - public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) - { - throw new NotSupportedException(); - } - } - public class ZoomToBooleanConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) @@ -2222,8 +2170,8 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu } } - [Obsolete("This class will be removed in Dynamo 3.0 - please use the ForgeUnit SDK based methods")] - public class MeasureConverter : IValueConverter + [Obsolete("This class will be removed in a future version of Dynamo - please use the ForgeUnit SDK based methods")] + internal class MeasureConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { diff --git a/src/DynamoCoreWpf/UI/SharedResourceDictionary.cs b/src/DynamoCoreWpf/UI/SharedResourceDictionary.cs index d777d2b78ac..e5b2d3f0a2c 100644 --- a/src/DynamoCoreWpf/UI/SharedResourceDictionary.cs +++ b/src/DynamoCoreWpf/UI/SharedResourceDictionary.cs @@ -216,14 +216,6 @@ public static ResourceDictionary ConnectorsDictionary } } - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortsDictionary or OutPortsDictionary")] - public static ResourceDictionary PortsDictionary - { - get { - return _portsDictionary ?? (_portsDictionary = new ResourceDictionary() {Source = PortsDictionaryUri}); - } - } - public static ResourceDictionary OutPortsDictionary { get diff --git a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml index e244a6dea74..97951c7de22 100644 --- a/src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml +++ b/src/DynamoCoreWpf/UI/Themes/Modern/DynamoConverters.xaml @@ -97,7 +97,6 @@ - diff --git a/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs index c540aadc40e..578447dcdb7 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/AnnotationViewModel.cs @@ -352,15 +352,6 @@ public System.Windows.Rect ModelAreaRect } } - /// - /// This property getter returns an empty GeometryCollection - /// - [Obsolete("This property will be removed in Dynamo 3.0 - please use NestedGroupsGeometries instead.")] - public GeometryCollection NestedGroupsGeometryCollection - { - get => new GeometryCollection(); - } - /// /// Collection of rectangles based on AnnotationModels /// that belongs to this group. diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs index 97c458f9fe9..3a9f5248f07 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModel.cs @@ -526,8 +526,8 @@ public bool ShowDebugASTs public IWatchHandler WatchHandler { get; private set; } - [Obsolete("This Property will be obsoleted in Dynamo 3.0.")] - public SearchViewModel SearchViewModel { get; private set; } + [Obsolete("This Property will be obsoleted in a future version of Dynamo")] + internal SearchViewModel SearchViewModel { get; private set; } public PackageManagerClientViewModel PackageManagerClientViewModel { get; private set; } diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs index a206e7ea804..b8b4a4d1e6b 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelDelegateCommands.cs @@ -67,8 +67,6 @@ private void InitializeDelegateCommands() GettingStartedGuideCommand = new DelegateCommand(StartGettingStartedGuide, CanStartGettingStartedGuide); ShowPackageManagerSearchCommand = new DelegateCommand(ShowPackageManagerSearch, CanShowPackageManagerSearch); ShowPackageManagerCommand = new DelegateCommand(ShowPackageManager, CanShowPackageManager); - ShowInstalledPackagesCommand = new DelegateCommand(o => { }, o => true); - ManagePackagePathsCommand = new DelegateCommand(o => { }, o => true); if (PackageManagerClientViewModel != null && !Model.IsServiceMode) { @@ -120,10 +118,6 @@ private void InitializeDelegateCommands() public DelegateCommand GraphAutoLayoutCommand { get; set; } public DelegateCommand GoHomeCommand { get; set; } public DelegateCommand ShowPackageManagerSearchCommand { get; set; } - [Obsolete("Do not use. This command will be removed. It does nothing.")] - public DelegateCommand ShowInstalledPackagesCommand { get; set; } - [Obsolete("Do not use. This command will be removed. It does nothing.")] - public DelegateCommand ManagePackagePathsCommand { get; set; } public DelegateCommand HomeCommand { get; set; } public DelegateCommand ExitCommand { get; set; } public DelegateCommand ShowSaveDialogIfNeededAndSaveResultCommand { get; set; } diff --git a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelEvents.cs b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelEvents.cs index 3c0d3747f11..125d8823378 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelEvents.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/DynamoViewModelEvents.cs @@ -6,17 +6,6 @@ namespace Dynamo.ViewModels { partial class DynamoViewModel { - [Obsolete("This event will be removed, do not use. It does nothing.")] - public event EventHandler RequestManagePackagesDialog; - [Obsolete("This method will be removed do not use. It does nothing.")] - public virtual void OnRequestManagePackagesDialog(Object sender, EventArgs e) - { - if (RequestManagePackagesDialog != null) - { - RequestManagePackagesDialog(this, e); - } - } - public event RequestPackagePublishDialogHandler RequestPackagePublishDialog; public void OnRequestPackagePublishDialog(PublishPackageViewModel vm) { @@ -43,17 +32,6 @@ public virtual void OnRequestPackageManagerDialog(Object sender, EventArgs e) } } - - [Obsolete("This event will be removed, do not use. It does nothing.")] - public event EventHandler RequestPackagePathsDialog; - [Obsolete("This method will be removed do not use. It does nothing.")] - public virtual void OnRequestPackagePathsDialog(object sender, EventArgs e) - { - var handler = RequestPackagePathsDialog; - if (handler != null) - handler(sender, e); - } - public event ImageSaveEventHandler RequestSaveImage; public virtual void OnRequestSaveImage(Object sender, ImageSaveEventArgs e) { @@ -72,18 +50,6 @@ public virtual void OnRequestSave3DImage(object sender, ImageSaveEventArgs e) RequestSave3DImage(this, e); } } - [Obsolete("This event will be removed later, now the Scaling Factor functionality is implemented in PreferencesViewModel.cs")] - public event EventHandler RequestScaleFactorDialog; - - [Obsolete("This method will be removed later, now the Scaling Factor functionality is implemented in PreferencesViewModel.cs")] - public virtual void OnRequestScaleFactorDialog(object sender, EventArgs e) - { - var handler = RequestScaleFactorDialog; - if (handler != null) - { - handler(sender, e); - } - } public event EventHandler RequestClose; public virtual void OnRequestClose(Object sender, EventArgs e) diff --git a/src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs index f1712501375..ef89e10d916 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/NodeViewModel.cs @@ -118,13 +118,6 @@ public NodeModel NodeLogic [JsonIgnore] public InfoBubbleViewModel ErrorBubble { get; set; } - [JsonIgnore] - [Obsolete("This property is deprecated and will be removed in a future version of Dynamo.")] - public string ToolTipText - { - get { return nodeLogic.ToolTipText; } - } - [JsonIgnore] public ObservableCollection InPorts { @@ -1083,10 +1076,10 @@ void DebugSettings_PropertyChanged(object sender, PropertyChangedEventArgs e) /// void EngineController_AstBuilt(object sender, CompiledEventArgs e) { - if (e.Node == nodeLogic.GUID) + if (e.NodeId == nodeLogic.GUID) { var sb = new StringBuilder(); - sb.AppendLine(string.Format("{0} AST:", e.Node)); + sb.AppendLine(string.Format("{0} AST:", e.NodeId)); foreach (var assocNode in e.AstNodes) { @@ -1182,10 +1175,6 @@ void logic_PropertyChanged(object sender, PropertyChangedEventArgs e) case "ArgumentLacing": RaisePropertyChanged("ArgumentLacing"); break; - case nameof(NodeModel.ToolTipText): - UpdateBubbleContent(); - // TODO Update preview bubble visibility to false - break; case "IsVisible": RaisePropertyChanged("IsVisible"); HandleColorOverlayChange(); diff --git a/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs b/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs index 683d8afcc41..30e782aecaf 100644 --- a/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Core/PortViewModel.cs @@ -121,20 +121,11 @@ public ElementState State get { return node.State; } } - /// - /// Returns whether this port has a default value that can be used. - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public bool DefaultValueEnabled - { - get { return port.DefaultValue != null; } - } - /// /// Returns whether the port is using its default value, or whether this been disabled /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public bool UsingDefaultValue + [Obsolete("This method will be removed in a future version of Dynamo - please use the InPortViewModel")] + internal bool UsingDefaultValue { get { return port.UsingDefaultValue; } set @@ -143,7 +134,6 @@ public bool UsingDefaultValue } } - /// /// IsHitTestVisible property gets a value that declares whether /// a Snapping rectangle can possibly be returned as a hit test result. /// When FirstActiveConnector is not null, Snapping rectangle handles click events. @@ -168,8 +158,8 @@ public System.Windows.Thickness MarginThickness /// /// If should display Use Levels popup menu. /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public bool ShowUseLevelMenu + [Obsolete("This method will be removed in a future version of Dynamo - please use the InPortViewModel")] + internal bool ShowUseLevelMenu { get { @@ -182,56 +172,6 @@ public bool ShowUseLevelMenu } } - /// - /// If UseLevel is enabled on this port. - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public bool UseLevels - { - get { return port.UseLevels; } - } - - /// - /// If should keep list structure on this port. - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public bool ShouldKeepListStructure - { - get { return port.KeepListStructure; } - } - - /// - /// Levle of list. - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public int Level - { - get { return port.Level; } - set - { - ChangeLevel(value); - } - } - - /// - /// The visibility of Use Levels menu. - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public Visibility UseLevelVisibility - { - get - { - if (node.ArgumentLacing != LacingStrategy.Disabled) - { - return Visibility.Visible; - } - else - { - return Visibility.Collapsed; - } - } - } - internal NodeViewModel NodeViewModel { get => node; @@ -446,47 +386,7 @@ private void PortPropertyChanged(object sender, System.ComponentModel.PropertyCh } } - /// - /// UseLevels command - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public DelegateCommand UseLevelsCommand - { - get - { - if (useLevelsCommand == null) - { - useLevelsCommand = new DelegateCommand(null, p => true); - } - return useLevelsCommand; - } - } - - /// - /// ShouldKeepListStructure command - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the InPortViewModel")] - public DelegateCommand KeepListStructureCommand - { - get - { - if (keepListStructureCommand == null) - { - keepListStructureCommand = new DelegateCommand(null, p => true); - } - return keepListStructureCommand; - } - } - - //Todo remove in 2.13 - private void ChangeLevel(int level) - { - var command = new DynamoModel.UpdateModelValueCommand( - Guid.Empty, node.NodeLogic.GUID, "ChangeLevel", string.Format("{0}:{1}", port.Index, level)); - - node.WorkspaceViewModel.DynamoViewModel.ExecuteCommand(command); - } - + private void Connect(object parameter) { DynamoViewModel dynamoViewModel = this.node.DynamoViewModel; diff --git a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs index a008cfb01a0..b730f1db9d7 100644 --- a/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/Menu/PreferencesViewModel.cs @@ -961,23 +961,6 @@ public string SelectedPythonEngine } } - /// - /// Controls the IsChecked property in the "Hide IronPython alerts" toggle button - /// - [Obsolete("This property is deprecated and will be removed in a future version of Dynamo")] - public bool HideIronPythonAlertsIsChecked - { - get - { - return preferenceSettings.IsIronPythonDialogDisabled; - } - set - { - preferenceSettings.IsIronPythonDialogDisabled = value; - RaisePropertyChanged(nameof(HideIronPythonAlertsIsChecked)); - } - } - /// /// Controls the IsChecked property in the "Show Whitespace in Python editor" toggle button /// @@ -1907,10 +1890,6 @@ public class PythonTemplatePathEventArgs : EventArgs /// public class GeometryScalingOptions { - //The Enum values can be Small, Medium, Large or Extra Large - [Obsolete("This property is deprecated and will be removed in a future version of Dynamo")] - public GeometryScaleSize EnumProperty { get; set; } - /// /// This property will contain the description of each of the radio buttons in the Visual Settings -> Geometry Scaling section /// diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs index 4690e005469..58502f319ec 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerClientViewModel.cs @@ -68,12 +68,6 @@ public TermsOfUseHelper(TermsOfUseHelperParams touParams) authenticationManager = touParams.AuthenticationManager; } - [Obsolete("Please use the other overridden method")] - public void Execute() - { - Execute(true); // Redirected to call the alternative method. - } - internal void Execute(bool preventReentrant) { if (preventReentrant && Interlocked.Increment(ref lockCount) > 1) @@ -202,9 +196,6 @@ public class PackageManagerClientViewModel : NotificationObject, IPackageInstall private readonly string QUARANTINED = "quarantined"; - [Obsolete("This property will be removed in Dynamo 3.0 - please use ViewModelOwner")] - public PackageManagerSearchView Owner { get; set; } - /// /// The System.Windows.Window owner of the view model. /// Used to align messagebox dialogs created by this model @@ -333,7 +324,7 @@ public void PublishCurrentWorkspace(object m) }; var termsOfUseCheck = new TermsOfUseHelper(touParams); - termsOfUseCheck.Execute(); + termsOfUseCheck.Execute(true); return; } } @@ -360,7 +351,7 @@ public void PublishNewPackage(object m) AcceptanceCallback = ShowNodePublishInfo }); - termsOfUseCheck.Execute(); + termsOfUseCheck.Execute(true); } public bool CanPublishNewPackage(object m) @@ -386,7 +377,7 @@ public void PublishCustomNode(Function m) }) }); - termsOfUseCheck.Execute(); + termsOfUseCheck.Execute(true); } } @@ -444,7 +435,7 @@ public void PublishSelectedNodes(object m) AcceptanceCallback = () => ShowNodePublishInfo(defs) }); - termsOfUseCheck.Execute(); + termsOfUseCheck.Execute(true); } public bool CanPublishSelectedNodes(object m) @@ -951,16 +942,6 @@ internal async void ExecutePackageDownload(string name, PackageVersion package, } } - - /// - /// Returns a newline delimited string representing the package name and version of the argument - /// - [Obsolete("No longer used. Remove in 3.0.")] - public static string FormatPackageVersionList(IEnumerable> packages) - { - return String.Join("\r\n", packages.Select(x => x.Item1.name + " " + x.Item2.version)); - } - /// /// This method downloads the package represented by the PackageDownloadHandle, /// diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs index f04c2d5692f..c91081b8ea0 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageManagerSearchElementViewModel.cs @@ -15,8 +15,6 @@ public class PackageManagerSearchElementViewModel : BrowserItemViewModel, IEquat public ICommand DownloadLatestCommand { get; set; } public ICommand UpvoteCommand { get; set; } - [Obsolete("This UI command will no longer decrease package votes and will be removed in Dynamo 3.0")] - public ICommand DownvoteCommand { get; set; } public ICommand VisitSiteCommand { get; set; } public ICommand VisitRepositoryCommand { get; set; } public ICommand DownloadLatestToCustomPathCommand { get; set; } @@ -96,9 +94,6 @@ public PackageManagerSearchElementViewModel(PackageManagerSearchElement element, this.UpvoteCommand = new DelegateCommand(SearchElementModel.Upvote, () => canLogin); - // TODO: Remove the initialization of the UI command in Dynamo 3.0 - this.DownvoteCommand = new DelegateCommand(SearchElementModel.Downvote, () => canLogin); - this.VisitSiteCommand = new DelegateCommand(() => GoToUrl(FormatUrl(SearchElementModel.SiteUrl)), () => !String.IsNullOrEmpty(SearchElementModel.SiteUrl)); this.VisitRepositoryCommand = diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackagePathViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackagePathViewModel.cs index 4c0bcfb4c3b..4ce75ab6c65 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackagePathViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackagePathViewModel.cs @@ -56,8 +56,6 @@ public class PackagePathEventArgs : EventArgs public class PackagePathViewModel : ViewModelBase { public ObservableCollection RootLocations { get; private set; } - [Obsolete("SelectedIndex is no longer referenced, do not use.")] - public int SelectedIndex { get; set; } public event EventHandler RequestShowFileDialog; public virtual void OnRequestShowFileDialog(object sender, PackagePathEventArgs e) diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs index f74bdd5365b..c02432537bf 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PackageViewModel.cs @@ -159,10 +159,6 @@ public bool HasAssemblies public bool CanPublish => dynamoModel.AuthenticationManager.HasAuthProvider; - [Obsolete("Do not use. This command will be removed. It does nothing.")] - public DelegateCommand ToggleTypesVisibleInManagerCommand { get; set; } - [Obsolete("Do not use. This command will be removed. It does nothing.")] - public DelegateCommand GetLatestVersionCommand { get; set; } public DelegateCommand PublishNewPackageVersionCommand { get; set; } public DelegateCommand UninstallCommand { get; set; } public DelegateCommand UnmarkForUninstallationCommand { get; set; } @@ -181,8 +177,6 @@ public PackageViewModel(DynamoViewModel dynamoViewModel, Package model) this.packageManagerClient = pmExtension.PackageManagerClient; Model = model; - ToggleTypesVisibleInManagerCommand = new DelegateCommand(() => { }, () => true); - GetLatestVersionCommand = new DelegateCommand(() => { }, () => false); PublishNewPackageVersionCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackageVersion), IsOwner); PublishNewPackageCommand = new DelegateCommand(() => ExecuteWithTou(PublishNewPackage), () => CanPublish); UninstallCommand = new DelegateCommand(Uninstall, CanUninstall); diff --git a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs index 7f7b68e5519..b6f414fad95 100644 --- a/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs +++ b/src/DynamoCoreWpf/ViewModels/PackageManager/PublishPackageViewModel.cs @@ -644,15 +644,6 @@ public bool HasDependencies get { return Dependencies.Count > 0; } } - /// - /// This property seems dup with HasDependencies - /// TODO: Remove in Dynamo 3.0 - /// - public bool HasNoDependencies - { - get { return !HasDependencies; } - } - private string markdownFilesDirectory; /// diff --git a/src/DynamoCoreWpf/ViewModels/Watch3D/DynamoGeometryModel3D.cs b/src/DynamoCoreWpf/ViewModels/Watch3D/DynamoGeometryModel3D.cs index f16ec049643..86c0537d162 100644 --- a/src/DynamoCoreWpf/ViewModels/Watch3D/DynamoGeometryModel3D.cs +++ b/src/DynamoCoreWpf/ViewModels/Watch3D/DynamoGeometryModel3D.cs @@ -53,7 +53,7 @@ protected override SceneNode OnCreateSceneNode() return new DynamoMeshNode(); } - [Obsolete("This property will be deprecated and made internal in Dynamo 3.0.")] + [Obsolete("This property will be deprecated and made internal in a future version of Dynamo.")] public static readonly DependencyProperty RequiresPerVertexColorationProperty = DependencyProperty.Register("RequiresPerVertexColoration", typeof(bool), typeof(GeometryModel3D), new UIPropertyMetadata(false, RequirePerVertexColorationChanged)); diff --git a/src/DynamoCoreWpf/Views/CodeCompletion/CodeCompletionEditor.xaml.cs b/src/DynamoCoreWpf/Views/CodeCompletion/CodeCompletionEditor.xaml.cs index ec90933de1c..177a3719ac2 100644 --- a/src/DynamoCoreWpf/Views/CodeCompletion/CodeCompletionEditor.xaml.cs +++ b/src/DynamoCoreWpf/Views/CodeCompletion/CodeCompletionEditor.xaml.cs @@ -53,7 +53,6 @@ public CodeCompletionEditor(NodeView nodeView) this.nodeViewModel = nodeView.ViewModel; this.DataContext = nodeViewModel.NodeModel; this.dynamoViewModel = nodeViewModel.DynamoViewModel; - this.dynamoViewModel.PropertyChanged += OnDynamoViewModelPropertyChanged; this.dynamoViewModel.PreferencesViewModel.PropertyChanged += OnPreferencesViewModelPropertyChanged; this.InnerTextEditor.TextChanged += OnTextChanged; this.InnerTextEditor.TextArea.GotFocus+= OnTextAreaGotFocus; @@ -194,15 +193,6 @@ private void OnTextChanged(object sender, EventArgs e) } } - [Obsolete("This is now done through a PreferencesViewModel property change")] - private void OnDynamoViewModelPropertyChanged(object sender, EventArgs e) - { - if((e as PropertyChangedEventArgs).PropertyName == nameof(dynamoViewModel.ShowCodeBlockLineNumber)) - { - this.InnerTextEditor.ShowLineNumbers = dynamoViewModel.ShowCodeBlockLineNumber; - } - } - private void OnPreferencesViewModelPropertyChanged(object sender, EventArgs e) { if ((e as PropertyChangedEventArgs).PropertyName == nameof(dynamoViewModel.PreferencesViewModel.ShowCodeBlockLineNumber)) @@ -414,7 +404,6 @@ private void ShowCompletionWindow(IEnumerable completions, bool internal void Dispose() { - this.dynamoViewModel.PropertyChanged -= OnDynamoViewModelPropertyChanged; this.dynamoViewModel.PreferencesViewModel.PropertyChanged -= OnPreferencesViewModelPropertyChanged; } } diff --git a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerSearchView.xaml.cs b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerSearchView.xaml.cs index 3865cbf73ff..6f78547ceff 100644 --- a/src/DynamoCoreWpf/Views/PackageManager/PackageManagerSearchView.xaml.cs +++ b/src/DynamoCoreWpf/Views/PackageManager/PackageManagerSearchView.xaml.cs @@ -69,11 +69,10 @@ private void SearchTextBox_TextChanged(object sender, TextChangedEventArgs e) } /// - /// TODO: mark private in Dynamo 3.0 /// /// /// - public void ItemStackPanel_MouseDown(object sender, RoutedEventArgs e) + private void ItemStackPanel_MouseDown(object sender, RoutedEventArgs e) { var lbi = sender as StackPanel; if (lbi == null) return; diff --git a/src/DynamoManipulation/NodeManipulator.cs b/src/DynamoManipulation/NodeManipulator.cs index 97380e7b373..e195c3766b8 100644 --- a/src/DynamoManipulation/NodeManipulator.cs +++ b/src/DynamoManipulation/NodeManipulator.cs @@ -1,4 +1,4 @@ -using Autodesk.DesignScript.Geometry; +using Autodesk.DesignScript.Geometry; using CoreNodeModels.Input; using Dynamo.Extensions; using Dynamo.Graph.Nodes; @@ -648,13 +648,6 @@ public bool IsEnabled() return active; } - // TODO: Remove in 3.0 - [Obsolete("This method will be removed in 3.0 and will no longer be available as a public API.")] - public bool IsNodeValueNull() - { - return IsNodeNull(Node.CachedValue); - } - private static bool IsNodeNull(MirrorData data) { if (data == null || data.IsNull) return true; diff --git a/src/DynamoPackages/Package.cs b/src/DynamoPackages/Package.cs index 8c5d5e08b9b..f63747a37fa 100644 --- a/src/DynamoPackages/Package.cs +++ b/src/DynamoPackages/Package.cs @@ -132,13 +132,6 @@ public string NodeDocumentaionDirectory get { return Path.Combine(RootDirectory, "doc"); } } - [Obsolete("This property will be removed in 3.0. Please use the LoadState property instead.")] - public bool Loaded { - get { - return LoadState.State == PackageLoadState.StateTypes.Loaded; - } - } - private bool typesVisibleInManager; public bool TypesVisibleInManager { @@ -193,15 +186,6 @@ internal bool BuiltInPackage get { return RootDirectory.StartsWith(PathManager.BuiltinPackagesDirectory); } } - [Obsolete("This property will be removed in Dynamo 3.0. Use LoadState.ScheduledState instead")] - public bool MarkedForUninstall - { - get { - return BuiltInPackage ? LoadState.ScheduledState == PackageLoadState.ScheduledTypes.ScheduledForUnload : - LoadState.ScheduledState == PackageLoadState.ScheduledTypes.ScheduledForDeletion; - } - } - public PackageLoadState LoadState = new PackageLoadState(); private string _group = ""; diff --git a/src/DynamoPackages/PackageDownloadHandle.cs b/src/DynamoPackages/PackageDownloadHandle.cs index 3cc10e2402f..c594e0a3516 100644 --- a/src/DynamoPackages/PackageDownloadHandle.cs +++ b/src/DynamoPackages/PackageDownloadHandle.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using Dynamo.Core; using Dynamo.Models; @@ -40,20 +40,15 @@ public State DownloadState } } - [Obsolete("No longer used. Remove in 3.0")] - public Greg.Responses.PackageHeader Header { get; private set; } - - private string _name; /// /// Name of the package /// - public string Name { get { return Header != null ? Header.name : _name; } set { _name = value; } } + public string Name { get; set; } - private string _id; /// /// Identifier of the package /// - public string Id { get { return Header != null ? Header._id : _id; } set { _id = value; } } + public string Id { get; set; } private string _downloadPath; /// @@ -67,14 +62,6 @@ public State DownloadState /// public string VersionName { get { return _versionName; } set { _versionName = value; RaisePropertyChanged("VersionName"); } } - [Obsolete("No longer used. Remove in 3.0")] - public PackageDownloadHandle(Greg.Responses.PackageHeader header, PackageVersion version) - { - this.Header = header; - this.DownloadPath = ""; - this.VersionName = version.version; - } - /// /// Creates an empty view model for a package installation /// @@ -128,10 +115,7 @@ public bool Extract(DynamoModel dynamoModel, string installDirectory, out Packag } // provide handle to installed package - if (Header != null) - pkg = new Package(unzipPath, Header.name, VersionName, Header.license); - else - pkg = Package.FromDirectory(unzipPath, dynamoModel.Logger); + pkg = Package.FromDirectory(unzipPath, dynamoModel.Logger); if (pkg == null) { diff --git a/src/DynamoPackages/PackageLoader.cs b/src/DynamoPackages/PackageLoader.cs index 6e28e734ae7..f3de4dc40f3 100644 --- a/src/DynamoPackages/PackageLoader.cs +++ b/src/DynamoPackages/PackageLoader.cs @@ -19,9 +19,6 @@ namespace Dynamo.PackageManager public struct LoadPackageParams { public IPreferences Preferences { get; set; } - - [Obsolete("Do not use. This will be removed in Dynamo 3.0")] - public IPathManager PathManager { get; set; } } public enum AssemblyLoadingState @@ -72,18 +69,6 @@ public IEnumerable RequestedExtensions private readonly List localPackages = new List(); public IEnumerable LocalPackages { get { return localPackages; } } - /// - /// Returns the default package directory where new packages will be installed - /// This is the first non builtin packages directory - /// The first entry is the builtin packages. - /// - /// Returns the path to the DefaultPackagesDirectory if found - or null if something has gone wrong. - [Obsolete("This property is redundant, please use the PathManager.DefaultPackagesDirectory property instead.")] - public string DefaultPackagesDirectory - { - get { return pathManager.DefaultPackagesDirectory; } - } - /// /// Combines the extension with the root path and returns it if the path exists. /// If not, the root path is returned unchanged. @@ -110,26 +95,6 @@ private static string TransformPath(string root, string extension) private readonly IPathManager pathManager; - /// - /// This constructor is currently being used for testing and these tests should be updated to use - /// another constructor when this is obsoleted. - /// - [Obsolete("This constructor will be removed in Dynamo 3.0 and should not be used any longer. If used, it should be passed parameters from PathManager properties.")] - public PackageLoader(string overridePackageDirectory) - : this(new[] { overridePackageDirectory }) - { - } - - /// - /// This constructor is currently being used by other constructors that have also been deprecated and by tests, - /// which should be updated to use another constructor when this is obsoleted. - /// - [Obsolete("This constructor will be removed in Dynamo 3.0 and should not be used any longer. If used, it should be passed parameters from PathManager properties.")] - public PackageLoader(IEnumerable packagesDirectories) - { - InitPackageLoader(packagesDirectories, null); - } - internal PackageLoader(IPathManager pathManager) { this.pathManager = pathManager; @@ -141,23 +106,6 @@ internal PackageLoader(IPathManager pathManager) } } - /// - /// Initialize a new instance of PackageLoader class. - /// This constructor is currently being used for testing and these tests should be updated to use - /// another constructor when this is obsoleted. - /// - /// Default package directories - /// Default package directories where node library files require certificate verification before loading - [Obsolete("This constructor will be removed in Dynamo 3.0 and should not be used any longer. If used, it should be passed parameters from PathManager properties.")] - public PackageLoader(IEnumerable packagesDirectories, IEnumerable packageDirectoriesToVerify) - : this(packagesDirectories) - { - if (packageDirectoriesToVerify == null) - throw new ArgumentNullException("packageDirectoriesToVerify"); - - packagesDirectoriesToVerifyCertificates.AddRange(packageDirectoriesToVerify); - } - private void InitPackageLoader(IEnumerable packagesDirectories, string builtinPackagesDir) { if (packagesDirectories == null) @@ -353,21 +301,6 @@ private void OnConflictingPackageLoaded(Package installed, Package conflicting) handler?.Invoke(installed, conflicting); } - /// - /// Load the package into Dynamo (including all node libraries and custom nodes) - /// and add to LocalPackages. - /// - // TODO: Remove in 3.0 (Refer to PR #9736). - [Obsolete("This API will be deprecated in 3.0. Use LoadPackages(IEnumerable packages) instead.")] - public void Load(Package package) - { - TryLoadPackageIntoLibrary(package); - - var assemblies = - LocalPackages.SelectMany(x => x.EnumerateAndLoadAssembliesInBinDirectory().Where(y => y.IsNodeLibrary)); - PackagesLoaded?.Invoke(assemblies.Select(x => x.Assembly)); - } - /// /// Scan the PackagesDirectory for packages and attempt to load all of them. Beware! Fails silently for duplicates. /// diff --git a/src/DynamoPackages/PackageManagerClient.cs b/src/DynamoPackages/PackageManagerClient.cs index e11f682435b..b6160b9ee89 100644 --- a/src/DynamoPackages/PackageManagerClient.cs +++ b/src/DynamoPackages/PackageManagerClient.cs @@ -337,26 +337,6 @@ internal void PublishRetainFolderStructure(Package package, IEnumerable(pkgDownload); - if (!response.success) throw new Exception(response.message); - header = response.content; - } - catch (Exception e) - { - var a = PackageManagerResult.Failed(e.Message); - header = null; - return a; - } - - return new PackageManagerResult("", true); - } internal PackageManagerResult Deprecate(string name) { diff --git a/src/DynamoPackages/PackageManagerSearchElement.cs b/src/DynamoPackages/PackageManagerSearchElement.cs index 4fd2d6dd602..c48b63ca4f6 100644 --- a/src/DynamoPackages/PackageManagerSearchElement.cs +++ b/src/DynamoPackages/PackageManagerSearchElement.cs @@ -22,13 +22,6 @@ public class PackageManagerSearchElement : SearchElementBase /// public event Func UpvoteRequested; - /// - /// An event that's invoked when the user has attempted to downvote this - /// package. - /// - [Obsolete("This event will be removed in Dynamo 3.0")] - public event Func DownvoteRequested; - public string Maintainers { get { return String.Join(", ", this.Header.maintainers.Select(x => x.username)); } } private int _votes; public int Votes @@ -189,32 +182,5 @@ public void Upvote() HasUpvote = true; } - - [Obsolete("This API will no longer decrease package votes and will be removed in Dynamo 3.0")] - public void Downvote() - { - Task.Factory.StartNew(() => DownvoteRequested(this.Id)) - .ContinueWith((t) => - { - if (t.Result) - { - this.Votes -= 1; - } - }, TaskScheduler.FromCurrentSynchronizationContext()); - } - - [Obsolete("No longer used. Remove in 3.0.")] - public static IEnumerable> ListRequiredPackageVersions( - IEnumerable headers, PackageVersion version) - { - return headers.Zip( - version.full_dependency_versions, - (header, v) => new Tuple(header, v)) - .Select( - (pair) => - new Tuple( - pair.Item1, - pair.Item1.versions.First(x => x.version == pair.Item2))); - } } } diff --git a/src/DynamoPackages/PackageUtilities.cs b/src/DynamoPackages/PackageUtilities.cs deleted file mode 100644 index c972dd2fead..00000000000 --- a/src/DynamoPackages/PackageUtilities.cs +++ /dev/null @@ -1,34 +0,0 @@ -using System; -using System.Collections.Generic; - -using Dynamo.Utilities; - -using Greg.Responses; - -namespace Dynamo.PackageManager -{ - [Obsolete("No longer used. Remove in 3.0.")] - public static class PackageUtilities - { - /// - /// Obtain the packages from a list of packages that were created using a newer version - /// of Dynamo than this one. - /// - [Obsolete("No longer used. Remove in 3.0.")] - public static IEnumerable> FilterFuturePackages( - this IEnumerable> headerVersionPairs, - Version currentAppVersion, int numberOfFieldsToCompare = 3) - { - foreach (var pair in headerVersionPairs) - { - var version = pair.Item2; - var depAppVersion = VersionUtilities.PartialParse(version.engine_version, numberOfFieldsToCompare); - - if (depAppVersion > currentAppVersion) - { - yield return pair; - } - } - } - } -} \ No newline at end of file diff --git a/src/DynamoPackagesWPF/PackageManagerViewExtension.cs b/src/DynamoPackagesWPF/PackageManagerViewExtension.cs index c7c73914c9b..015bbc7950b 100644 --- a/src/DynamoPackagesWPF/PackageManagerViewExtension.cs +++ b/src/DynamoPackagesWPF/PackageManagerViewExtension.cs @@ -123,7 +123,7 @@ private void RequestLoadViewExtensionsForLoadedPackages(IEnumerable pac foreach (var package in packages) { //if package was previously loaded then additional files are already cached. - if (package.Loaded) + if (package.LoadState.State == PackageLoadState.StateTypes.Loaded) { var vieweExtensionManifests = package.AdditionalFiles.Where(file => file.Model.Name.Contains("ViewExtensionDefinition.xml")).ToList(); foreach (var extPath in vieweExtensionManifests) diff --git a/src/DynamoUtilities/PathHelper.cs b/src/DynamoUtilities/PathHelper.cs index d1a296ff761..cd275bbd095 100644 --- a/src/DynamoUtilities/PathHelper.cs +++ b/src/DynamoUtilities/PathHelper.cs @@ -282,19 +282,6 @@ public static bool IsFileNameInValid(string fileName) return false; } - /// - /// This is a utility method for generating a default name to the snapshot image. - /// - /// File path - /// Returns a default name(along with the timestamp) for the workspace image - [Obsolete("This function will be removed in future version of Dynamo - please use the version with more parameters")] - public static String GetScreenCaptureNameFromPath(String filePath) - { - FileInfo fileInfo = new FileInfo(filePath); - String timeStamp = string.Format("{0:yyyy-MM-dd_hh-mm-ss}", DateTime.Now); - String snapshotName = fileInfo.Name.Replace(fileInfo.Extension, "_") + timeStamp; - return snapshotName; - } /// /// This is a utility method for generating a default name to the snapshot image. diff --git a/src/Engine/ProtoCore/AssociativeGraph.cs b/src/Engine/ProtoCore/AssociativeGraph.cs index 55ee0490ee3..f18433e6565 100644 --- a/src/Engine/ProtoCore/AssociativeGraph.cs +++ b/src/Engine/ProtoCore/AssociativeGraph.cs @@ -32,26 +32,6 @@ public static AssociativeGraph.GraphNode GetFirstDirtyGraphNodeFromPC(int pc, Li return graphNodesInScope.FirstOrDefault(g => g.isActive && g.isDirty && g.updateBlock.startpc >= pc); } - /// - /// Marks all graphnodes ditry within the specified block - /// - /// - /// - [Obsolete("This method is deprecated and will be removed in a future Dynamo version.")] - public static void MarkAllGraphNodesDirty(int block, List graphNodesInScope) - { - if (graphNodesInScope != null) - { - foreach (AssociativeGraph.GraphNode gnode in graphNodesInScope) - { - if (gnode.languageBlockId == block) - { - gnode.isDirty = true; - } - } - } - } - /// /// Marks all graphnodes in the scope dirty. /// diff --git a/src/Engine/ProtoCore/Core.cs b/src/Engine/ProtoCore/Core.cs index b204364ac67..f1bb24fb177 100644 --- a/src/Engine/ProtoCore/Core.cs +++ b/src/Engine/ProtoCore/Core.cs @@ -221,14 +221,6 @@ public struct ErrorEntry public List CodeBlockList { get; set; } - // The Complete Code Block list contains all the code blocks - // unlike the codeblocklist which only stores the outer most code blocks - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public List CompleteCodeBlockList - { - get { return CompleteCodeBlockDict.Select(x => x.Value).ToList(); } - set { value.ForEach(x => CompleteCodeBlockDict.Add(x.codeBlockId, x)); } - } internal SortedDictionary CompleteCodeBlockDict { get; set; } /// diff --git a/src/Engine/ProtoCore/DSASM/Executable.cs b/src/Engine/ProtoCore/DSASM/Executable.cs index 8946bd5168c..93ca638849b 100644 --- a/src/Engine/ProtoCore/DSASM/Executable.cs +++ b/src/Engine/ProtoCore/DSASM/Executable.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using ProtoCore.AssociativeGraph; @@ -48,11 +48,6 @@ public class Executable public List CodeBlocks { get; set; } - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public List CompleteCodeBlocks { - get { return CompleteCodeBlockDict.Select(x => x.Value).ToList(); } - set { value.ForEach(x => CompleteCodeBlockDict.Add(x.codeBlockId, x)); } - } internal SortedDictionary CompleteCodeBlockDict { get; set; } public InstructionStream[] instrStreamList { get; set; } diff --git a/src/Engine/ProtoCore/FFI/CLRDLLModule.cs b/src/Engine/ProtoCore/FFI/CLRDLLModule.cs index 469ab2401fd..bdadb618a15 100644 --- a/src/Engine/ProtoCore/FFI/CLRDLLModule.cs +++ b/src/Engine/ProtoCore/FFI/CLRDLLModule.cs @@ -1342,10 +1342,6 @@ public FFIMethodAttributes(FieldInfo f) } } - [Obsolete("This method is deprecated and will be removed in Dynamo 3.0. Use FFIMethodAttributes(MethodBase method, Dictionary getterAttributes = null) instead.")] - public FFIMethodAttributes(MethodInfo method, Dictionary getterAttributes) - : this(method as MethodBase, getterAttributes) { } - public FFIMethodAttributes(MethodBase method, Dictionary getterAttributes = null) { if (method == null) diff --git a/src/Engine/ProtoCore/FFI/CLRFFIFunctionPointer.cs b/src/Engine/ProtoCore/FFI/CLRFFIFunctionPointer.cs index 09c1df114ce..8f0728f6d4e 100644 --- a/src/Engine/ProtoCore/FFI/CLRFFIFunctionPointer.cs +++ b/src/Engine/ProtoCore/FFI/CLRFFIFunctionPointer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Reflection; @@ -500,125 +500,6 @@ private string ErrorString(System.Exception ex) return string.Format(Resources.OperationFailType2, ReflectionInfo.DeclaringType.Name, ReflectionInfo.Name, msg); } - [IsObsolete("Remove in 3.0. Use Execute(ProtoCore.Runtime.Context c, ProtoCore.DSASM.Interpreter dsi, List s) instead")] - public override object Execute(ProtoCore.Runtime.Context c, Interpreter dsi) - { - List parameters = new List(); - List s = dsi.runtime.rmem.Stack; - Object thisObject = null; - FFIObjectMarshaler marshaller = Module.GetMarshaler(dsi.runtime.RuntimeCore); - if (!ReflectionInfo.IsStatic) - { - try - { - thisObject = marshaller.UnMarshal(s.Last(), c, dsi, ReflectionInfo.DeclaringType); - } - catch (InvalidOperationException) - { - string message = String.Format(Resources.kFFIFailedToObtainThisObject, ReflectionInfo.DeclaringType.Name, ReflectionInfo.Name); - dsi.LogWarning(ProtoCore.Runtime.WarningID.AccessViolation, message); - return null; - } - - if (thisObject == null) - return null; //Can't call a method on null object. - } - - FFIParameterInfo[] paraminfos = ReflectionInfo.GetParameters(); - List referencedParameters = new List(); - - for (int i = 0; i < mArgTypes.Length; ++i) - { - // Comment Jun: FFI function stack frames do not contain locals - int locals = 0; - int relative = 0 - ProtoCore.DSASM.StackFrame.StackFrameSize - locals - i - 1; - StackValue opArg = dsi.runtime.rmem.GetAtRelative(relative); - try - { - Type paramType = paraminfos[i].Info.ParameterType; - object param = null; - if (opArg.IsDefaultArgument) - param = Type.Missing; - else - param = marshaller.UnMarshal(opArg, c, dsi, paramType); - - if (paraminfos[i].KeepReference && opArg.IsReferenceType) - { - referencedParameters.Add(opArg); - } - - //null is passed for a value type, so we must return null - //rather than interpreting any value from null. fix defect 1462014 - if (!paramType.IsGenericType && paramType.IsValueType && param == null) - { - //This is going to cause a cast exception. This is a very frequently called problem, so we want to short-cut the execution - - dsi.LogWarning(ProtoCore.Runtime.WarningID.AccessViolation, - string.Format(Resources.FailedToCastFromNull, paraminfos[i].Info.ParameterType.Name)); - - return null; - //throw new System.InvalidCastException(string.Format("Null value cannot be cast to {0}", paraminfos[i].ParameterType.Name)); - - } - - parameters.Add(param); - } - catch (System.InvalidCastException ex) - { - dsi.LogWarning(ProtoCore.Runtime.WarningID.AccessViolation, ex.Message); - return null; - } - catch (InvalidOperationException) - { - string message = String.Format(Resources.kFFIFailedToObtainObject, paraminfos[i].Info.ParameterType.Name, ReflectionInfo.DeclaringType.Name, ReflectionInfo.Name); - dsi.LogWarning(ProtoCore.Runtime.WarningID.AccessViolation, message); - return null; - } - } - - var ret = InvokeFunctionPointerNoThrow(c, dsi, thisObject, parameters.Count > 0 ? parameters.ToArray() : null); - if (ReflectionInfo.KeepReferenceThis && thisObject != null) - { - referencedParameters.Add(s.Last()); - } - - int count = referencedParameters.Count; - if (count > 0 && (ret is StackValue)) - { - // If there is a parameter who has attribute [KeepReference], - // it means this parameter will cross the DesignScript boundary - // and be referenced by C# object. Therefore, when its DS - // wrapper object is out of scope, we shouldn't dispose it; - // otherwise that C# object will reference to an invalid object. - // - // Similarly, if the method has attribute [KeepReferenceThis], - // it means the return object will reference to this object - // internally, so we shouldn't dispose this object. - // - // The hack here is to treat them like properties in the return - // object. Note all DS wrapper objects are dummy objects who - // haven't any members. By allocating extra space on the heap, - // we store the reference in the return object so that the - // parameter will have the same lifecycle as the return object. - // - // One case need to consider about is the type of return value. - // If the return value is an array, we have to recursively go - // into the array and expand the element, instead of setting - // these hidden information directly on the array. - try - { - SetReferenceObjects((StackValue)ret, referencedParameters, dsi.runtime); - } - catch (RunOutOfMemoryException) - { - dsi.runtime.RuntimeCore.RuntimeStatus.LogWarning(ProtoCore.Runtime.WarningID.RunOutOfMemory, Resources.RunOutOfMemory); - return StackValue.Null; - } - } - - return ret; - } - public override object Execute(ProtoCore.Runtime.Context c, Interpreter dsi, List s) { var parameters = new List(); @@ -788,12 +669,6 @@ public DisposeFunctionPointer(CLRDLLModule module, MemberInfo method, ProtoCore. { } - [IsObsolete("Remove in 3.0. Use Execute(ProtoCore.Runtime.Context c, ProtoCore.DSASM.Interpreter dsi, List s) instead")] - public override object Execute(ProtoCore.Runtime.Context c, Interpreter dsi) - { - return Execute(c, dsi, null); - } - public override object Execute(ProtoCore.Runtime.Context c, Interpreter dsi, List s) { if (s == null) diff --git a/src/Engine/ProtoCore/FFI/FFIHandler.cs b/src/Engine/ProtoCore/FFI/FFIHandler.cs index f808d153ef3..b6ac21f91a7 100644 --- a/src/Engine/ProtoCore/FFI/FFIHandler.cs +++ b/src/Engine/ProtoCore/FFI/FFIHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Autodesk.DesignScript.Runtime; using ProtoCore.AST.AssociativeAST; @@ -10,8 +10,6 @@ public abstract class FFIFunctionPointer { public bool IsDNI { get; set; } - [IsObsolete("Remove in 3.0. Use Execute(ProtoCore.Runtime.Context c, ProtoCore.DSASM.Interpreter dsi, List stack) instead")] - public abstract object Execute(ProtoCore.Runtime.Context c, Interpreter dsi); public abstract Object Execute(ProtoCore.Runtime.Context c, ProtoCore.DSASM.Interpreter dsi, List stack); public static T[] GetUnderlyingArray(List list) { diff --git a/src/Engine/ProtoCore/FFI/PInvokeFFI.cs b/src/Engine/ProtoCore/FFI/PInvokeFFI.cs index bfd3f0122ed..523ff8a7665 100644 --- a/src/Engine/ProtoCore/FFI/PInvokeFFI.cs +++ b/src/Engine/ProtoCore/FFI/PInvokeFFI.cs @@ -350,12 +350,6 @@ public override object Execute(ProtoCore.Runtime.Context context, Interpreter ds object ret = mFunction.Execute(parameters.ToArray()); return ConvertReturnValue(ret, context, dsi); } - - [IsObsolete("Remove in 3.0. Use Execute(ProtoCore.Runtime.Context c, ProtoCore.DSASM.Interpreter dsi, List stack) instead")] - public override object Execute(ProtoCore.Runtime.Context context, Interpreter dsi) - { - return Execute(context, dsi, null); - } } public class PInvokeModuleHelper : ModuleHelper diff --git a/src/Engine/ProtoCore/Parser/AssociativeAST.cs b/src/Engine/ProtoCore/Parser/AssociativeAST.cs index b9b98bc4b8f..af453127a62 100644 --- a/src/Engine/ProtoCore/Parser/AssociativeAST.cs +++ b/src/Engine/ProtoCore/Parser/AssociativeAST.cs @@ -1932,62 +1932,6 @@ public override IEnumerable Children() } } - [Obsolete("IfStatementNode type is deprecated and not used. To be remove in 3.0")] - public class IfStatementNode : AssociativeNode - { - public AssociativeNode ifExprNode { get; set; } - public List IfBody { get; set; } - public List ElseBody { get; set; } - - public IfStatementNode() - { - IfBody = new List(); - ElseBody = new List(); - } - - public override bool Equals(object other) - { - var otherNode = other as IfStatementNode; - if (null == otherNode) - return false; - - return ifExprNode.Equals(otherNode.ifExprNode) && - IfBody.SequenceEqual(otherNode.IfBody) && - ElseBody.SequenceEqual(otherNode.ElseBody); - } - - public override int GetHashCode() - { - var ifExprNodeHashCode = - (ifExprNode == null ? base.GetHashCode() : ifExprNode.GetHashCode()); - var ifBodyHashCode = - (IfBody == null ? base.GetHashCode() : IfBody.GetHashCode()); - var elseBodyHashCode = - (ElseBody == null ? base.GetHashCode() : ElseBody.GetHashCode()); - - return ifExprNodeHashCode ^ ifBodyHashCode ^ elseBodyHashCode; - } - - public override AstKind Kind - { - get - { - return AstKind.If; - } - } - - public override TResult Accept(IAstVisitor visitor) - { - return visitor.VisitIfStatementNode(this); - } - - public override IEnumerable Children() - { - return this.ifExprNode.AsEnumerable() - .Concat(this.IfBody) - .Concat(this.ElseBody); - } - } public class InlineConditionalNode : AssociativeNode { @@ -1995,9 +1939,6 @@ public class InlineConditionalNode : AssociativeNode public AssociativeNode TrueExpression { get; set; } public AssociativeNode FalseExpression { get; set; } - [Obsolete("IsAutogenerated property is deprecated and is not used. Please remove in 3.0")] - public bool IsAutoGenerated { get; set; } - public InlineConditionalNode() { } diff --git a/src/Engine/ProtoCore/ProcedureTable.cs b/src/Engine/ProtoCore/ProcedureTable.cs index 1caaa932c40..ee67ae2c4ba 100644 --- a/src/Engine/ProtoCore/ProcedureTable.cs +++ b/src/Engine/ProtoCore/ProcedureTable.cs @@ -351,37 +351,6 @@ public IEnumerable GetFunctionsByNameAndArgumentNumber(string nam }).OrderBy(p => p.ArgumentTypes.Count - argumentNumber); } - [Obsolete("This method will be removed in Dynamo 3.0.")] - public int IndexOf(string name, List argTypeList, bool isStaticOrConstructor = false) - { - ProcedureMatchOptions opts = new ProcedureMatchOptions() { - FunctionName = name, - ParameterTypes = argTypeList, - ExcludeAutoGeneratedThisProc = true, - ExactMatchWithNumArgs = false, - ExactMatchWithArgTypes = false, - FilterCallback = x => !isStaticOrConstructor || (x.IsStatic || x.IsConstructor) - }; - return GetFunctionBySignature(opts, out ProcedureNode _); - } - - /// - /// Get function by its signature. - /// - /// - /// - /// - [Obsolete("This method will be removed in Dynamo 3.0.")] - public ProcedureNode GetFunctionBySignature(string functionName, List parameterTypes) - { - GetFunctionBySignature(new ProcedureMatchOptions() - { - FunctionName = functionName, - ParameterTypes = parameterTypes - }, out ProcedureNode output); - return output; - } - /// /// Get function by its signature. /// diff --git a/src/Engine/ProtoCore/Reflection/MirrorData.cs b/src/Engine/ProtoCore/Reflection/MirrorData.cs index 1cd4af0dc52..541d9165f95 100644 --- a/src/Engine/ProtoCore/Reflection/MirrorData.cs +++ b/src/Engine/ProtoCore/Reflection/MirrorData.cs @@ -71,33 +71,6 @@ public MirrorData(ProtoCore.Core core, ProtoCore.RuntimeCore runtimeCore, StackV } - /// - /// Retrieves list of IGraphicItem to get the graphic - /// representation/preview of this Data. - /// - /// List of IGraphicItem - /// This method is marked as obsolete because it's possible - /// to get the CLR object from this mirror data and client can handle - /// any query to IGraphicItem on the CLR object directly. - [System.Obsolete("Query IGraphicItem from Data property of this class")] - public List GetGraphicsItems() - { - List values = new List(); - GetPointersRecursively(svData, values); - - List graphicItems = new List(); - foreach (var sv in values) - { - List items = dataProvider.GetGraphicItems(sv, this.runtimeCore); - if (items != null && (items.Count > 0)) - graphicItems.AddRange(items); - } - if (graphicItems.Count > 0) - return graphicItems; - - return null; - } - /// /// Recursively finds all Pointers from the stack value /// diff --git a/src/Engine/ProtoCore/SyntaxAnalysis/AssociativeAstVisitor.cs b/src/Engine/ProtoCore/SyntaxAnalysis/AssociativeAstVisitor.cs index cc751ae28fe..8c9baab999d 100644 --- a/src/Engine/ProtoCore/SyntaxAnalysis/AssociativeAstVisitor.cs +++ b/src/Engine/ProtoCore/SyntaxAnalysis/AssociativeAstVisitor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using ProtoCore.AST; @@ -147,12 +147,6 @@ public virtual bool VisitFunctionDefinitionNode(FunctionDefinitionNode node) return DefaultVisit(node); } - [Obsolete("VisitIfStatementNode method is deprecated and not used. To be remove in 3.0")] - public virtual bool VisitIfStatementNode(IfStatementNode node) - { - return DefaultVisit(node); - } - public virtual bool VisitInlineConditionalNode(InlineConditionalNode node) { node.ConditionExpression.Accept(this); @@ -370,12 +364,6 @@ public virtual TResult VisitFunctionDefinitionNode(FunctionDefinitionNode node) return DefaultVisit(node); } - [Obsolete("VisitIfStatementNode method is deprecated and not used. To be remove in 3.0")] - public virtual TResult VisitIfStatementNode(IfStatementNode node) - { - return DefaultVisit(node); - } - public virtual TResult VisitInlineConditionalNode(InlineConditionalNode node) { return DefaultVisit(node); diff --git a/src/Engine/ProtoCore/SyntaxAnalysis/AstVisitor.cs b/src/Engine/ProtoCore/SyntaxAnalysis/AstVisitor.cs index cebe9ec7e75..f06f6f3b017 100644 --- a/src/Engine/ProtoCore/SyntaxAnalysis/AstVisitor.cs +++ b/src/Engine/ProtoCore/SyntaxAnalysis/AstVisitor.cs @@ -128,12 +128,6 @@ public virtual TAssociative VisitFunctionDefinitionNode(FunctionDefinitionNode n return VisitAssociativeNode(node); } - [Obsolete("VisitIfStatementNode method is deprecated and not used. To be remove in 3.0")] - public virtual TAssociative VisitIfStatementNode(IfStatementNode node) - { - return VisitAssociativeNode(node); - } - public virtual TAssociative VisitInlineConditionalNode(InlineConditionalNode node) { return VisitAssociativeNode(node); diff --git a/src/Engine/ProtoCore/SyntaxAnalysis/Interface/Associative.cs b/src/Engine/ProtoCore/SyntaxAnalysis/Interface/Associative.cs index eed4cee8cf9..b13f27ff6d7 100644 --- a/src/Engine/ProtoCore/SyntaxAnalysis/Interface/Associative.cs +++ b/src/Engine/ProtoCore/SyntaxAnalysis/Interface/Associative.cs @@ -51,9 +51,6 @@ public interface IAstVisitor TResult VisitFunctionDefinitionNode(FunctionDefinitionNode node); - [Obsolete("VisitIfStatementNode method is deprecated and not used. To be remove in 3.0")] - TResult VisitIfStatementNode(IfStatementNode node); - TResult VisitInlineConditionalNode(InlineConditionalNode node); TResult VisitBinaryExpressionNode(BinaryExpressionNode node); diff --git a/src/Engine/ProtoCore/Utils/ClassUtils.cs b/src/Engine/ProtoCore/Utils/ClassUtils.cs index 39be323935d..6f218e9d073 100644 --- a/src/Engine/ProtoCore/Utils/ClassUtils.cs +++ b/src/Engine/ProtoCore/Utils/ClassUtils.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using ProtoCore.DSASM; @@ -55,30 +55,6 @@ public static int GetUpcastCountTo(ClassNode from, ClassNode to, RuntimeCore run } - // classScope is a global context, it tells we are in which class's scope - // functionScope is telling us which function we are in. - // - // 1. Try to find if the target is a member function's local variable - // classScope != kInvalidIndex && functionScope != kInvalidIndex; - // - // 2. Try to find if the target is a member variable - // 2.1 In a member functions classScope != kInvalidIndex && functionScope != kInvalidIndex. - // Returns member in derived class, or non-private member in base classes - // - // 2.2 In a global functions classScope == kInvalidIndex && functionScope != kInvalidIndex. - // Returns public member in derived class, or public member in base classes - // - // 2.3 Otherwise, classScope == kInvalidIndex && functionScope == kInvalidIndex - // Return public member in derived class, or public member in base classes - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public static int GetSymbolIndex(ClassNode classNode, string name, int classScope, int functionScope, int blockId, List codeblocks, out bool hasThisSymbol, out ProtoCore.DSASM.AddressType addressType) - { - var dict = new SortedDictionary(); - codeblocks.ForEach(x => dict.Add(x.codeBlockId, x)); - - return GetSymbolIndex(classNode, name, classScope, functionScope, blockId, dict, out hasThisSymbol, out addressType); - } - // classScope is a global context, it tells we are in which class's scope // functionScope is telling us which function we are in. // @@ -179,15 +155,6 @@ internal static int GetSymbolIndex(ClassNode classNode, string name, int classSc return Constants.kInvalidIndex; } - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public static List GetAncestorBlockIdsOfBlock(int blockId, List codeblocks) - { - var dict = new SortedDictionary(); - codeblocks.ForEach(x => dict.Add(x.codeBlockId, x)); - - return GetAncestorBlockIdsOfBlock(blockId, dict); - } - internal static List GetAncestorBlockIdsOfBlock(int blockId, SortedDictionary codeblocks) { var ancestors = new List(); diff --git a/src/Engine/ProtoCore/Utils/CompilerUtils.cs b/src/Engine/ProtoCore/Utils/CompilerUtils.cs index 8e0d7da0c5b..7ab4e22195e 100644 --- a/src/Engine/ProtoCore/Utils/CompilerUtils.cs +++ b/src/Engine/ProtoCore/Utils/CompilerUtils.cs @@ -265,22 +265,6 @@ public static bool TryLoadAssemblyIntoCore(Core core, string assemblyPath) return status.ErrorCount == 0; } - /// - /// Pre-compiles DS code in code block node, - /// checks for syntax, converts non-assignments to assignments, - /// stores list of AST nodes, errors and warnings - /// Evaluates and stores list of unbound identifiers - /// - /// - /// container for compilation related parameters - /// - /// true if code compilation succeeds, false otherwise - [Obsolete("This method is deprecated and will be removed in Dynamo 3.0")] - public static bool PreCompileCodeBlock(Core core, ref ParseParam parseParams, IDictionary priorNames = null) - { - return PreCompileCodeBlock(core, parseParams, priorNames); - } - /// /// Pre-compiles DS code in code block node, /// checks for syntax, converts non-assignments to assignments, diff --git a/src/Engine/ProtoCore/Utils/MathUtils.cs b/src/Engine/ProtoCore/Utils/MathUtils.cs index 8c25e68ca35..26042c79d70 100644 --- a/src/Engine/ProtoCore/Utils/MathUtils.cs +++ b/src/Engine/ProtoCore/Utils/MathUtils.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace ProtoCore.Utils { @@ -6,30 +6,6 @@ public static class MathUtils { public static double Tolerance = 1e-5; - [Obsolete("This method is no longer used. Remove in Dynamo 3.0")] - public static bool IsLessThan(double lhs, double rhs) - { - return (lhs rhs) && !Equals(lhs, rhs); - } - - [Obsolete("This method is no longer used. Remove in Dynamo 3.0")] - public static bool IsGreaterThanOrEquals(double lhs, double rhs) - { - return (lhs > rhs) || Equals(lhs, rhs); - } - - [Obsolete("This method is no longer used. Remove in Dynamo 3.0")] - public static bool IsLessThanOrEquals(double lhs, double rhs) - { - return (lhs < rhs) || Equals(lhs, rhs); - } - public static bool Equals(double lhs, double rhs, double tolerance) { if (double.IsPositiveInfinity(lhs) && double.IsPositiveInfinity(rhs)) diff --git a/src/Engine/ProtoScript/Runners/LiveRunner.cs b/src/Engine/ProtoScript/Runners/LiveRunner.cs index 5ecef837abb..a4908a75044 100644 --- a/src/Engine/ProtoScript/Runners/LiveRunner.cs +++ b/src/Engine/ProtoScript/Runners/LiveRunner.cs @@ -1198,7 +1198,6 @@ public interface ILiveRunner #region Synchronous call void UpdateGraph(GraphSyncData syncData); List PreviewGraph(GraphSyncData syncData); - void UpdateCmdLineInterpreter(string code); ProtoCore.Mirror.RuntimeMirror InspectNodeValue(string nodeName); void UpdateGraph(AssociativeNode astNode); @@ -1510,19 +1509,6 @@ public void UpdateGraph(AssociativeNode astNode) } - /// - /// This api needs to be called by a command line REPL for each DS command/expression entered to be executed - /// - /// - [Obsolete("No longer used. Remove in 3.0")] - public void UpdateCmdLineInterpreter(string code) - { - lock (mutexObject) - { - SynchronizeInternal(code); - } - } - #region Internal Implementation private bool Compile(List astList, Core targetCore) diff --git a/src/GraphNodeManagerViewExtension/GraphNodeManagerViewModel.cs b/src/GraphNodeManagerViewExtension/GraphNodeManagerViewModel.cs index 8d2f6d9410d..ea4e8bc2871 100644 --- a/src/GraphNodeManagerViewExtension/GraphNodeManagerViewModel.cs +++ b/src/GraphNodeManagerViewExtension/GraphNodeManagerViewModel.cs @@ -195,8 +195,7 @@ public GraphNodeManagerViewModel(ViewLoadedParams p, string id, Action().FirstOrDefault(); diff --git a/src/Libraries/CoreNodeModels/Input/BasicInteractive.cs b/src/Libraries/CoreNodeModels/Input/BasicInteractive.cs index 53f04fcc9a9..233db84d810 100644 --- a/src/Libraries/CoreNodeModels/Input/BasicInteractive.cs +++ b/src/Libraries/CoreNodeModels/Input/BasicInteractive.cs @@ -47,8 +47,8 @@ public override NodeInputData InputData Name = this.Name, //use the type to convert to the correct nodeTypeString defined by //the schema - Type = NodeInputData.getNodeInputTypeFromType(typeof(T)), - Type2 = NodeInputData.getNodeInputTypeFromType(typeof(T)), + Type = NodeInputData.GetNodeInputTypeFromType(typeof(T)), + Type2 = NodeInputData.GetNodeInputTypeFromType(typeof(T)), Description = this.Description, Value = Value.ToString(), }; @@ -71,11 +71,6 @@ protected BasicInteractive() RegisterAllPorts(); } - public override string PrintExpression() - { - return Value.ToString(); - } - public override bool IsConvertible { get { return true; } diff --git a/src/Libraries/CoreNodeModels/Input/BoolSelector.cs b/src/Libraries/CoreNodeModels/Input/BoolSelector.cs index f1cb7c62a6b..2c86d4e1690 100644 --- a/src/Libraries/CoreNodeModels/Input/BoolSelector.cs +++ b/src/Libraries/CoreNodeModels/Input/BoolSelector.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using CoreNodeModels.Properties; using Dynamo.Graph; using Dynamo.Graph.Nodes; @@ -50,8 +50,8 @@ public override NodeInputData InputData { Id = this.GUID, Name = this.Name, - Type = NodeInputData.getNodeInputTypeFromType(typeof(System.Boolean)), - Type2 = NodeInputData.getNodeInputTypeFromType(typeof(System.Boolean)), + Type = NodeInputData.GetNodeInputTypeFromType(typeof(System.Boolean)), + Type2 = NodeInputData.GetNodeInputTypeFromType(typeof(System.Boolean)), Description = this.Description, Value = Value.ToString().ToLower(), }; diff --git a/src/Libraries/CoreNodeModels/Input/CustomSelection.cs b/src/Libraries/CoreNodeModels/Input/CustomSelection.cs index 923bf829974..6bcb5317343 100644 --- a/src/Libraries/CoreNodeModels/Input/CustomSelection.cs +++ b/src/Libraries/CoreNodeModels/Input/CustomSelection.cs @@ -130,36 +130,5 @@ private void OnSerializing(StreamingContext context) { serializedItems = Items.ToList(); } - - [Obsolete] - protected override void SerializeCore(XmlElement nodeElement, SaveContext context) - { - nodeElement.SetAttribute("serializedItems", JsonConvert.SerializeObject(Items)); - - base.SerializeCore(nodeElement, context); - } - - [Obsolete] - protected override void DeserializeCore(XmlElement nodeElement, SaveContext context) - { - XmlAttribute itemsAttribute = nodeElement.Attributes["serializedItems"]; - - if (itemsAttribute == null) - { - return; - } - - List items = JsonConvert.DeserializeObject>(itemsAttribute.Value); - - Items.Clear(); - - foreach (DynamoDropDownItem item in items) - { - Items.Add(item); - } - - base.DeserializeCore(nodeElement, context); - } - } -} \ No newline at end of file +} diff --git a/src/Libraries/CoreNodeModels/Input/DateTime.cs b/src/Libraries/CoreNodeModels/Input/DateTime.cs index fdb059e2774..daadb8d2d5e 100644 --- a/src/Libraries/CoreNodeModels/Input/DateTime.cs +++ b/src/Libraries/CoreNodeModels/Input/DateTime.cs @@ -41,8 +41,8 @@ public override NodeInputData InputData { Id = this.GUID, Name = this.Name, - Type = NodeInputData.getNodeInputTypeFromType(typeof(System.DateTime)), - Type2 = NodeInputData.getNodeInputTypeFromType(typeof(System.DateTime)), + Type = NodeInputData.GetNodeInputTypeFromType(typeof(System.DateTime)), + Type2 = NodeInputData.GetNodeInputTypeFromType(typeof(System.DateTime)), Description = this.Description, //format dateTime with swagger spec in mind: ISO 8601. Value = Value.ToString("o", CultureInfo.InvariantCulture), diff --git a/src/Libraries/CoreNodeModels/Input/String.cs b/src/Libraries/CoreNodeModels/Input/String.cs index 73f44284675..b29c5286fd2 100644 --- a/src/Libraries/CoreNodeModels/Input/String.cs +++ b/src/Libraries/CoreNodeModels/Input/String.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Dynamo.Graph; using Dynamo.Graph.Nodes; using ProtoCore.AST.AssociativeAST; @@ -15,11 +15,6 @@ protected String(IEnumerable inPorts, IEnumerable outPorts { } - public override string PrintExpression() - { - return "\"" + base.PrintExpression() + "\""; - } - protected override bool UpdateValueCore(UpdateValueParams updateValueParams) { string name = updateValueParams.PropertyName; @@ -51,4 +46,4 @@ protected override string SerializeValue() return this.Value; } } -} \ No newline at end of file +} diff --git a/src/Libraries/CoreNodes/Python.cs b/src/Libraries/CoreNodes/Python.cs index 5e027cf71f9..29ef233a47e 100644 --- a/src/Libraries/CoreNodes/Python.cs +++ b/src/Libraries/CoreNodes/Python.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections; using System.Linq; using Autodesk.DesignScript.Runtime; @@ -6,23 +6,6 @@ namespace DSCore { - /// - /// Python evaluator that will only throw an error on evaluation. - /// Used primarily to indicate that a real Python evaluator could not be found. - /// - [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0")] - public static class DummyPythonEvaluator - { - /// - /// Throws an exception with the assigned message - /// - public static object Evaluate(string code, IList bindingNames, [ArbitraryDimensionArrayImport] IList bindingValues) - { - throw new InvalidOperationException(Properties.Resources.MissingPythonEngine); - } - } - /// /// Evaluate python code on any Python engine. Should only be used in VM /// @@ -42,4 +25,4 @@ public static object Evaluate(string engineName, return engine?.Evaluate(code, bindingNames, bindingValues) ?? null; } } -} \ No newline at end of file +} diff --git a/src/Libraries/DSCPython/CPythonEvaluator.cs b/src/Libraries/DSCPython/CPythonEvaluator.cs index 4b792f15e03..6d3fa9a6c47 100644 --- a/src/Libraries/DSCPython/CPythonEvaluator.cs +++ b/src/Libraries/DSCPython/CPythonEvaluator.cs @@ -617,9 +617,6 @@ private static bool IsMarkedToSkipConversion(PyObject pyObj) #region Evaluation events - - - /// /// Emitted immediately before execution begins /// @@ -642,7 +639,6 @@ private void OnEvaluationBegin(PyScope scope, string code, IList bindingValues) { - if (EvaluationStarted != null) { EvaluationStarted(code, bindingValues, (n, v) => { scope.Set(n, InputMarshaler.Marshal(v).ToPython()); }); @@ -665,7 +661,6 @@ private void OnEvaluationEnd(bool isSuccessful, string code, IList bindingValues) { - if (EvaluationFinished != null) { EvaluationFinished(isSuccessful ? Dynamo.PythonServices.EvaluationState.Success : Dynamo.PythonServices.EvaluationState.Failed, diff --git a/src/Libraries/DynamoUnits/Properties/AssemblyInfo.cs b/src/Libraries/DynamoUnits/Properties/AssemblyInfo.cs index 89ad6cc2ecb..e242821415e 100644 --- a/src/Libraries/DynamoUnits/Properties/AssemblyInfo.cs +++ b/src/Libraries/DynamoUnits/Properties/AssemblyInfo.cs @@ -13,7 +13,3 @@ [assembly:InternalsVisibleTo("DynamoCoreTests")] [assembly: InternalsVisibleTo("DynamoCoreWpfTests")] [assembly: InternalsVisibleTo("UnitsNodeModels")] - - -//move DynamoUnits.Display to DynamoServices.dll -[assembly: TypeForwardedTo(typeof(DynamoUnits.Display))] diff --git a/src/Libraries/DynamoUnits/Units.cs b/src/Libraries/DynamoUnits/Units.cs index cc629b9e7dd..715f2a4a3fb 100644 --- a/src/Libraries/DynamoUnits/Units.cs +++ b/src/Libraries/DynamoUnits/Units.cs @@ -8,7 +8,7 @@ namespace DynamoUnits { [SupressImportIntoVM] [IsVisibleInDynamoLibrary(false)] - [Obsolete("This enum will be removed in Dynamo 3.0 - please use the Length Quantity type and Quantity.Units property")] + [Obsolete("This enum will be removed in a future version of Dynamo - please use the Length Quantity type and Quantity.Units property")] public enum LengthUnit { DecimalInch, @@ -22,7 +22,7 @@ public enum LengthUnit [SupressImportIntoVM] [IsVisibleInDynamoLibrary(false)] - [Obsolete("This enum will be removed in Dynamo 3.0 - please use the Area Quantity type and Quantity.Units property")] + [Obsolete("This enum will be removed in a future version of Dynamo - please use the Area Quantity type and Quantity.Units property")] public enum AreaUnit { SquareInch, @@ -34,7 +34,7 @@ public enum AreaUnit [SupressImportIntoVM] [IsVisibleInDynamoLibrary(false)] - [Obsolete("This enum will be removed in Dynamo 3.0 - please use the Volume Quantity type and Quantity.Units property")] + [Obsolete("This enum will be removed in a future version of Dynamo - please use the Volume Quantity type and Quantity.Units property")] public enum VolumeUnit { CubicInch, @@ -46,7 +46,7 @@ public enum VolumeUnit [SupressImportIntoVM] [IsVisibleInDynamoLibrary(false)] - [Obsolete("This method will be removed in Dynamo 3.0 - please use the Power Per Area Quantity type and Quantity.Units property")] + [Obsolete("This method will be removed in a future version of Dynamo - please use the Power Per Area Quantity type and Quantity.Units property")] public enum InsolationUnit { WattHoursPerMeterSquared, @@ -55,7 +55,7 @@ public enum InsolationUnit } [SupressImportIntoVM] - [Obsolete("This class will be removed in Dynamo 3.0 - please use the ForgeUnit SDK based types")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the ForgeUnit SDK based types")] public class BaseUnit { private static double epsilon = 1e-6; @@ -105,7 +105,7 @@ public static string GeneralNumberFormat } [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0 - please use the ForgeUnit SDK based methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the ForgeUnit SDK based methods")] public abstract class SIUnit : BaseUnit { /// @@ -371,7 +371,7 @@ public static Dictionary Conversions { /// is stored as meters to make algorithms simpler. /// [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0 - please use the Length Quantity type and Utilities.ConvertByUnits methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Length Quantity type and Utilities.ConvertByUnits methods")] public class Length : SIUnit, IComparable, IEquatable { //length conversions @@ -771,7 +771,7 @@ public override int GetHashCode() /// An area stored in square meters. /// [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0 - please use the Area Quantity type and Utilities.ConvertByUnits methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Area Quantity type and Utilities.ConvertByUnits methods")] public class Area : SIUnit, IComparable, IEquatable { //area conversions @@ -1135,7 +1135,7 @@ public override int GetHashCode() /// A volume stored in cubic meters. /// [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0 - please use the Volume Quantity type and Utilities.ConvertByUnits methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Volume Quantity type and Utilities.ConvertByUnits methods")] public class Volume : SIUnit, IComparable, IEquatable { //volume conversions @@ -1489,7 +1489,7 @@ public override int GetHashCode() /// An insolation stored in killowatt hours per meter squared. /// [IsVisibleInDynamoLibrary(false)] - [Obsolete("This class will be removed in Dynamo 3.0 - - please use the Power Per Area Quantity type and Utilities.ConvertByUnits methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Power Per Area Quantity type and Utilities.ConvertByUnits methods")] public class Insolation : SIUnit, IComparable, IEquatable { //insolation converstions @@ -1695,7 +1695,7 @@ public override string ToString() } [SupressImportIntoVM] - [Obsolete("This class will be removed in Dynamo 3.0 - - please use the Quantity and Unit types and associated methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Quantity and Unit types and associated methods")] public static class UnitExtensions { public static bool AlmostEquals(this double double1, double double2, double precision) @@ -1723,7 +1723,7 @@ public static Volume ToVolume(this Double value) /// Utility class for operating on units of measure. /// [SupressImportIntoVM] - [Obsolete("This class will be removed in Dynamo 3.0 - - please use the Unit.Utilities class and associated methods")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the Unit.Utilities class and associated methods")] public class Utils { private const int ROUND_DIGITS = 5; @@ -2072,7 +2072,7 @@ public static void ParseVolumeFromString(string value, out double cubic_inch, ou } [SupressImportIntoVM] - [Obsolete("This exception will be removed in Dynamo 3.0 - please use the Unit.Utilities class and associated methods")] + [Obsolete("This exception will be removed in a future version of Dynamo - please use the Unit.Utilities class and associated methods")] public class MathematicalArgumentException : Exception { public MathematicalArgumentException() : base("The result could not be computed given the provided inputs.") { } @@ -2080,14 +2080,14 @@ public MathematicalArgumentException(string message) : base(message) { } } [SupressImportIntoVM] - [Obsolete("This exception will be removed in Dynamo 3.0 - please use the Unit.Utilities class and associated methods")] + [Obsolete("This exception will be removed in a future version of Dynamo - please use the Unit.Utilities class and associated methods")] public class UnitsException : MathematicalArgumentException { public UnitsException(Type a, Type b) : base(string.Format("{0} and {1} are incompatible for this operation.", a, b)) { } } [SupressImportIntoVM] - [Obsolete("This interface will be removed in Dynamo 3.0 - please use the ForgeUnit SDK based methods")] + [Obsolete("This interface will be removed in a future version of Dynamo - please use the ForgeUnit SDK based methods")] public interface IUnitInput { double ConvertToHostUnits(); diff --git a/src/Libraries/UnitsNodeModels/UnitNodeModels.cs b/src/Libraries/UnitsNodeModels/UnitNodeModels.cs index 2a9e86d5148..fb6d1f10f8b 100644 --- a/src/Libraries/UnitsNodeModels/UnitNodeModels.cs +++ b/src/Libraries/UnitsNodeModels/UnitNodeModels.cs @@ -24,7 +24,7 @@ namespace UnitsUI /// Class defining the behaviour of a nodemodel which has no inputs, but rather uses wpf comboboxes to select items from collections. /// It then outputs a formatted string from the selections made. /// - [Obsolete("This abstract class will be removed in Dynamo 3.0 - This abstract class will be removed in Dynamo 3.0 - please use the UnitInput node")] + [Obsolete("This abstract class will be removed in a future version of Dynamo - please use the UnitInput node")] public abstract class MeasurementInputBase : NodeModel { [JsonIgnore] @@ -76,11 +76,6 @@ protected override void DeserializeCore(XmlElement nodeElement, SaveContext cont } } - public override string PrintExpression() - { - return Value.ToString(); - } - protected double DeserializeValue(string val) { try diff --git a/src/Libraries/UnitsUI/NodeViewCustomizations.cs b/src/Libraries/UnitsUI/NodeViewCustomizations.cs index 856edb135a2..015f273f6a8 100644 --- a/src/Libraries/UnitsUI/NodeViewCustomizations.cs +++ b/src/Libraries/UnitsUI/NodeViewCustomizations.cs @@ -17,7 +17,7 @@ namespace UnitsUI { - [Obsolete("This abstract class will be removed in Dynamo 3.0 - please use the StringInputNodeViewCustomization")] + [Obsolete("This abstract class will be removed in a future version of Dynamo - please use the StringInputNodeViewCustomization")] public abstract class MeasurementInputBaseNodeViewCustomization : INodeViewCustomization { private MeasurementInputBase mesBaseModel; @@ -108,7 +108,7 @@ public void Dispose() } } - [Obsolete("This class will be removed in Dynamo 3.0 - please use the StringInputNodeViewCustomization")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the StringInputNodeViewCustomization")] public class LengthFromStringNodeViewCustomization : MeasurementInputBaseNodeViewCustomization, INodeViewCustomization { @@ -118,7 +118,7 @@ public void CustomizeView(LengthFromString model, NodeView nodeView) } } - [Obsolete("This class will be removed in Dynamo 3.0 - please use the StringInputNodeViewCustomization")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the StringInputNodeViewCustomization")] public class AreaFromStringNodeViewCustomization : MeasurementInputBaseNodeViewCustomization, INodeViewCustomization { @@ -128,7 +128,7 @@ public void CustomizeView(AreaFromString model, NodeView nodeView) } } - [Obsolete("This class will be removed in Dynamo 3.0 - please use the StringInputNodeViewCustomization")] + [Obsolete("This class will be removed in a future version of Dynamo - please use the StringInputNodeViewCustomization")] public class VolumeFromStringNodeViewCustomization : MeasurementInputBaseNodeViewCustomization, INodeViewCustomization { diff --git a/src/LibraryViewExtensionWebView2/LibraryViewController.cs b/src/LibraryViewExtensionWebView2/LibraryViewController.cs index 749598a66c8..45a84390c9a 100644 --- a/src/LibraryViewExtensionWebView2/LibraryViewController.cs +++ b/src/LibraryViewExtensionWebView2/LibraryViewController.cs @@ -187,7 +187,6 @@ public void CreateNode(string nodeName) //Create the node of given item name var cmd = new DynamoModel.CreateNodeCommand(Guid.NewGuid().ToString(), nodeName, -1, -1, true, false); commandExecutive.ExecuteCommand(cmd, Guid.NewGuid().ToString(), LibraryViewExtensionWebView2.ExtensionName); - LogEventsToInstrumentation(CreateNodeInstrumentationString, nodeName); this.disableObserver = false; })); @@ -203,19 +202,6 @@ public void ImportLibrary() )); } - /// - /// This function logs events to instrumentation if it matches a set of known events - /// - /// Event Name that gets logged to instrumentation - /// Data that gets logged to instrumentation - public void LogEventsToInstrumentation(string eventName, string data) - { - if (eventName == "Search" || eventName == "Filter-Categories" || eventName == "Search-NodeAdded") - { - Analytics.LogPiiInfo(eventName, data); - } - } - /// /// This method will read the layoutSpecs.json and layoutType and then pass the info to javacript so all the resources can be loaded /// diff --git a/src/LibraryViewExtensionWebView2/ScriptingObject.cs b/src/LibraryViewExtensionWebView2/ScriptingObject.cs index e143df61cb1..b53f2e36e09 100644 --- a/src/LibraryViewExtensionWebView2/ScriptingObject.cs +++ b/src/LibraryViewExtensionWebView2/ScriptingObject.cs @@ -94,11 +94,6 @@ internal void Notify(string dataFromjs) { controller.ImportLibrary(); } - else if (funcName == "logEventsToInstrumentation") - { - var data = (simpleRPCPayload["data"] as JArray).Children(); - controller.LogEventsToInstrumentation(data.ElementAt(0).Value(), data.ElementAt(1).Value()); - } else if (funcName == "performSearch") { var data = simpleRPCPayload["data"] as string; diff --git a/src/NodeServices/Analytics.cs b/src/NodeServices/Analytics.cs index 40efd6478fd..9527acb5083 100644 --- a/src/NodeServices/Analytics.cs +++ b/src/NodeServices/Analytics.cs @@ -142,8 +142,6 @@ public static void TrackException(Exception ex, bool isFatal) sb.AppendLine("Fatal: " + isFatal); sb.AppendLine("Message: " + ex.Message); sb.AppendLine("StackTrace: " + ex.StackTrace); - - LogPiiInfo("Analytics.TrackException", sb.ToString()); } /// @@ -254,16 +252,5 @@ public static Task TrackTaskFileOperationEvent(string filepath, Act return client.TrackTaskFileOperationEvent(filepath, operation, size, description); } - - /// - /// Logs usage data - /// - /// Usage tag - /// Usage data - [Obsolete("Function will be removed in Dynamo 3.0 as Dynamo will no longer support GA instrumentation.")] - public static void LogPiiInfo(string tag, string data) - { - if (client != null) client.LogPiiInfo(tag, data); - } } } diff --git a/src/NodeServices/DynamoUnitsDisplay.cs b/src/NodeServices/DynamoUnitsDisplay.cs index 9571827ffb1..875e3a7e092 100644 --- a/src/NodeServices/DynamoUnitsDisplay.cs +++ b/src/NodeServices/DynamoUnitsDisplay.cs @@ -9,9 +9,9 @@ namespace DynamoUnits /// /// Data used to set display and formatting preferences for Dynamo UI /// - [Obsolete("This type will be removed in Dynamo 3.0, please use PreferenceSettings.NumberFormat instead. ")] + [Obsolete("This type will be removed in a future version of Dynamo, please use PreferenceSettings.NumberFormat instead. ")] [IsVisibleInDynamoLibrary(false)] - public class Display + internal class Display { /// /// Precision format for number of decimals to display within Dynamo UI diff --git a/src/NodeServices/GraphicsDataInterfaces.cs b/src/NodeServices/GraphicsDataInterfaces.cs index fda972bc13e..cb59b84677f 100644 --- a/src/NodeServices/GraphicsDataInterfaces.cs +++ b/src/NodeServices/GraphicsDataInterfaces.cs @@ -303,7 +303,7 @@ public interface IRenderPackageSupplement /// This flag is used by the UpdateRenderPackageAsyncTask implementation to flag /// any third party usage of deprecated color methods in IRenderPackage API /// - [Obsolete("Do not use! This will be removed in Dynamo 3.0")] + [Obsolete("Do not use! This will be removed in a future version of Dynamo")] bool AllowLegacyColorOperations { get; set; } } diff --git a/src/NodeServices/IAnalyticsClient.cs b/src/NodeServices/IAnalyticsClient.cs index 034910f85f3..16c8c263597 100644 --- a/src/NodeServices/IAnalyticsClient.cs +++ b/src/NodeServices/IAnalyticsClient.cs @@ -590,12 +590,5 @@ public interface IAnalyticsClient /// Event description /// Event as IDisposable Task TrackTaskFileOperationEvent(string filepath, Actions operation, int size, string description); - - /// - /// Logs usage data - /// - /// Usage tag - /// Usage data - void LogPiiInfo(string tag, string data); } } diff --git a/src/NodeServices/Properties/AssemblyInfo.cs b/src/NodeServices/Properties/AssemblyInfo.cs index 3b3ba863b4a..beb11749197 100644 --- a/src/NodeServices/Properties/AssemblyInfo.cs +++ b/src/NodeServices/Properties/AssemblyInfo.cs @@ -42,3 +42,4 @@ [assembly: InternalsVisibleTo("DynamoPlayer")] [assembly: InternalsVisibleTo("DynamoConnector")] [assembly: InternalsVisibleTo("DynamoApplications")] +[assembly: InternalsVisibleTo("DynamoUnits")] diff --git a/src/NodeServices/PythonServices.cs b/src/NodeServices/PythonServices.cs index 62ed23fc9d4..6f6c0f2ce4a 100644 --- a/src/NodeServices/PythonServices.cs +++ b/src/NodeServices/PythonServices.cs @@ -306,10 +306,8 @@ internal abstract class PythonCodeCompletionProviderCommon : IExternalCodeComple internal static readonly string atLeastOneSpaceRegex = @"(\s+)"; internal static readonly string dictRegex = "({.*})"; internal static readonly string basicImportRegex = @"(import)"; - internal static readonly string fromImportRegex = @"^(from)"; internal static string doubleQuoteStringRegex = "(\"[^\"]*\")"; // Replaced w/ quotesStringRegex - Remove in Dynamo 3.0 - internal static string singleQuoteStringRegex = "(\'[^\']*\')"; // Replaced w/ quotesStringRegex - Remove in Dynamo 3.0 + internal static readonly string fromImportRegex = @"^(from)"; internal static string arrayRegex = "(\\[.*\\])"; - internal static string equals = @"(=)"; // Not CLS compliant - replaced with equalsRegex - Remove in Dynamo 3.0 internal static string doubleRegex = @"([-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?)"; internal static string intRegex = @"([-+]?\d+)[\s\n]*$"; internal const string quotesStringRegex = "[\"']([^\"']*)[\"']"; diff --git a/src/Tools/DynamoShapeManager/Utilities.cs b/src/Tools/DynamoShapeManager/Utilities.cs index 90647d7157d..646893be1b9 100644 --- a/src/Tools/DynamoShapeManager/Utilities.cs +++ b/src/Tools/DynamoShapeManager/Utilities.cs @@ -154,83 +154,6 @@ private static List ProductsWithASM public static readonly string ASMFileMask = "ASMAHL*A.dll"; #endregion - - /// - /// Call this method to determine the version of ASM that is installed - /// on the user machine. The method scans through a list of known Autodesk - /// product folders for ASM binaries with the targeted version. - /// - /// A list of version numbers to check for in order - /// of preference. This argument cannot be null or empty. - /// The full path of the directory in which targeted - /// ASM binaries are found. This argument cannot be null. - /// This method makes use of DynamoInstallDetective - /// to determine the installation location of various Autodesk products. This - /// argument is not optional and must represent the full path to the folder - /// which contains DynamoInstallDetective.dll. An exception is thrown if the - /// assembly cannot be located. - /// Returns LibraryVersion of ASM if any installed ASM is found, - /// or None otherwise. - /// - [Obsolete("Please use version of this method which accepts precise collection of version objects.")] -#if NET6_0_OR_GREATER - [System.Runtime.Versioning.SupportedOSPlatform("windows")] -#endif - public static LibraryVersion GetInstalledAsmVersion(List versions, ref string location, string rootFolder) - { - if (string.IsNullOrEmpty(rootFolder)) - throw new ArgumentNullException("rootFolder"); - if (!Directory.Exists(rootFolder)) - throw new DirectoryNotFoundException(rootFolder); - if ((versions == null) || versions.Count <= 0) - throw new ArgumentNullException("versions"); - if (location == null) - throw new ArgumentNullException("location"); - - location = string.Empty; - - try - { - var installations = GetAsmInstallations(rootFolder); - - foreach (var v in versions) - { - foreach (KeyValuePair> install in installations) - { - if ((int)v == install.Value.Item1) - { - location = install.Key; - return (LibraryVersion)install.Value.Item1; - } - } - } - - - //Fallback mechanism, look inside libg folders if any of them - //contain ASM dlls. - foreach (var v in versions) - { - var folderName = string.Format("libg_{0}", (int)v); - var dir = new DirectoryInfo(Path.Combine(rootFolder, folderName)); - if (!dir.Exists) - continue; - - var files = dir.GetFiles(ASMFileMask); - if (!files.Any()) - continue; - - location = dir.FullName; - return v; // Found version. - } - } - catch (Exception) - { - return LibraryVersion.None; - } - - return LibraryVersion.None; - } - /// /// Call this method to determine the version of ASM that is installed /// on the user machine. The method scans through a list of known Autodesk diff --git a/src/WorkspaceDependencyViewExtension/WorkspaceDependencyViewExtension.cs b/src/WorkspaceDependencyViewExtension/WorkspaceDependencyViewExtension.cs index 817924a60e1..100aad5a581 100644 --- a/src/WorkspaceDependencyViewExtension/WorkspaceDependencyViewExtension.cs +++ b/src/WorkspaceDependencyViewExtension/WorkspaceDependencyViewExtension.cs @@ -75,11 +75,6 @@ public override void Dispose() } - [Obsolete("This method is not implemented and will be removed.")] - public void Ready(ReadyParams readyParams) - { - } - public override void Startup(ViewStartupParams viewStartupParams) { pmExtension = viewStartupParams.ExtensionManager.Extensions.OfType().FirstOrDefault(); diff --git a/test/DynamoCoreTests/AnalyticsTests.cs b/test/DynamoCoreTests/AnalyticsTests.cs index 43fc237fcd4..2a9c55bfe5e 100644 --- a/test/DynamoCoreTests/AnalyticsTests.cs +++ b/test/DynamoCoreTests/AnalyticsTests.cs @@ -111,9 +111,6 @@ protected virtual void VerifyEventTracking(Times times) e = Analytics.TrackFileOperationEvent(this.TempFolder, Actions.Read, 5); clientMoq.Verify(c => c.TrackFileOperationEvent(this.TempFolder, Actions.Read, 5, ""), times); - - Analytics.LogPiiInfo("tag", "data"); - clientMoq.Verify(c => c.LogPiiInfo("tag", "data"), times); } [Test] diff --git a/test/DynamoCoreTests/Graph/Nodes/NodeModelTests.cs b/test/DynamoCoreTests/Graph/Nodes/NodeModelTests.cs index 8d54231f14c..f79a459a2da 100644 --- a/test/DynamoCoreTests/Graph/Nodes/NodeModelTests.cs +++ b/test/DynamoCoreTests/Graph/Nodes/NodeModelTests.cs @@ -7,6 +7,7 @@ using Dynamo.Graph.Nodes; using Dynamo.Migration; using Dynamo.Selection; +using Dynamo.Utilities; using NUnit.Framework; using Revit.Elements; @@ -222,12 +223,12 @@ public void UpdateValueCoreTest() { var nodeModel = new NodeModelTestingClass(); - nodeModel.InPorts = new ObservableCollection + nodeModel.InPorts.AddRange(new ObservableCollection { new PortModel("Port1", "Tooltip1"), new PortModel("Port2", "Tooltip2"), new PortModel("Port3", "Tooltip3") - }; + }); //case "UsingDefaultValue" var param = new UpdateValueParams("UsingDefaultValue", "true;true;false"); @@ -332,4 +333,4 @@ public NodeMigrationData MigrateToDsFunctionAssembly(NodeMigrationData nmData, s public NodeMigrationData MigrateToDsVarArgFunctionNMData(NodeMigrationData data, string assembly, string name, string funcName) => MigrateToDsVarArgFunction(data, assembly, name, funcName); } -} \ No newline at end of file +} diff --git a/test/DynamoCoreTests/Logging/DynamoLoggerTest.cs b/test/DynamoCoreTests/Logging/DynamoLoggerTest.cs index 5bddbc66bf5..38acfbbac45 100644 --- a/test/DynamoCoreTests/Logging/DynamoLoggerTest.cs +++ b/test/DynamoCoreTests/Logging/DynamoLoggerTest.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Dynamo.Configuration; using Dynamo.Core; @@ -31,7 +31,7 @@ internal DynamoLogger GetDynamoLoggerWithTestModeFalse() VerboseLogging = true }; - var logger = new DynamoLogger(debugSettings, pathManager.LogDirectory, false); + var logger = new DynamoLogger(debugSettings, pathManager.LogDirectory, false, false, false); return logger; } diff --git a/test/DynamoCoreTests/Models/DynamoModelEventsTest.cs b/test/DynamoCoreTests/Models/DynamoModelEventsTest.cs index 117151d4b50..8fd3b4a16f9 100644 --- a/test/DynamoCoreTests/Models/DynamoModelEventsTest.cs +++ b/test/DynamoCoreTests/Models/DynamoModelEventsTest.cs @@ -339,22 +339,18 @@ public void TestOnRequestsCrashPrompt() //Arrange //This will subscribe our local method to the RequestsCrashPrompt event CurrentDynamoModel.RequestsCrashPrompt += CurrentDynamoModel_RequestsCrashPrompt; - var crashArgs = new Dynamo.Core.CrashPromptArgs("Crash Event", "Test Message"); var e = new Exception("Test"); var cerArgs = new Dynamo.Core.CrashErrorReportArgs(e); - var cArgs = new Dynamo.Core.CrashPromptArgs(e); //Act - CurrentDynamoModel.OnRequestsCrashPrompt(null, cerArgs); - CurrentDynamoModel.OnRequestsCrashPrompt(null, cArgs); - CurrentDynamoModel.OnRequestsCrashPrompt(this, crashArgs); + CurrentDynamoModel.OnRequestsCrashPrompt(cerArgs); //Assert //Unsubcribe from event CurrentDynamoModel.RequestsCrashPrompt -= CurrentDynamoModel_RequestsCrashPrompt; //This will validate that the local handler was executed and set the flag in true - Assert.AreEqual(3, requestsCrashPrompt); + Assert.AreEqual(1, requestsCrashPrompt); } diff --git a/test/DynamoCoreTests/Nodes/FormulaTests.cs b/test/DynamoCoreTests/Nodes/FormulaTests.cs index c47065ce774..cb007c555e4 100644 --- a/test/DynamoCoreTests/Nodes/FormulaTests.cs +++ b/test/DynamoCoreTests/Nodes/FormulaTests.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.IO; +using System.Linq; using CoreNodeModels; using NUnit.Framework; @@ -44,7 +45,8 @@ public void FormulaMigration() var errNode = "5d2f36ea-e692-436c-9a3b-f1d15b093c0b"; node = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace(errNode); - Assert.True(node.ToolTipText.Contains(Properties.Resources.FormulaDSConversionFailure)); + var info = node.NodeInfos.Where(x => x.Message == Properties.Resources.FormulaDSConversionFailure); + Assert.NotNull(info); var numNode = "a418958a-990b-4b9a-998a-bcfc581f4ff4"; node = CurrentDynamoModel.CurrentWorkspace.NodeFromWorkspace(numNode); diff --git a/test/DynamoCoreWpfTests/ConverterTests.cs b/test/DynamoCoreWpfTests/ConverterTests.cs index 597964cbefb..42c0a68afb5 100644 --- a/test/DynamoCoreWpfTests/ConverterTests.cs +++ b/test/DynamoCoreWpfTests/ConverterTests.cs @@ -679,26 +679,6 @@ public void FilePathDisplayConverterInternalDoesNotThrow() Assert.AreEqual(@"\\psf\Home\Desktop\somedyn.dyn", FilePathDisplayConverter.ShortenNestedFilePath(@"\\psf\Home\Desktop\somedyn.dyn")); } - [Test] - [Category("UnitTests")] - public void ZoomToVisibilityConverterTest() - { - object visibility; - ZoomToVisibilityConverter converter = new ZoomToVisibilityConverter(); - - visibility = converter.Convert("1.0", typeof(string), null, new CultureInfo("en-US")); - Assert.AreEqual(visibility, Visibility.Visible); - - visibility = converter.Convert("1,0", typeof(string), null, new CultureInfo("de-DE")); - Assert.AreEqual(visibility, Visibility.Visible); - - visibility = converter.Convert(1.0, typeof(double), null, new CultureInfo("en-US")); - Assert.AreEqual(visibility, Visibility.Visible); - - visibility = converter.Convert(1.0, typeof(double), null, new CultureInfo("de-DE")); - Assert.AreEqual(visibility, Visibility.Visible); - } - [Test] [Category("UnitTests")] public void MenuItemCheckConverterTest() diff --git a/test/DynamoCoreWpfTests/PackageManager/PackageManagerExtensionLoadingTests.cs b/test/DynamoCoreWpfTests/PackageManager/PackageManagerExtensionLoadingTests.cs index 9d6ccc6a8c0..de27ca417a2 100644 --- a/test/DynamoCoreWpfTests/PackageManager/PackageManagerExtensionLoadingTests.cs +++ b/test/DynamoCoreWpfTests/PackageManager/PackageManagerExtensionLoadingTests.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; using System.Windows.Controls; @@ -86,7 +86,7 @@ public void PackageManagerLoadsViewExtensionAndItWorks() Model.CurrentWorkspace.AddAndRegisterNode(node); //assert a menu item was added with the correct header. - var mi = View.viewMenu.Items.Cast().Where + var mi = View.ExtensionsMenu.Items.Cast().Where (x => (string)x.Header == "Show View Extension Sample Window").FirstOrDefault(); Assert.IsNotNull(mi); } diff --git a/test/DynamoCoreWpfTests/PublishPackageViewModelTests.cs b/test/DynamoCoreWpfTests/PublishPackageViewModelTests.cs index 34067d9d139..9e9ef3a05da 100644 --- a/test/DynamoCoreWpfTests/PublishPackageViewModelTests.cs +++ b/test/DynamoCoreWpfTests/PublishPackageViewModelTests.cs @@ -205,7 +205,7 @@ public void PublishingACustomNodeSetsPackageInfoCorrectly_() newPkgVm.PublishLocallyCommand.Execute(); Assert.IsTrue(GetModel().GetPackageManagerExtension().PackageLoader.LocalPackages.Any - (x => x.Name == "PublishingACustomNodeSetsPackageInfoCorrectly" && x.Loaded == true && x.LoadedCustomNodes.Count ==1)); + (x => x.Name == "PublishingACustomNodeSetsPackageInfoCorrectly" && x.LoadState.State == PackageLoadState.StateTypes.Loaded && x.LoadedCustomNodes.Count ==1)); Assert.AreEqual(new PackageInfo("PublishingACustomNodeSetsPackageInfoCorrectly", new Version(0,0,1)) diff --git a/test/DynamoCoreWpfTests/WorkspaceSaving.cs b/test/DynamoCoreWpfTests/WorkspaceSaving.cs index 890d93cfaab..24ba07e97e5 100644 --- a/test/DynamoCoreWpfTests/WorkspaceSaving.cs +++ b/test/DynamoCoreWpfTests/WorkspaceSaving.cs @@ -1424,7 +1424,7 @@ public void CustomNodeBelongingToPackageCanBeModifiedAndReopenedWithoutError() //assert that package has been loaded. var foundPackage = loader.LocalPackages.Where(x => x.Name == "PackageThatWillBeModified").FirstOrDefault(); Assert.IsNotNull(package); - Assert.IsTrue(package.Loaded); + Assert.IsTrue(package.LoadState.State == PackageLoadState.StateTypes.Loaded); //find our custom node var customNodeInfo = this.ViewModel.Model.CustomNodeManager.NodeInfos.Where(x => x.Value.Name == "ANodeToModify").FirstOrDefault(); Assert.IsNotNull(customNodeInfo); diff --git a/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs b/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs index 4fb671c1861..b5ba5bf21c8 100644 --- a/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs +++ b/test/Engine/ProtoTest/LiveRunnerTests/MicroFeatureTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using NUnit.Framework; @@ -29,6 +29,17 @@ public override void TearDown() liveRunner.Dispose(); } + private void UpdateDsInterpreter(ProtoScript.Runners.LiveRunner liverunner, string code) + { + Guid guid = Guid.NewGuid(); + List added = new List(); + Subtree st = TestFrameWork.CreateSubTreeFromCode(guid, code); + added.Add(st); + var syncData = new GraphSyncData(null, added, null); + liverunner.UpdateGraph(syncData); + } + + [Test] public void SimulateCBNExecution() { @@ -581,7 +592,6 @@ public void GraphILTest_ModifiedNode01() mirror = liveRunner.InspectNodeValue("d"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); } - [Test] public void TestDeltaExpression_01() @@ -589,7 +599,7 @@ public void TestDeltaExpression_01() liveRunner = new ProtoScript.Runners.LiveRunner(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("a=10;"); + UpdateDsInterpreter(liveRunner,"a=10;"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -597,7 +607,7 @@ public void TestDeltaExpression_01() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("c=20;"); + UpdateDsInterpreter(liveRunner,"c=20;"); mirror = liveRunner.InspectNodeValue("c"); Assert.IsTrue((Int64)mirror.GetData().Data == 20); @@ -607,7 +617,7 @@ public void TestDeltaExpression_01() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("b = a+c;"); + UpdateDsInterpreter(liveRunner,"b = a+c;"); mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -619,7 +629,7 @@ public void TestDeltaExpression_01() //o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("c= 30;"); + UpdateDsInterpreter(liveRunner,"c= 30;"); mirror = liveRunner.InspectNodeValue("a"); Assert.IsTrue((Int64)mirror.GetData().Data == 10); @@ -637,7 +647,7 @@ public void TestDeltaExpression_02() liveRunner = new ProtoScript.Runners.LiveRunner(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("x=99;"); + UpdateDsInterpreter(liveRunner,"x=99;"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("x"); Assert.IsTrue((Int64)mirror.GetData().Data == 99); @@ -645,7 +655,7 @@ public void TestDeltaExpression_02() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("y=x;"); + UpdateDsInterpreter(liveRunner,"y=x;"); mirror = liveRunner.InspectNodeValue("y"); Assert.IsTrue((Int64)mirror.GetData().Data == 99); @@ -655,7 +665,7 @@ public void TestDeltaExpression_02() //string o = liveRunner.GetCoreDump(); // emit the DS code from the AST tree - liveRunner.UpdateCmdLineInterpreter("x = 100;"); + UpdateDsInterpreter(liveRunner, "x = 100;"); mirror = liveRunner.InspectNodeValue("x"); Assert.IsTrue((Int64)mirror.GetData().Data == 100); @@ -669,8 +679,8 @@ public void TestDeltaExpressionFFI_01() { liveRunner = new ProtoScript.Runners.LiveRunner(); - liveRunner.UpdateCmdLineInterpreter(@"import (""FFITarget.dll"");"); - liveRunner.UpdateCmdLineInterpreter("p = DummyPoint.ByCoordinates(10,10,10);"); + UpdateDsInterpreter(liveRunner, @"import (""FFITarget.dll"");"); + UpdateDsInterpreter(liveRunner, "p = DummyPoint.ByCoordinates(10,10,10);"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("p"); @@ -679,14 +689,14 @@ public void TestDeltaExpressionFFI_01() // newPoint = p.Translate(1,2,3); //============================================== - liveRunner.UpdateCmdLineInterpreter("newPoint = p.Translate(1,2,3);"); + UpdateDsInterpreter(liveRunner, "newPoint = p.Translate(1,2,3);"); mirror = liveRunner.InspectNodeValue("newPoint"); //============================================== // Build a binary expression to retirieve the x property // xval = newPoint.X //============================================== - liveRunner.UpdateCmdLineInterpreter("xval = newPoint.X;"); + UpdateDsInterpreter(liveRunner, "xval = newPoint.X;"); mirror = liveRunner.InspectNodeValue("xval"); //============================================== @@ -709,8 +719,8 @@ public void TestDeltaExpressionFFI_02() //string code = @"class Point{ X : double; constructor ByCoordinates(x : double, y : double, z : double){X = x;} def Translate(x : double, y : double, z : double){return = Point.ByCoordinates(11,12,13);} }"; //liveRunner.UpdateCmdLineInterpreter(code); - liveRunner.UpdateCmdLineInterpreter(@"import (""FFITarget.dll"");"); - liveRunner.UpdateCmdLineInterpreter("p = DummyPoint.ByCoordinates(10,10,10);"); + UpdateDsInterpreter(liveRunner, @"import (""FFITarget.dll"");"); + UpdateDsInterpreter(liveRunner, "p = DummyPoint.ByCoordinates(10,10,10);"); ProtoCore.Mirror.RuntimeMirror mirror = liveRunner.InspectNodeValue("p"); @@ -718,7 +728,7 @@ public void TestDeltaExpressionFFI_02() // Build a binary expression to retirieve the x property // xval = newPoint.X //============================================== - liveRunner.UpdateCmdLineInterpreter("xval = p.X;"); + UpdateDsInterpreter(liveRunner,"xval = p.X;"); mirror = liveRunner.InspectNodeValue("xval"); //============================================== @@ -735,7 +745,7 @@ public void TestDeltaExpressionFFI_02() // newPoint = p.Translate(1,2,3); //============================================== - liveRunner.UpdateCmdLineInterpreter("p = p.Translate(1,2,3);"); + UpdateDsInterpreter(liveRunner,"p = p.Translate(1,2,3);"); mirror = liveRunner.InspectNodeValue("p"); diff --git a/test/Libraries/DynamoPythonTests/PythonEvalTests.cs b/test/Libraries/DynamoPythonTests/PythonEvalTests.cs index c89eedba616..651452f7829 100644 --- a/test/Libraries/DynamoPythonTests/PythonEvalTests.cs +++ b/test/Libraries/DynamoPythonTests/PythonEvalTests.cs @@ -9,7 +9,7 @@ using Dynamo.PythonServices; using Dynamo.PythonServices.EventHandlers; -namespace DSPythonTests + namespace DSPythonTests { public class PythonEvalTests : UnitTestBase { diff --git a/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs b/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs index f1772e0c0b7..c84b8cb4507 100644 --- a/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs +++ b/test/Libraries/PackageManagerTests/PackageManagerClientTests.cs @@ -63,57 +63,6 @@ public void ListAll_ReturnsEmptyListWhenQueryThrowsException() #endregion - #region DownloadPackageHeader - - [Test] - public void DownloadPackageHeader_SucceedsForValidPackage() - { - var id = "1"; - - // Returned content - var mp = new ResponseWithContentBody - { - content = new PackageHeader() - { - _id = id - }, - success = true - }; - - // Returns mock for any arguments - var c = new Mock(); - c.Setup(x => - x.ExecuteAndDeserializeWithContent(It.IsAny())) - .Returns(mp); - - var pc = new PackageManagerClient(c.Object, MockMaker.Empty(), ""); - - PackageHeader header; - var res = pc.DownloadPackageHeader(id, out header); - - Assert.AreEqual(id, header._id); - Assert.IsTrue(res.Success); - } - - [Test] - public void DownloadPackageHeader_ReturnsFailureObjectWhenDownloadThrowsAnException() - { - // Returns mock for any arguments - var c = new Mock(); - c.Setup(x => - x.ExecuteAndDeserializeWithContent(It.IsAny())) - .Throws(); - - var pc = new PackageManagerClient(c.Object, MockMaker.Empty(), ""); - - PackageHeader header; - var res = pc.DownloadPackageHeader("1", out header); - - Assert.IsFalse(res.Success); - } - - #endregion - #region GetPackageVersionHeader [Test] diff --git a/test/Libraries/PackageManagerTests/PackageUtilitiesTests.cs b/test/Libraries/PackageManagerTests/PackageUtilitiesTests.cs deleted file mode 100644 index d530fc6618a..00000000000 --- a/test/Libraries/PackageManagerTests/PackageUtilitiesTests.cs +++ /dev/null @@ -1,60 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; - -using Greg.Responses; - -using NUnit.Framework; - -namespace Dynamo.PackageManager.Tests -{ - [TestFixture] - class PackageUtilitiesTests - { - [Test] - [Category("UnitTests")] - public void FilterFuturePackages_IEnumerableTuplePackageHeaderPackageVersion_ReturnsCorrectResults() - { - var pkgVersion063 = new PackageVersion() - { - engine_version = "0.6.3" - }; - - var pkgVersion080 = new PackageVersion() - { - engine_version = "0.8.0" - }; - - var pkg063 = new PackageHeader() - { - name = "063", - versions = new List() - { - pkgVersion063 - } - }; - - var pkg080 = new PackageHeader() - { - name = "080", - versions = new List() - { - pkgVersion080 - } - }; - - var pkgList = new List>() - { - new Tuple(pkg063, pkgVersion063), - new Tuple(pkg080, pkgVersion080), - }; - - var dynamoVersion = Version.Parse("0.7.1"); - var filteredPkgList = pkgList.FilterFuturePackages(dynamoVersion); - - Assert.AreEqual(1, filteredPkgList.Count()); - Assert.AreEqual("080", filteredPkgList.First().Item1.name); - } - - } -} diff --git a/test/System/IntegrationTests/DynamoApplicationTests.cs b/test/System/IntegrationTests/DynamoApplicationTests.cs index ac241aa5605..7d6976ecc5d 100644 --- a/test/System/IntegrationTests/DynamoApplicationTests.cs +++ b/test/System/IntegrationTests/DynamoApplicationTests.cs @@ -3,6 +3,7 @@ using System.Diagnostics; using System.IO; using Dynamo.Applications; +using Dynamo.Models; using NUnit.Framework; namespace IntegrationTests @@ -62,7 +63,7 @@ public void DynamoSandboxLoadsASMFromValidPath() public void DynamoMakeModelWithHostName() { var model = Dynamo.Applications.StartupUtils.MakeModel(false, string.Empty, "DynamoFormIt"); - Assert.AreEqual(model.HostName, "DynamoFormIt"); + Assert.AreEqual(DynamoModel.HostAnalyticsInfo.HostName, "DynamoFormIt"); } [Test] diff --git a/test/pkgs/sampleViewExtension/bin/SampleViewExtension.dll b/test/pkgs/sampleViewExtension/bin/SampleViewExtension.dll index 4ebfdea702ec065e9152147e3ac4c2ac6b24447e..9695bc21033be036eea1a04afcd84ab0bf0f1b2e 100644 GIT binary patch delta 3398 zcmZ`+3vg6d8UD|?ugxae>~6A2AP_fffhCV6Av_XDA>;vF9-(=VLcxZGTwo#OhP|6Y zNaKc~FjK^q%DVbFgVwP{soy!9gfQya z-0y#$|38oaoO?68X1M0~JphOC7D<}> zlMvnu0D^e(oujNQw-DT07X3B0k$k zq`P%xNXKM!K4b_oC>}u`X@CiR?u2?e)ae9iqg4zA#@v|}%d^rn-};i!Pfau< zAIMXJ6!UOUXczKu2`CS{5w;W)&8_5gpInX<`S_rM!IZO7UN9uM#0B&%w6RKVH`l`< z5n;PhP@T=yBxb;d#MH-~OItV(XCv$ob{z8(hzv!Q3avu|#PcPlGwQ?CG?*-8bz3t9 z%mQSVrHTw|Hn=R86$Z)HGZIVS9-afiZCD89uK44h+(x->SY;5dV*Csx!)Y4LZX`^I z=oSx`!^D*#kwTF<_#Hh*tYHNVRs`@r)N`RumCoadWyoluzTKsxlZJUuh$>kBpKYG# ziM6g4bSsy|!Usj+@Ig@u)_h@DHQ8XHrro6t?W>$Jtt535;|_g=Xfw*J13g0R$wa(& zhb<;|7FD+e)e>6YPF_r09GB3__0cBKAcPIrjZj06wN*HyL1YgVyqK8*hCXN2;?SZy zVS1>2B7`SYms~mFf`RBH4v^x!t%XpI1FCQr+U3eBU8nC!Y~q9k-Gu?_beI=uI%O#W zZ%FcN_k5Dl+ssp;8-ZezblSrIT&uK|mJK*W394(bJifM|Pi_n$mpwr)F z=(n^OoR-pc)kB}CV$|P9XR%7_1z>^2&r7$}+iLTK6mi{FW7v=kY1;qRvTgt?3^!)crsV*y>bbx*t^)QzP^7#}Z$f6YYD`+A z6`{wPG3f;=VVwRwCRJdK6#8OJDnUPm0wsiY*)>3~K$x+hNO6;a8!0IyGN>% z(kS~BE22=3l&-Op*dB$Bq&;2F>aU>KPNXIJk(69BL_!gBHq)qCN(bo@MKGK;DUGr> zQxFU~HsLCyr=@fVg}i_nbY@HnLBdUp6=*|QkK++&IQ<%DZ(Q>Qt{_Io;lt^7*s{C4 zLMFE3Ft%q@W7r5W+0+yeH_ZWhsY+t4#N`sB5?dv1lo$gBC@%TE5(gw61Ty*#P^Vwg z8(5w9B!3MUq|bn}XbvlORnsY2;;O+q{7k!_MpDwLiXGOfX@oYj0M)Wltr7fZ6b0t8 zC^}qG9|W(#`h@hqB=Il6O%!Dx8QaLm=BNj#l^xTEQEjA&ZVHH6@a@vKQ%fV3@s*lKc>L-OA2NO${`!%4DagSG$6tbZGC>Y#O9> zJVKdN&my>7qQD~B2@KI*U>O|+R!dwWu~F(*({bqArDl`FZ7F&Qs@*ut5wht6cA5^+ zbY9OKi7(I$zD4p|SeidgD|k6|(k|>S!){`;X^83=(PK>D^Lic5fhbgtO45K?pbBa! zL|>(E&;?S5<(-M%qT&7{oZ|E~DR|MY(LreySLb-UMrHE+i-bg9#~WO1P?_*LB z?cR7F(~19z_ct05euZ)dcLSc0ju^KS&zzN2x5kQfo83#dc6C)bPiD?_E@yr-+_=-+ zw%hC`+e~&v?QtpA-QBgmciWh)vB$EVN3!NFUZ04sj`!Z<9NXGsQnV><_gS{&cOXzp zY>!Fp19sBf6KU)3O~&^)Kh7%kcE-(p&HIyPuN}8~8)Ejk53^#-(`IgOk8L-T18x01 zrtK{8T+B(ozzFHc+PaGz-;{t8&UwDH(dtF-q#y~ahwRv%z8-U}+1npQCR*OzJrUjc zP0qv4Qg3mk7`r*4j`v1;+vDA4Lo6ZOJFE$dJ*IXxd6zn;y)QYteF<0H()nFo$(?cM z558N@2mVL(eVDzq&v`g^<*MjHobU$xs_+tAPBm0PwU8F#si67LG~gXj0eurKf=30d z0BuAa&!=Ws8sJ@p-#lW@sob}{|GfI-y9eCO&9D7+|AkMdQk(O5URle4Zg78|->U{0 zo2CZIAJf1I)sKKgUo#0srvV;5C9jCp%EBDnar% z^?~3+8SwQFU-S=OO2@hAI=ieZ<@>FBv8(DQHJxV`wk&X+Kd`xT%KSe+q3Hf7o;cSz z*FCE49~P=sJT5$0as+E7wmN46dF;#1&jWKgC+8o5cxqmxGEx=62gLo13L`De9gSAP zT;A7L-f1R8A>99HO{9`hhbM1E0(G;`O6(Tp)Ds&JW#ke)g7A>v6(L6X4<<|-MG#Ah zBI=L#ba%w;-L?T2@xxgWFH?DF8159jCezLH&W#@kj^l~r>BFZ>AHKIIH+&G?)7sjb z+CTqQ=gL=)-E970_`YX0UfwWM#BN%=d1XB5ESg?sw3$6-%r>1J(_0)*@Ud(WUbskl k?z!MvmNAba*zgEdox4%;)Fjb49GaUwVH8gImtxs}00+fLi2wiq literal 9728 zcmeHMeQX@pai87W+vA6I7Ehm+X!$5oE+vvjQshw|mTZ0;CDRruiKHmmA}a0OEy=a+ zZjZZrBG0M{+HIn`iR+Iva8$$TSCGVL9JE1z*sWa`sezL7Jc!-?Dm zMblc>-@M&D-jR%)82KXs^2nQgGxOfOnR)ZxzIi)(|Kk)OA_c!viRgJex%3NoW3U8v z__jX{)0b;sYkFQf_FB{AoMA`vmN{!_*=S13&K61y{OBs-c0bC5iJ1$olAhu ze}tRz|MJsAnS{~;xyQNEPxN(m#L9A>=qAwKIY`vFl6NCKN>o$9uK|8{1s-$sMF;q= zuu$-Xt)AY%M2Qlek6E^r0w#3pM};RUieE+PhxRc`&zNY)y3%?4SeEZ(RJrsM4T?$y zIKzHLVcld3Qfo8Oiw#7Qpb~w%7j~4L>k)78sG~i!p-Z80w1JEU8@^ZT)WBuPP)N2n z64mXpz{#7NP^HVLD)J?U>U9+ZtM+El%`MDSFLAG}E_;)?m1%nj@+G_xjorOTl*R_$lXQ$k{T}T>~TjBjW2x_h62y*+#;t4l5 zkbDVUmHJS7fZDdpTP`zZ%|p&s`&J%RR$CFGo=!5|hOvU&FHom$iOFqYS#dCubQy{& zZ6Qwp`$s0&;_4;Kt(Y_QG6sYn7z!n~cLj(S1RMa}|DJV+I*_iI7^cpQGH3#*Z@V>Q z?nLD#sxdKnb?ekx>l)g(V)pCmC}i%!v*Vxt1!jao=Iub}4RwRkMhyxKmM}juf^YXx zVpl=80QGYPMQ;5iZcTFFG7lUOBg@y-FwaseSmti#uR(`kc;z6;)(@bG*(T8UDh;R- z)6V<~>#CR?qBHAdL8p*AFB}*4I_ObnW0k49F0qSMGsbOq$s%mbP9SC%Q|e)OH)DGN z;3F=@{xfC|GkqQc-RBwL#Rbpo;|I(coVaID@>T_}v5UR2u2@f3Pxk>97NiW|H{qq` zUnNRFyYEBM<_X6#aADi68gjIzO4mPyP|zs<=;; z{!xB8sM3)D!~c>B!JDasAykUXpHozNQNU*e>c>RAN&Y?b{gT9RNl<2G zE1*(SXkMwKMdcM$rEY0n3DcZ1uh!A;sILG%0;p08=qf!Wy&R0tv|2)R{adJ{ZYC}G zcWB=z&7;jfK&x%^7t$ucPX^|dZS=5oEwGJhxlGJEA-@Eg#!8SPd2Eyz@9AovdJNvx+09oS3mp3O5a z;WctaxuOh+I%9twx}xatc8%bL!21aHxOxg;QL%3aAen1Pr510vt}@5AR+Ap@DY{*f%e)t$Z-Bn+@@flo2G|=Oc35KU zKLz&Dt!H6nfc~!vTi-+|-;tgSG4F1HeM@Q$Z3E^A?4vbp>KR1Zr(BGV3vB&P?#D9Q zr65fU>>+xIdZ70Ofw?w>szwjd=LPTA5X1*1HwxcH&`PkK;lq$A)BRxhl&c6?iT)Q{ znKG(O!+4HBHv|41p;|f{l&~$bWw!v<(Qd%?m^p?A1RM}>M8J~*-Y1|2xCwH&<-CAJ z0bc-A=^Hc-AAC#HzY7>8Nje+6ovsSXZt43Sv!zMl(2Hb9Ukd#t zJwY4=wHQUkiG#;FDSet=2mAqGt@I{h>ZJ4qK?zE)Q&IY}P&YLBX6P-9yD#`QU`LSa zTIgNC2SV=wepTW6s|we@i&>8$PKTu!ZJ;s0?UV&V0FgGrf*AsNS7!kN2QMm_zCKf`$fH9a_djiX}O(7X`0Scfr|77W>vzB z^8Qq$0SPNcV%Vt;Aku@N%UD4{zOk+t6N$!qo41lfs|vIIaGYIV_Lutjhg8~M!%D?cFMFe zMv^9qwxefbLuMwUi#~SjsGid;BSo{ibM92mm@nufX-b*7oZA4%Ibe>SbKLPsOQ+9` z;dDNbhBjpBS@WV^K^Q7n78;*6tqXQuOX<)-&j`LfG^gce(PvyUZ2g2~=5@;{`b1ys zxDZ$+*e8u@M((I(q-jiFI9kB-lx5s&gVi5JD%=TBjj1n>RALB|HW~dceVZJ6QmW zwW+|^rQBeM-BfOr(36GPS=|~lbEjlJu z}WMfm| zr?>C8w%D;z#9;wcN3$F}xs|IjsyS#*<0e*BdiWxIakrLBW6}8{c-16K-oo6)D26(| zfCVSSxV4IHkdEq(w^w3CQ!K@Br0i)phc`OVJQWj$Hk&hT$4J@!u5r}T@^i8BwAy}C zKUzkxJ7P1N(5;I`N?*nHHC^Vf_G@ewdAV&CEbi~_69_(@@D*Bc%-HT8SFZ8ye^F-+ z?{zk5D{w6GWoCtE2P~u<*aONM`_tn^j7>cE?yi4A!#3d(yjk-o;|R5)SGOwa-j0jK z6)VSS*_H~*>Nk?_UQZiryEz0LR*PfIc%gSZ`2Z$uMME#DVrxt;qD4$IA>iN*;lE@0 zj3YuuRLbjjIHP9~b;M?uql89shGS?M<3X{Vh&3vNcnh0G@eUm0iy98)gyv}MLdM-S z3eMsi5&tdiunT|MF*l!9~~k;i9U9AuV=nz9xP6*|PAF>{dP-a3Gu4tN)Z zraAOaqh=%T!bL#1u5>AT=yK6B(@uhUA9(!Z?>T z+y{x_Ku8LM6e-FfmeR2F`zpy&W26X1&H7LoSwR+ z_svIYx?kQu^<3XrJfKEK@yp7pEURHfjVwI^^pxm#QovKLy^pw$Csf$f7|{Z)6t0oH z`^Fuds!qzAPh)$-kz{x=rHj|~@dJ9Vu6N@q5+ilvmIQx< zEQq$n#)c=$3$opN86Uf!V+6y6IgR^UbIh;tuBTh=QU74w9`&{Kq_#(g3K^$h z>4$TA!LhVVd-OyhiC5>ndU4Xcpyv)J_wCc-sd!)afu3HyYyW}f)q}YQ7=O$O-I1Y` zt18infdv1*_1^9;f=X}UxAR9Y%%s0C(X43;at*$l8pSR!h}(xzItJ`~`6uCqzf_VM z$B6D(W9FBQ^=9pZjm;G@ne7LfQW>iQ2XS2_1_##=y>_6*`Gy7eVsz{602E!LW6Y(w z`zj}D2o=Hw050RlB^vYIC4-u+FKho}PgPHMa;9g0yiZH_^!4gJ@y2PH&QwNKIqrTM z!cPZiqEa{~CO-wa8xwS3&T;YwJ3H;v98v*0mNinAX`3@nEM;ap7mVD@V&~qjuD;Gi z93ngOIFa~yQUGBmBeRZk1oBKYjw>|gMJyjVKZJrS7r@4Y(qj8hqM?EW-BXKaoYmTR zkDN{2u|f#)%-mu&Gh5J?u zK8bfCCCjB*(*6obSZ=PQo*=%xXqgXQ2Nj+D*l(%*S}73k>iW#}IEOXvw5g@`8>K)u zllu5GN9?^)94}V9YVd}YOVq(j06Vc;TEefEYWxiP>ieQ4-{iNfd%YAwj-xxNxx=M6 zlU(xGE6KcFFgey%iu2GsPT=A9SM=`Vo8^}JPnCiL7LH51OL5^q5N|^T%|j=U=Hq1B zg3EZhyKDaaIA6GkUN`-ANgdVGMj^Yi6vxK~ms;~wN$%d?T8cM#6g7Oc^tLRAn)jyp zPp$g|P>J`e(37rexVxvoJ0;q)zTxH-N8>i7Mu~6mBq?$K9$blU;y(Csc)P{_&d8KT zII`vr{O~bnd?GRN?tk3%sGam?>P(Ueib{r^T^knvJJiu7;`=TliR{`a{_WXvn_~hciA(9h*{2&Z!{;pVos{%telyZ^Ri#`8Gx0x kusI2fitx|}^(zO~hp8Z-`4F&JvB!THF~8{Z^XY;A2M4xu=Kufz diff --git a/test/pkgs/sampleViewExtension/bin/en-US/SampleViewExtension.resources.dll b/test/pkgs/sampleViewExtension/bin/en-US/SampleViewExtension.resources.dll new file mode 100644 index 0000000000000000000000000000000000000000..98012013c8c7d6f6785d4c1f9b0a53ea8e273f44 GIT binary patch literal 4096 zcmds4U1(fI6h3!%^ViyF+n|<4dedyBwdvj6Y*Lff=;o)bsY$wI(^yonckfP;OYhG* z_paF}N)Z)(5c~rbU-h9NRZvj;dk{ep6@3&Gg!h+tsyPM5s(I^$c+1xWT z=bSlzGjrx-`i>_lN<=YyK|u5tdeJfx{y8`ca_6qMJL!#%&wAccratSLTQWVh$lXP* z+p3{Ej_a#=rt*@bnvObgBB$DJfoWT|Y>HPzXO9pS9*t1X1NXD4wx4LXx;e6$XcI8P zuxeA~;H)A#F^;T~Yiy@OJRtnaJW}%{BQT;}6?SUa30T3bBE%>|bXElB-)bt+t#z_B zpOt;glN|t{N#EgLeN%}}Yuw`okkYmc2Ey?x@YS^ptk*cRT)`;XX$jXknjsn!Hbkg} ze%M1a0e@v|fy=5yFScOtH`{Yq^Z6$~zAxlFh0n^Zcs{eWS?0MVZZNMlnq_){@jlh| z43}GGzE7QJ+%sKgWI#)bU!OW&viuTfBMvM1T(|nvY$VwAM z!PIbifF*~9d)F%~IlgJLs`ec7MNDf>j!tCpcj4l`^TN#w_;!1wlTAgkh|w~cecBqNy?M-k**If_ONNqyXLfq}9Q*f7Y0;v0Tg>qTW zJm&bi4`at&&Q=W`+UV}2Q~8DT(BMJ6kUluT(u3W1Md(z$+@r`6Y}w^!E{AXyCB3r! zp(~y??m9kqEgU&BpRbSkhFxepVBNDZnyH8%)4j_Pm9C>SyyW}ELy3fEEHPX6G}|<| z>$wZQX1I1@*>o1liT-5rV4|$sR-#z9Gcg?H2t|FIOHagpNNGbRI z9n(Ts+QlFm z3Fv@G9`Vjkg7#_MbdGVe@WQ3|mM?;~oX?qWER6*5Eg#p-wEaQ!p-a@jvibR-Wt5w` zwJ+G!Nd$(rtX?RX&SJbB2|1O#=TiKNXM@&hRxnHU?jYX&To6eO?G0KxUkJXBMA~}$ z3*y(h=^0EFk!#wX4x&E|o$h`fr_E;fiWaD&Rwb^~Y7Wd5`CyBJCA8&+&>*6lrrkoxVmDLuouk?#wO}!9l9e8gYVo1~-dh!7592<+!*(&dPd1mP5VauP2PV#T9NYE;S*| zalFjpYOY^()Wky;KGUnjW{(PPWaYgtSQh;$2QlXWPE<3VMNQIB%v7YIs8eN(e>->h zmj{E_r`{cSBK`7s`W{c-PLa5?kN7bn)TyKTmDC=k;%PO!iz@j;V^$ zd96atAIBEF)dt@27s)&FCl$UA*4%FDG*hFK%o1TXkR z4S6aa?L2>>A@cxC&favRGiYayV