Skip to content

Commit

Permalink
DYN-6314: Remove obsolete methods (#14556)
Browse files Browse the repository at this point in the history
* 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 b1706ae.

* 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 b13b2bc.

* Revert "PythonServices.cs"

This reverts commit cd2f73c.

* 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 c9fc4e8.

* Revert "AssociativeAST.cs"

This reverts commit b546950.

* Revert "Watch3DView.xaml.cs"

This reverts commit 869991f.

* Revert "HelixWatch3DViewModel.cs"

This reverts commit dd7024d.

* Revert "DynamoPointGeometryModel3D.cs"

This reverts commit 7c06198.

* Revert "DynamoLineGeometryModel3D.cs"

This reverts commit d790e11.

* Revert "DynamoGeometryModel3D.cs"

This reverts commit 575c2d7.

* Revert "DynamoEffectsManager.cs"

This reverts commit 4f28416.

* Revert "AttachedProperties.cs"

This reverts commit 770e5c3.

* Revert "HelixRenderPackage.cs"

This reverts commit d31acc0.

* NodeInputData.cs

* Revert "DYN-1729"

This reverts commit 55b445b.

* DYN-1729

* Revert "NodeViewCustomizations.cs"

This reverts commit 30f05f3.

* Revert "ViewLoadedParams.cs"

This reverts commit 436d828.

* ViewLoadedParams.cs

* NodeModelAssemblyLoader.cs

* StartupUtils.cs

* NodeModel.cs

* Revert "PreferenceSettings.cs"

This reverts commit 3a13eab.

* ViewLoadedParams

* Fix view extension

* Add back tests
  • Loading branch information
sm6srw authored Dec 22, 2023
1 parent 9f9410b commit 7ebd8ff
Show file tree
Hide file tree
Showing 114 changed files with 154 additions and 1,866 deletions.
2 changes: 0 additions & 2 deletions src/DynamoApplications/StartupUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down
18 changes: 0 additions & 18 deletions src/DynamoCore/Configuration/Configurations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,6 @@ public class Configurations
/// </summary>
public static readonly double IntegerSliderTextBoxWidth = 30.0;

/// <summary>
/// Maximum width of Watch Node
/// </summary>
[Obsolete("This property is no longer used. Remove in Dynamo 3.0")]
public static readonly double MaxWatchNodeWidth = 280.0;

/// <summary>
/// Maximum height of Watch Node
/// </summary>
[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
Expand Down Expand Up @@ -252,12 +240,6 @@ public class Configurations

#region CodeBlockNode

/// <summary>
/// Default height of CodeBlock's port. Now obsolete.
/// Inputs height are set in the normal way, outputs height is set to CodeBlockOutputPortHeightInPixels
/// </summary>
[Obsolete] public static readonly double CodeBlockPortHeightInPixels = 17.573333333333336;

/// <summary>
/// Code Block outputs have a condensed port height
/// </summary>
Expand Down
6 changes: 0 additions & 6 deletions src/DynamoCore/Configuration/IPathResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,6 @@ public interface IPathManager
/// </summary>
string PythonTemplateFilePath { get; }

/// <summary>
/// Full path to the legacy GalleryContent xml file.
/// </summary>
[System.Obsolete("This property will be removed in Dynamo 3.0")]
string GalleryFilePath { get; }

/// <summary>
/// Folders in which node assemblies can be located.
/// </summary>
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Configuration/IPreferences.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public interface IPreferences
/// <summary>
/// Indicates whether background preview is active or not.
/// </summary>
[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; }

/// <summary>
Expand Down
10 changes: 0 additions & 10 deletions src/DynamoCore/Configuration/PathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,9 @@ internal static Lazy<PathManager>
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;
Expand Down Expand Up @@ -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<string> NodeDirectories
{
get { return nodeDirectories; }
Expand Down
2 changes: 1 addition & 1 deletion src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ public double DefaultScaleFactor
/// <summary>
/// Indicates whether background preview is active or not.
/// </summary>
[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
Expand Down
4 changes: 2 additions & 2 deletions src/DynamoCore/Core/NodeModelAssemblyLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ public class NodeModelAssemblyLoader : LogSourceBase
/// <summary>
/// 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
/// </summary>
[Obsolete("Will be made internal, please use LoadedAssemblies Property.")]
public readonly HashSet<string> LoadedAssemblyNames = new HashSet<string>();
internal readonly HashSet<string> LoadedAssemblyNames = new HashSet<string>();
private readonly HashSet<Assembly> loadedAssemblies = new HashSet<Assembly>();

/// <summary>
Expand Down
14 changes: 1 addition & 13 deletions src/DynamoCore/Engine/CodeGeneration/CompiledEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using ProtoCore.AST.AssociativeAST;

Expand All @@ -23,18 +23,6 @@ internal CompiledEventArgs(Guid node, IEnumerable<AssociativeNode> astNodes)
AstNodes = astNodes;
}

/// <summary>
/// Guid of node that has been built to AST nodes.
/// </summary>
[Obsolete("This item is being obsoleted due to the confusing namimg, the new property to use is NodeId")]
public Guid Node
{
get
{
return nodeId;
}
}

/// <summary>
/// Guid of node that has been built to AST nodes.
/// </summary>
Expand Down
14 changes: 1 addition & 13 deletions src/DynamoCore/Engine/CodeGeneration/CompilingEventArgs.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;

namespace Dynamo.Engine.CodeGeneration
{
Expand All @@ -15,18 +15,6 @@ public CompilingEventArgs(Guid node)
nodeId = node;
}

/// <summary>
/// Guid of NodeModel that is being compiled to AST.
/// </summary>
[Obsolete("This item is being obsoleted due to the incorrect namimg, the new property to use is NodeId")]
public Guid Node
{
get
{
return nodeId;
}
}

/// <summary>
/// Guid of NodeModel that is being compiled to AST.
/// </summary>
Expand Down
11 changes: 0 additions & 11 deletions src/DynamoCore/Engine/EngineController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -655,17 +655,6 @@ public CompilationServices(LibraryServices libraryServices)
priorNames = libraryServices.GetPriorNames();
}

/// <summary>
/// Pre-compiles Design script code in code block node.
/// </summary>
/// <param name="parseParams">Container for compilation related parameters</param>
/// <returns>true if code compilation succeeds, false otherwise</returns>
[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);
}

/// <summary>
/// Pre-compiles Design script code in code block node.
/// </summary>
Expand Down
44 changes: 0 additions & 44 deletions src/DynamoCore/Extensions/StartupParams.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,50 +67,6 @@ public class StartupParams
/// </summary>
internal bool IsGeometryLibraryLoaded { get; }

/// <summary>
/// Initializes a new instance of the <see cref="StartupParams"/> class.
/// </summary>
/// <param name="provider"><see cref="IAuthProvider"/> for DynamoModel</param>
/// <param name="pathManager"><see cref="IPathManager"/> for DynamoModel</param>
/// <param name="libraryLoader"><see cref="ILibraryLoader"/> for DynamoModel</param>
/// <param name="customNodeManager"><see cref="ICustomNodeManager"/> for DynamoModel</param>
/// <param name="dynamoVersion"><see cref="Version"/> for DynamoModel</param>
/// <param name="preferences"><see cref="IPreferences"/> for DynamoModel</param>
[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;
}
/// <summary>
/// Initializes a new instance of the <see cref="StartupParams"/> class.
/// </summary>
/// <param name="provider"><see cref="IAuthProvider"/> for DynamoModel</param>
/// <param name="pathManager"><see cref="IPathManager"/> for DynamoModel</param>
/// <param name="libraryLoader"><see cref="ILibraryLoader"/> for DynamoModel</param>
/// <param name="customNodeManager"><see cref="ICustomNodeManager"/> for DynamoModel</param>
/// <param name="dynamoVersion"><see cref="Version"/> for DynamoModel</param>
/// <param name="preferences"><see cref="IPreferences"/> for DynamoModel</param>
/// <param name="linterManager"><see cref="LinterManager"/> for DynamoModel></param>
[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;
}
/// <summary>
/// Initializes a new instance of the <see cref="StartupParams"/> class.
/// </summary>
Expand Down
16 changes: 1 addition & 15 deletions src/DynamoCore/Graph/Nodes/CustomNodes/Function.cs
Original file line number Diff line number Diff line change
Expand Up @@ -394,31 +394,17 @@ public Symbol()
ElementResolver = new ElementResolver();
}

// TODO - Dynamo 3.0 - use JSONConstructor on this method
// and remove custom logic in nodeReadConverter for symbol nodes.

/// <summary>
/// Initializes a new instance of the <see cref="Symbol"/> class.
/// </summary>
[JsonConstructor]
public Symbol(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts, TypedParameter parameter, ElementResolver elementResolver) : base(inPorts, outPorts)
{
ArgumentLacing = LacingStrategy.Disabled;
InputSymbol = parameter.ToCommentNameString();
ElementResolver = elementResolver ?? new ElementResolver();
}

/// <summary>
/// Initializes a new instance of the <see cref="Symbol"/> class.
/// </summary>
[JsonConstructor]
[Obsolete("This method will be removed in Dynamo 3.0 - please use the constructor with ElementResolver parameter ")]
public Symbol(IEnumerable<PortModel> inPorts, IEnumerable<PortModel> outPorts, TypedParameter parameter) : base(inPorts, outPorts)
{
ArgumentLacing = LacingStrategy.Disabled;
InputSymbol = parameter.ToCommentNameString();
ElementResolver = new ElementResolver();
}

/// <summary>
/// Represents string input.
/// </summary>
Expand Down
6 changes: 3 additions & 3 deletions src/DynamoCore/Graph/Nodes/NodeInputData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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

/// <summary>
/// Possible graph input types.
Expand Down Expand Up @@ -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))
Expand Down
Loading

0 comments on commit 7ebd8ff

Please sign in to comment.