diff --git a/src/DynamoApplications/Properties/AssemblyInfo.cs b/src/DynamoApplications/Properties/AssemblyInfo.cs index f1db1d16f9d..53ff3fc5513 100644 --- a/src/DynamoApplications/Properties/AssemblyInfo.cs +++ b/src/DynamoApplications/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -11,4 +11,7 @@ // The following GUID is for the ID of the typelib if this project is exposed to COM [assembly: Guid("72464112-159f-4542-88c9-55734f67074e")] -[assembly:InternalsVisibleTo("IntegrationTests")] \ No newline at end of file +[assembly:InternalsVisibleTo("IntegrationTests")] +[assembly: InternalsVisibleTo("DynamoSandbox")] +[assembly: InternalsVisibleTo("DynamoCLI")] +[assembly: InternalsVisibleTo("DynamoWPFCLI")] diff --git a/src/DynamoApplications/StartupUtils.cs b/src/DynamoApplications/StartupUtils.cs index 280d7bcadb9..c53b4144de0 100644 --- a/src/DynamoApplications/StartupUtils.cs +++ b/src/DynamoApplications/StartupUtils.cs @@ -11,6 +11,7 @@ using Dynamo.Configuration; using Dynamo.Core; using Dynamo.Interfaces; +using Dynamo.Logging; using Dynamo.Models; using Dynamo.Scheduler; using Dynamo.Updates; @@ -52,8 +53,10 @@ internal class CMDLineOptions public string CommonDataFolder { get; set; } = String.Empty; [Option("HostName", Required = false, HelpText = "Identify Dynamo variation associated with host.")] public string HostName { get; set; } = String.Empty; - [Option("DisableAnalytics", Required = false, HelpText = "Disables analytics in Dynamo for the process liftime.")] + [Option("DisableAnalytics", Required = false, HelpText = "Disables analytics in Dynamo for the process lifetime.")] public bool DisableAnalytics { get; set; } + [Option("NoNetworkMode", Required = false, HelpText = "Disables network traffic in Dynamo at startup. Disables some features such as Notifications, Sign In, and ML Node Autocomplete for process lifetime.")] + public bool NoNetworkMode { get; set; } [Option('p', "ParentId", Required = false, HelpText = "Identify Dynamo host analytics parent id.")] public string ParentId { get; set; } = String.Empty; [Option('s', "SessionId", Required = false, HelpText = "Identify Dynamo host analytics session id.")] @@ -64,7 +67,7 @@ internal class CMDLineOptions public bool ServiceMode { get; set; } } - public class StartupUtils + public static class StartupUtils { //TODO internal? /// @@ -142,6 +145,7 @@ public static CommandLineArguments Parse(string[] args) UserDataFolder = cmdArgs.UserDataFolder, CommonDataFolder = cmdArgs.CommonDataFolder, DisableAnalytics = cmdArgs.DisableAnalytics, + NoNetworkMode = cmdArgs.NoNetworkMode, AnalyticsInfo = new HostAnalyticsInfo() { HostName = cmdArgs.HostName, ParentId = cmdArgs.ParentId, SessionId = cmdArgs.SessionId }, CERLocation = cmdArgs.CERLocation, ServiceMode = cmdArgs.ServiceMode @@ -149,6 +153,14 @@ public static CommandLineArguments Parse(string[] args) }, errs => new CommandLineArguments()); } + internal void SetDisableAnalytics() + { + if (DisableAnalytics || NoNetworkMode) + { + Analytics.DisableAnalytics = true; + } + } + public string Locale { get; set; } public string CommandFilePath { get; set; } public string OpenFilePath { get; set; } @@ -164,6 +176,7 @@ public static CommandLineArguments Parse(string[] args) [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; } public string CERLocation { get; set; } @@ -227,7 +240,7 @@ private static IUpdateManager InitializeUpdateManager() // Preload ASM and display corresponding message on splash screen DynamoModel.OnRequestUpdateLoadBarStatus(new SplashScreenLoadEventArgs(Resources.SplashScreenPreLoadingAsm, 10)); var isASMloaded = PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(true, userDataFolder, commonDataFolder, geometryFactoryPath, preloaderLocation, info); + var model = StartDynamoWithDefaultConfig(true, userDataFolder, commonDataFolder, geometryFactoryPath, preloaderLocation, false, info); model.IsASMLoaded = isASMloaded; return model; } @@ -235,14 +248,11 @@ private static IUpdateManager InitializeUpdateManager() /// /// Use this overload to construct a DynamoModel in CLI context when the location of ASM to use is known, host analytics info is known and you want to set data paths. /// - /// Path to directory containing geometry library binaries - /// Path to be used by PathResolver for UserDataFolder - /// Path to be used by PathResolver for CommonDataFolder - /// Host analytics info specifying Dynamo launching host related information. - /// Boolean indication of launching Dynamo in service mode, this mode is optimized for minimal launch time. + /// /// - public static DynamoModel MakeCLIModel(string asmPath, string userDataFolder, string commonDataFolder, HostAnalyticsInfo info = new HostAnalyticsInfo(), bool isServiceMode = false) + public static DynamoModel MakeCLIModel(CommandLineArguments cmdLineArgs) { + var asmPath = String.IsNullOrEmpty(cmdLineArgs.ASMPath) ? string.Empty : cmdLineArgs.ASMPath; IPathResolver pathResolver = CreatePathResolver(false, string.Empty, string.Empty, string.Empty); PathManager.Instance.AssignHostPathAndIPathResolver(string.Empty, pathResolver); DynamoModel.SetUICulture(PreferenceSettings.Instance.Locale); @@ -251,7 +261,8 @@ private static IUpdateManager InitializeUpdateManager() // Preload ASM and display corresponding message on splash screen DynamoModel.OnRequestUpdateLoadBarStatus(new SplashScreenLoadEventArgs(Resources.SplashScreenPreLoadingAsm, 10)); var isASMloaded = PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(true, userDataFolder, commonDataFolder, geometryFactoryPath, preloaderLocation, info, isServiceMode); + var model = StartDynamoWithDefaultConfig(true, cmdLineArgs.UserDataFolder, cmdLineArgs.CommonDataFolder, + geometryFactoryPath, preloaderLocation, cmdLineArgs.NoNetworkMode, cmdLineArgs.AnalyticsInfo, cmdLineArgs.ServiceMode); model.IsASMLoaded = isASMloaded; return model; } @@ -266,7 +277,8 @@ private static IUpdateManager InitializeUpdateManager() public static DynamoModel MakeModel(bool CLImode, string asmPath = "", string hostName ="") { var isASMloaded = PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, geometryFactoryPath, preloaderLocation, new HostAnalyticsInfo() { HostName = hostName }); + var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, + geometryFactoryPath, preloaderLocation, false, new HostAnalyticsInfo() { HostName = hostName }); model.IsASMLoaded = isASMloaded; return model; } @@ -275,10 +287,11 @@ public static DynamoModel MakeModel(bool CLImode, string asmPath = "", string ho /// Use this overload to construct a DynamoModel when the location of ASM to use is known and host analytics info is known. /// /// CLI mode starts the model in test mode and uses a separate path resolver. + /// Option to initialize Dynamo in no-network mode /// Path to directory containing geometry library binaries /// Host analytics info specifying Dynamo launching host related information. /// - public static DynamoModel MakeModel(bool CLImode, string asmPath = "", HostAnalyticsInfo info = new HostAnalyticsInfo()) + public static DynamoModel MakeModel(bool CLImode, bool noNetworkMode, string asmPath = "", HostAnalyticsInfo info = new HostAnalyticsInfo()) { IPathResolver pathResolver = CreatePathResolver(false, string.Empty, string.Empty, string.Empty); PathManager.Instance.AssignHostPathAndIPathResolver(string.Empty, pathResolver); @@ -288,7 +301,8 @@ public static DynamoModel MakeModel(bool CLImode, string asmPath = "", string ho // Preload ASM and display corresponding message on splash screen DynamoModel.OnRequestUpdateLoadBarStatus(new SplashScreenLoadEventArgs(Resources.SplashScreenPreLoadingAsm, 10)); var isASMloaded = PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, geometryFactoryPath, preloaderLocation, info); + var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, geometryFactoryPath, + preloaderLocation, noNetworkMode, info); model.IsASMLoaded = isASMloaded; return model; } @@ -306,33 +320,7 @@ private static IPathResolver CreatePathResolver(bool CLImode, string preloaderLo IPathResolver pathResolver = CLImode ? new CLIPathResolver(preloaderLocation, userDataFolder, commonDataFolder) as IPathResolver : new SandboxPathResolver(preloaderLocation) as IPathResolver; return pathResolver; } - - /// - /// TODO (DYN-2118) remove this method in 3.0 and unify this method with the overload above. - /// Use this overload to construct a DynamoModel when the location of ASM to use is known. - /// - /// CLI mode starts the model in test mode and uses a seperate path resolver. - /// Path to directory containing geometry library binaries - /// - [Obsolete("This method will be removed in Dynamo 3.0 - please use the version with more parameters")] - public static DynamoModel MakeModel(bool CLImode, string asmPath) - { - var isASMloaded = PreloadASM(asmPath, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, geometryFactoryPath, preloaderLocation); - model.IsASMLoaded = isASMloaded; - return model; - } - - //TODO (DYN-2118) remove this method in 3.0 and unify this method with the overload above. - [Obsolete("This method will be removed in Dynamo 3.0 - please use the version with more parameters")] - public static DynamoModel MakeModel(bool CLImode) - { - var isASMloaded = PreloadASM(string.Empty, out string geometryFactoryPath, out string preloaderLocation); - var model = StartDynamoWithDefaultConfig(CLImode, string.Empty, string.Empty, geometryFactoryPath, preloaderLocation); - model.IsASMLoaded = isASMloaded; - return model; - } - + private static bool PreloadASM(string asmPath, out string geometryFactoryPath, out string preloaderLocation ) { if (string.IsNullOrEmpty(asmPath) && OSHelper.IsWindows()) @@ -391,6 +379,7 @@ private static DynamoModel StartDynamoWithDefaultConfig(bool CLImode, string commonDataFolder, string geometryFactoryPath, string preloaderLocation, + bool noNetworkMode, HostAnalyticsInfo info = new HostAnalyticsInfo(), bool isServiceMode = false) { @@ -401,13 +390,13 @@ private static DynamoModel StartDynamoWithDefaultConfig(bool CLImode, ProcessMode = CLImode ? TaskProcessMode.Synchronous : TaskProcessMode.Asynchronous, HostAnalyticsInfo = info, CLIMode = CLImode, - //TODO we currently use this like a no network comms flags - work on introducing a new flag or renaming this flag. - AuthProvider = CLImode || Dynamo.Logging.Analytics.DisableAnalytics ? null : new Core.IDSDKManager(), + AuthProvider = CLImode || noNetworkMode ? null : new Core.IDSDKManager(), UpdateManager = CLImode ? null : OSHelper.IsWindows() ? InitializeUpdateManager() : null, StartInTestMode = CLImode, PathResolver = CreatePathResolver(CLImode, preloaderLocation, userDataFolder, commonDataFolder), IsServiceMode = isServiceMode, - Preferences = PreferenceSettings.Instance + Preferences = PreferenceSettings.Instance, + NoNetworkMode = noNetworkMode }; var model = DynamoModel.Start(config); return model; diff --git a/src/DynamoCLI/Program.cs b/src/DynamoCLI/Program.cs index 59a2c9e11bd..4de3f8329e9 100644 --- a/src/DynamoCLI/Program.cs +++ b/src/DynamoCLI/Program.cs @@ -2,6 +2,7 @@ using System.Linq; using System.Threading; using Dynamo.Applications; +using Dynamo.Logging; using Dynamo.Models; namespace DynamoCLI @@ -11,7 +12,7 @@ internal class Program private static EventWaitHandle suspendEvent = new AutoResetEvent(false); [STAThread] - static internal void Main(string[] args) + internal static void Main(string[] args) { bool useConsole = true; @@ -20,10 +21,8 @@ static internal void Main(string[] args) var cmdLineArgs = StartupUtils.CommandLineArguments.Parse(args); useConsole = !cmdLineArgs.NoConsole; var locale = StartupUtils.SetLocale(cmdLineArgs); - if (cmdLineArgs.DisableAnalytics) - { - Dynamo.Logging.Analytics.DisableAnalytics = true; - } + + cmdLineArgs.SetDisableAnalytics(); if (cmdLineArgs.KeepAlive) { @@ -100,11 +99,7 @@ private static void RunKeepAlive(StartupUtils.CommandLineArguments cmdLineArgs) private static DynamoModel StartupDynamo(StartupUtils.CommandLineArguments cmdLineArgs) { DynamoModel model; - model = Dynamo.Applications.StartupUtils.MakeCLIModel(String.IsNullOrEmpty(cmdLineArgs.ASMPath) ? string.Empty : cmdLineArgs.ASMPath, - cmdLineArgs.UserDataFolder, - cmdLineArgs.CommonDataFolder, - cmdLineArgs.AnalyticsInfo, - cmdLineArgs.ServiceMode); + model = StartupUtils.MakeCLIModel(cmdLineArgs); if (!string.IsNullOrEmpty(cmdLineArgs.CERLocation)) { diff --git a/src/DynamoCore/Configuration/IPreferences.cs b/src/DynamoCore/Configuration/IPreferences.cs index 2444f6b0f95..e3d79c34c9a 100644 --- a/src/DynamoCore/Configuration/IPreferences.cs +++ b/src/DynamoCore/Configuration/IPreferences.cs @@ -56,18 +56,6 @@ public interface IPreferences /// string NumberFormat { get; set; } - /// - /// Indicates whether usage reporting is approved or not. - /// - [Obsolete("Property will be deprecated in Dynamo 3.0")] - bool IsUsageReportingApproved { get; set; } - - /// - /// Indicates whether Google analytics reporting is approved or not. - /// - [Obsolete("Property will be deprecated in Dynamo 3.0")] - bool IsAnalyticsReportingApproved { get; set; } - /// /// Indicates whether ADP analytics reporting is approved or not. /// diff --git a/src/DynamoCore/Configuration/PreferenceSettings.cs b/src/DynamoCore/Configuration/PreferenceSettings.cs index 26f014b27d6..2a86d8290a9 100644 --- a/src/DynamoCore/Configuration/PreferenceSettings.cs +++ b/src/DynamoCore/Configuration/PreferenceSettings.cs @@ -110,18 +110,6 @@ internal readonly static Lazy /// public bool IsFirstRun { get; set; } - /// - /// Indicates whether usage reporting is approved or not. - /// - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public bool IsUsageReportingApproved { get { return false; } set { } } - - /// - /// Indicates whether Google analytics reporting is approved or not. - /// - [Obsolete("Property will be deprecated in Dynamo 3.0")] - public bool IsAnalyticsReportingApproved { get { return false; } set { } } - /// /// This defines if the user export file path would include timestamp /// @@ -868,7 +856,6 @@ public PreferenceSettings() // Default Settings IsFirstRun = true; - IsAnalyticsReportingApproved = true; Locale = Configurations.SupportedLocaleDic.FirstOrDefault().Value; LibraryWidth = 304; ConsoleHeight = 0; diff --git a/src/DynamoCore/Extensions/StartupParams.cs b/src/DynamoCore/Extensions/StartupParams.cs index 61dbcf465d6..3820c74ca7d 100644 --- a/src/DynamoCore/Extensions/StartupParams.cs +++ b/src/DynamoCore/Extensions/StartupParams.cs @@ -57,10 +57,15 @@ public class StartupParams public LinterManager LinterManager => linterManager; private readonly LinterManager linterManager; + /// + /// True when Dynamo starts up in offline mode. + /// + public bool NoNetworkMode { get; } + /// /// Returns true if ASM/LibG are loaded. May only be valid in sandbox sessions. /// - internal bool IsGeometryLibraryLoaded { get; private set; } + internal bool IsGeometryLibraryLoaded { get; } /// /// Initializes a new instance of the class. @@ -111,14 +116,15 @@ public StartupParams(IAuthProvider provider, IPathManager pathManager, /// internal StartupParams(DynamoModel dynamoModel) { - this.authProvider = dynamoModel.AuthenticationManager?.AuthProvider; - this.pathManager = dynamoModel.PathManager; - this.libraryLoader = new ExtensionLibraryLoader(dynamoModel); - this.customNodeManager = dynamoModel.CustomNodeManager; - this.dynamoVersion = new Version(dynamoModel.Version); - this.preferences = dynamoModel.PreferenceSettings; - this.linterManager = dynamoModel.LinterManager; - this.IsGeometryLibraryLoaded = dynamoModel.IsASMLoaded; + authProvider = dynamoModel.AuthenticationManager?.AuthProvider; + pathManager = dynamoModel.PathManager; + libraryLoader = new ExtensionLibraryLoader(dynamoModel); + customNodeManager = dynamoModel.CustomNodeManager; + dynamoVersion = new Version(dynamoModel.Version); + preferences = dynamoModel.PreferenceSettings; + linterManager = dynamoModel.LinterManager; + IsGeometryLibraryLoaded = dynamoModel.IsASMLoaded; + NoNetworkMode = dynamoModel.NoNetworkMode; } } diff --git a/src/DynamoCore/Logging/AnalyticsService.cs b/src/DynamoCore/Logging/AnalyticsService.cs index 5ed073b98c5..9af4b8333c7 100644 --- a/src/DynamoCore/Logging/AnalyticsService.cs +++ b/src/DynamoCore/Logging/AnalyticsService.cs @@ -13,6 +13,7 @@ class AnalyticsService { // Use the Analytics.Core interface so that we do not have to load the ADP assembly at this time. private static IAnalyticsUI adpAnalyticsUI; + /// /// Starts the client when DynamoModel is created. This method initializes /// the Analytics service and application life cycle start is tracked. @@ -105,7 +106,7 @@ internal static void ShutDown() /// Show the ADP dynamic consents dialog. /// /// main window - internal static void ShowADPConsetDialog(IntPtr? host) + internal static void ShowADPConsentDialog(IntPtr? host) { if (!Analytics.DisableAnalytics && adpAnalyticsUI != null) { diff --git a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs index 39f8b324208..7c72eff1b74 100644 --- a/src/DynamoCore/Logging/DynamoAnalyticsClient.cs +++ b/src/DynamoCore/Logging/DynamoAnalyticsClient.cs @@ -106,20 +106,6 @@ public bool ReportingAnalytics } } - /// - /// Return if Analytics Client is allowed to send instrumentation info - /// - public bool ReportingUsage - { - get - { - return preferences != null - && Service.IsInitialized - && !Analytics.DisableAnalytics - && preferences.IsUsageReportingApproved; - } - } - /// /// Constructs DynamoAnalyticsClient with given DynamoModel /// diff --git a/src/DynamoCore/Models/DynamoModel.cs b/src/DynamoCore/Models/DynamoModel.cs index e32296b06bc..35473cf1ba6 100644 --- a/src/DynamoCore/Models/DynamoModel.cs +++ b/src/DynamoCore/Models/DynamoModel.cs @@ -225,6 +225,11 @@ public string Version /// internal bool IsServiceMode { get; set; } + /// + /// True if Dynamo starts up in offline mode. + /// + internal bool NoNetworkMode { get; } + /// /// UpdateManager to handle automatic upgrade to higher version. /// @@ -525,6 +530,11 @@ public interface IStartConfiguration /// No update checks or analytics collection should be done. /// bool IsHeadless { get; set; } + + /// + /// Configuration option to start Dynamo in offline mode. + /// + bool NoNetworkMode => false; } /// @@ -568,6 +578,7 @@ public struct DefaultStartConfiguration : IStartConfiguration public IEnumerable Extensions { get; set; } public TaskProcessMode ProcessMode { get; set; } public bool IsHeadless { get; set; } + public bool NoNetworkMode { get; set; } public bool IsServiceMode { get; set; } public string PythonTemplatePath { get; set; } /// @@ -653,6 +664,7 @@ protected DynamoModel(IStartConfiguration config) Context = config.Context; IsTestMode = config.StartInTestMode; IsHeadless = config.IsHeadless; + NoNetworkMode = config.NoNetworkMode; DebugSettings = new DebugSettings(); Logger = new DynamoLogger(DebugSettings, pathManager.LogDirectory, IsTestMode, CLIMode, IsServiceMode); @@ -729,7 +741,7 @@ protected DynamoModel(IStartConfiguration config) // If user skipped analytics from assembly config, do not try to launch the analytics client // or the feature flags client for web traffic reason. - if (!IsServiceMode && !areAnalyticsDisabledFromConfig && !Dynamo.Logging.Analytics.DisableAnalytics) + if (!IsServiceMode && !areAnalyticsDisabledFromConfig && !Analytics.DisableAnalytics) { // Start the Analytics service only when a session is not present. // In an integrator host, as splash screen can be closed without shutting down the ViewModel, the analytics service is not stopped. @@ -944,7 +956,7 @@ protected DynamoModel(IStartConfiguration config) } UpdateManager.Log += UpdateManager_Log; - if (!IsTestMode && !IsHeadless && !IsServiceMode) + if (!IsTestMode && !IsHeadless && !IsServiceMode && !config.NoNetworkMode) { DefaultUpdateManager.CheckForProductUpdate(UpdateManager); } diff --git a/src/DynamoCore/Properties/AssemblyInfo.cs b/src/DynamoCore/Properties/AssemblyInfo.cs index 88f9f699476..5c6498b2bd6 100644 --- a/src/DynamoCore/Properties/AssemblyInfo.cs +++ b/src/DynamoCore/Properties/AssemblyInfo.cs @@ -53,6 +53,7 @@ [assembly: InternalsVisibleTo("GraphNodeManagerViewExtension")] [assembly: InternalsVisibleTo("ExportSampleImagesViewExtension")] [assembly: InternalsVisibleTo("DocumentationBrowserViewExtension")] +[assembly: InternalsVisibleTo("Notifications")] [assembly: TypeForwardedTo(typeof(Dynamo.Scheduler.Disposable))] diff --git a/src/DynamoCoreWpf/Services/UsageReportingManager.cs b/src/DynamoCoreWpf/Services/UsageReportingManager.cs index 1aa3867cd2e..4a78202266f 100644 --- a/src/DynamoCoreWpf/Services/UsageReportingManager.cs +++ b/src/DynamoCoreWpf/Services/UsageReportingManager.cs @@ -41,38 +41,6 @@ public static void DestroyInstance() #region Properties binded to PreferenceSettings - /// - /// UsageReporting is the opt-in component - /// - public bool IsUsageReportingApproved - { - get - { - return !DynamoModel.IsTestMode - && !Analytics.DisableAnalytics - && (dynamoViewModel != null - && dynamoViewModel.Model.PreferenceSettings.IsUsageReportingApproved); - } - private set - { - dynamoViewModel.Model.PreferenceSettings.IsUsageReportingApproved = value; - RaisePropertyChanged("IsUsageReportingApproved"); - var path = dynamoViewModel.Model.PathManager.PreferenceFilePath; - - // Call PreferenceSettings to save - try - { - dynamoViewModel.Model.PreferenceSettings.SaveInternal(path); - } - catch (Exception args) - { - DynamoModel.IsCrashing = true; - dynamoViewModel.Model.OnRequestsCrashPrompt(this, new CrashPromptArgs( - args.Message, Properties.Resources.UsageReportingErrorMessage, path)); - } - } - } - /// /// Provide access to the instance of DynamoModel to watch. /// This operation should be called only once at @@ -84,56 +52,7 @@ public void InitializeCore(DynamoViewModel dynamoViewModel) if (UsageReportingManager.dynamoViewModel == null) UsageReportingManager.dynamoViewModel = dynamoViewModel; } - - /// - /// Analytics is the opt-out tracking system - /// PII is prohibited from Analytics. - /// - public bool IsAnalyticsReportingApproved - { - get - { - if (DynamoModel.IsTestMode) // Do not want logging in unit tests. - return false; - - if (Analytics.DisableAnalytics) - { - return false; - } - - if (dynamoViewModel.Model != null) - return dynamoViewModel.Model.PreferenceSettings.IsAnalyticsReportingApproved; - - return true; - } - - private set - { - if (Analytics.DisableAnalytics) - { - return;// Do not override anything when DisableAnalytics is on - } - - dynamoViewModel.Model.PreferenceSettings.IsAnalyticsReportingApproved = value; - RaisePropertyChanged("IsAnalyticsReportingApproved"); - var path = dynamoViewModel.Model.PathManager.PreferenceFilePath; - - // Call PreferenceSettings to save - try - { - dynamoViewModel.Model.PreferenceSettings.SaveInternal(path); - } - catch (Exception args) - { - DynamoModel.IsCrashing = true; - dynamoViewModel.Model.OnRequestsCrashPrompt(this, new CrashPromptArgs( - args.Message, Properties.Resources.UsageReportingErrorMessage, path)); - } - } - - - } - + public bool FirstRun { get @@ -170,31 +89,7 @@ public void CheckIsFirstRun(Window ownerWindow, IBrandingResourceProvider resour } FirstRun = false; } - - [Obsolete("Function will be removed in Dynamo 3.0, please set IsUsageReportingApproved.")] - public void ToggleIsUsageReportingApproved(object parameter) - { - var ownerWindow = parameter as Window; - if (ownerWindow == null) - { - throw new InvalidOperationException( - "DynamoView must be supplied for this command"); - } - - // If reporting is not currently enabled, then the user should be - // shown the agreement dialog (on which he/she can choose to accept - // or reject the reporting). If the reporting is currently enabled, - // then set it to false (user chooses not to accept the reporting). - // - if (IsUsageReportingApproved) - { - IsUsageReportingApproved = false; - } - else - { - ShowUsageReportingPrompt(ownerWindow); - } - } + public void ToggleIsAnalyticsReportingApproved(object parameter) { @@ -207,27 +102,6 @@ public void ToggleIsAnalyticsReportingApproved(object parameter) ShowUsageReportingPrompt(ownerWindow); } - /// - /// Setting UsageReportingAgreement. Please notice - /// that IsUsageReportingApproved is dominated by - /// IsAnalyticsReportingApproved. - /// - /// - [Obsolete("Function will be removed in Dynamo 3.0 as Dynamo will no longer support GA instrumentation.")] - public void SetUsageReportingAgreement(bool approved) - { - IsUsageReportingApproved = approved && IsAnalyticsReportingApproved; - } - - /// - /// Setting AnalyticsReportingAgreement. - /// - /// - public void SetAnalyticsReportingAgreement(bool approved) - { - IsAnalyticsReportingApproved = approved; - } - private void ShowUsageReportingPrompt(Window ownerWindow) { // If an owner window is not supplied, then we will fallback onto diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs index 9b4766a9b0d..c313d01b0a1 100644 --- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs +++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs @@ -475,7 +475,7 @@ private Step CreateStep(Step jsonStepInfo, HostControlInfo hostControlInfo, int Sequence = jsonStepInfo.Sequence, RatingTextTitle = formattedText.ToString(), StepType = Step.StepTypes.SURVEY, - IsRatingVisible = !Analytics.DisableAnalytics && Analytics.IsEnabled, + IsRatingVisible = Analytics.IsEnabled && !Analytics.DisableAnalytics, StepContent = new Content() { FormattedText = formattedText, diff --git a/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml b/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml index df1c5f00def..3e2799edf75 100644 --- a/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml +++ b/src/DynamoCoreWpf/UI/Prompts/UsageReportingAgreementPrompt.xaml @@ -188,23 +188,6 @@ - - - - - private Dictionary> NodePackageDictionary; + private bool noNetworkMode; + public string Name { get { return "DynamoPackageManager"; } } public string UniqueId @@ -159,6 +161,7 @@ public void Startup(StartupParams startupParams) uploadBuilder, packageUploadDirectory); LoadPackages(startupParams.Preferences, startupParams.PathManager); + noNetworkMode = startupParams.NoNetworkMode; } private PackageInfo handleCustomNodeOwnerQuery(Guid customNodeFunctionID) @@ -339,10 +342,9 @@ internal bool CheckIfPackagesTargetOtherHosts(IEnumerable newPac var containsPackagesThatTargetOtherHosts = false; //fallback list of hosts as of 9/8/23 IEnumerable knownHosts = new List { "Revit", "Civil 3D", "Alias", "Advance Steel", "FormIt" }; - //if analytics is disabled, treat this as network black out - //and don't ask dpm for known hosts. - //TODO we currently use this like a no network comms flags - work on introducing a new flag or renaming this flag. - if (!Dynamo.Logging.Analytics.DisableAnalytics) + + //we don't ask dpm for known hosts in offline mode. + if (!noNetworkMode) { // Known hosts knownHosts = PackageManagerClient.GetKnownHosts(); diff --git a/src/DynamoSandbox/DynamoCoreSetup.cs b/src/DynamoSandbox/DynamoCoreSetup.cs index e4cce35ff87..71ff2ca5d8b 100644 --- a/src/DynamoSandbox/DynamoCoreSetup.cs +++ b/src/DynamoSandbox/DynamoCoreSetup.cs @@ -24,6 +24,7 @@ class DynamoCoreSetup private readonly string CERLocation; private readonly string ASMPath; private readonly HostAnalyticsInfo analyticsInfo; + private readonly bool noNetworkMode; private const string sandboxWikiPage = @"https://github.com/DynamoDS/Dynamo/wiki/How-to-Utilize-Dynamo-Builds"; private DynamoViewModel viewModel = null; @@ -40,10 +41,7 @@ public DynamoCoreSetup(string[] args) var locale = StartupUtils.SetLocale(cmdLineArgs); _putenv(locale); - if (cmdLineArgs.DisableAnalytics) - { - Analytics.DisableAnalytics = true; - } + cmdLineArgs.SetDisableAnalytics(); if (!string.IsNullOrEmpty(cmdLineArgs.CERLocation)) { @@ -53,6 +51,7 @@ public DynamoCoreSetup(string[] args) commandFilePath = cmdLineArgs.CommandFilePath; ASMPath = cmdLineArgs.ASMPath; analyticsInfo = cmdLineArgs.AnalyticsInfo; + noNetworkMode = cmdLineArgs.NoNetworkMode; } public void RunApplication(Application app) @@ -134,7 +133,7 @@ public void RunApplication(Application app) private void LoadDynamoView() { DynamoModel model; - model = StartupUtils.MakeModel(false, ASMPath ?? string.Empty, analyticsInfo); + model = StartupUtils.MakeModel(false, noNetworkMode, ASMPath ?? string.Empty, analyticsInfo); model.CERLocation = CERLocation; viewModel = DynamoViewModel.Start( diff --git a/src/DynamoWPFCLI/Program.cs b/src/DynamoWPFCLI/Program.cs index b30173428f8..fcb37a02894 100644 --- a/src/DynamoWPFCLI/Program.cs +++ b/src/DynamoWPFCLI/Program.cs @@ -5,6 +5,7 @@ #endif using System.Threading; using Dynamo.Applications; +using Dynamo.Logging; using Dynamo.Models; using Dynamo.ViewModels; using Dynamo.Wpf.ViewModels.Watch3D; @@ -29,11 +30,9 @@ internal static void Main(string[] args) useConsole = !cmdLineArgs.NoConsole; var locale = StartupUtils.SetLocale(cmdLineArgs); - if (cmdLineArgs.DisableAnalytics) - { - Dynamo.Logging.Analytics.DisableAnalytics = true; - } - if(cmdLineArgs.ServiceMode) + cmdLineArgs.SetDisableAnalytics(); + + if (cmdLineArgs.ServiceMode) { Console.WriteLine("Starting DynamoWPFCLI in service mode"); } @@ -59,7 +58,7 @@ internal static void Main(string[] args) } else { - var viewModel = StartupDaynamo(cmdLineArgs); + var viewModel = StartupDynamo(cmdLineArgs); var runner = new CommandLineRunnerWPF(viewModel); runner.Run(cmdLineArgs); @@ -89,14 +88,9 @@ internal static void Main(string[] args) /// /// /// - private static DynamoViewModel StartupDaynamo(StartupUtils.CommandLineArguments cmdLineArgs) + private static DynamoViewModel StartupDynamo(StartupUtils.CommandLineArguments cmdLineArgs) { - DynamoModel model; - model = Dynamo.Applications.StartupUtils.MakeCLIModel(String.IsNullOrEmpty(cmdLineArgs.ASMPath) ? string.Empty : cmdLineArgs.ASMPath, - cmdLineArgs.UserDataFolder, - cmdLineArgs.CommonDataFolder, - cmdLineArgs.AnalyticsInfo, - cmdLineArgs.ServiceMode); + var model = StartupUtils.MakeCLIModel(cmdLineArgs); if (!string.IsNullOrEmpty(cmdLineArgs.CERLocation)) { @@ -128,7 +122,7 @@ private static void RunKeepAlive(StartupUtils.CommandLineArguments cmdLineArgs) { try { - StartupDaynamo(cmdLineArgs); + StartupDynamo(cmdLineArgs); if (!cmdLineArgs.NoConsole) { diff --git a/src/Engine/ProtoCore/FFI/ExtensionAppLoader.cs b/src/Engine/ProtoCore/FFI/ExtensionAppLoader.cs index 5b39eab456b..5ebe3a36b54 100644 --- a/src/Engine/ProtoCore/FFI/ExtensionAppLoader.cs +++ b/src/Engine/ProtoCore/FFI/ExtensionAppLoader.cs @@ -1,8 +1,9 @@ -using System; +using System; using System.Collections; using System.IO; using System.Reflection; using Autodesk.DesignScript.Interfaces; +using Dynamo.Logging; namespace ProtoFFI { @@ -167,35 +168,10 @@ private void InitializeExtensionApp(Assembly assembly) } if (null != extensionApp) - extensionApp.StartUp(new ExtensionStartupParams() { DisableADP = Dynamo.Logging.Analytics.DisableAnalytics }); - } - - /// - /// For nunit-setup - /// - internal void ForceStartUpAllApps() - { - IDictionaryEnumerator i = mExtensionApps.GetEnumerator(); - while (i.MoveNext()) { - IExtensionApplication app = i.Value as IExtensionApplication; - if (null != app) - app.StartUp(new ExtensionStartupParams() { DisableADP = Dynamo.Logging.Analytics.DisableAnalytics }); - } - } - - /// - /// For nunit-teardown - /// - internal void ForceShutDownAllApps() - { - IDictionaryEnumerator i = mExtensionApps.GetEnumerator(); - while (i.MoveNext()) - { - IExtensionApplication app = i.Value as IExtensionApplication; - if (null != app) - app.ShutDown(); + extensionApp.StartUp(new ExtensionStartupParams { DisableADP = Analytics.DisableAnalytics }); } } + } } diff --git a/src/Engine/ProtoCore/FFI/FFIExecutionManager.cs b/src/Engine/ProtoCore/FFI/FFIExecutionManager.cs index f5615dce307..ec6817f9261 100644 --- a/src/Engine/ProtoCore/FFI/FFIExecutionManager.cs +++ b/src/Engine/ProtoCore/FFI/FFIExecutionManager.cs @@ -124,22 +124,7 @@ private void OnExecutionEvent(object sender, ExecutionStateEventArgs e) session.State = e.ExecutionState; mApploader.Notify(session); } - - /// - /// For nunit-setup - /// - internal static void ForceStartUpAllApps() - { - Instance.mApploader.ForceStartUpAllApps(); - } - - /// - /// For nunit-teardown - /// - internal static void ForceShutDownAllApps() - { - Instance.mApploader.ForceShutDownAllApps(); - } + } class FFIExecutionSession : IExecutionSession, IConfiguration, IDisposable diff --git a/src/NodeServices/Analytics.cs b/src/NodeServices/Analytics.cs index d355048c4fe..2031ec5c7cc 100644 --- a/src/NodeServices/Analytics.cs +++ b/src/NodeServices/Analytics.cs @@ -7,12 +7,10 @@ namespace Dynamo.Logging /// public static class Analytics { - //TODO we currently use this like a no network comms flags - work on introducing a new flag or renaming this flag. /// /// Disables all analytics collection for the lifetime of the process. - /// To ensure that no analytics get through, please set set this flag to false before the DynamoModel is constructed. /// - public static bool DisableAnalytics; + public static bool DisableAnalytics { get; internal set; } /// /// A dummy IDisposable class @@ -22,7 +20,7 @@ class Dummy : IDisposable public void Dispose() { } } - internal static IAnalyticsClient client = null; + internal static IAnalyticsClient client; /// /// Starts analytics client diff --git a/src/NodeServices/ExecutionSession.cs b/src/NodeServices/ExecutionSession.cs index 888d6a1dd87..9013a50d2c8 100644 --- a/src/NodeServices/ExecutionSession.cs +++ b/src/NodeServices/ExecutionSession.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Dynamo.Session { @@ -81,5 +81,6 @@ public class ParameterKeys /// The return value is an ILogger /// public static readonly string Logger = nameof(Logger); + } } diff --git a/src/NodeServices/IAnalyticsClient.cs b/src/NodeServices/IAnalyticsClient.cs index de38251ac59..ff9591f40df 100644 --- a/src/NodeServices/IAnalyticsClient.cs +++ b/src/NodeServices/IAnalyticsClient.cs @@ -455,11 +455,6 @@ public interface IAnalyticsClient /// bool ReportingAnalytics { get; } - /// - /// Checks if detailed usage reporting is ON. - /// - bool ReportingUsage { get; } - /// /// Starts the client when DynamoModel is created. This method initializes /// the Analytics service and application life cycle start is tracked. diff --git a/src/NodeServices/Properties/AssemblyInfo.cs b/src/NodeServices/Properties/AssemblyInfo.cs index 7fe26345ed0..92391b4a2c5 100644 --- a/src/NodeServices/Properties/AssemblyInfo.cs +++ b/src/NodeServices/Properties/AssemblyInfo.cs @@ -41,3 +41,4 @@ [assembly: InternalsVisibleTo("DynamoPlayer.Extension")] [assembly: InternalsVisibleTo("DynamoPlayer.Workflows")] [assembly: InternalsVisibleTo("DynamoPlayer.WorkflowsUi")] +[assembly: InternalsVisibleTo("DynamoApplications")] diff --git a/src/Notifications/NotificationCenterController.cs b/src/Notifications/NotificationCenterController.cs index 8e4a4c3b570..b5dfeeaf65f 100644 --- a/src/Notifications/NotificationCenterController.cs +++ b/src/Notifications/NotificationCenterController.cs @@ -95,8 +95,7 @@ internal NotificationCenterController(DynamoView view, DynamoLogger dynLogger) // If user turns on the feature, they will need to restart Dynamo to see the count // This ensures no network traffic when Notification center feature is turned off - //TODO we currently use DisableAnalytics like a no network comms flags - work on introducing a new flag or renaming this flag. - if (dynamoViewModel.PreferenceSettings.EnableNotificationCenter && !Dynamo.Logging.Analytics.DisableAnalytics ) + if (dynamoViewModel.PreferenceSettings.EnableNotificationCenter && !dynamoViewModel.Model.NoNetworkMode ) { InitializeBrowserAsync(); RequestNotifications(); diff --git a/test/DynamoCoreTests/AnalyticsTests.cs b/test/DynamoCoreTests/AnalyticsTests.cs index 8d9a25b9752..c733b200ad7 100644 --- a/test/DynamoCoreTests/AnalyticsTests.cs +++ b/test/DynamoCoreTests/AnalyticsTests.cs @@ -128,7 +128,7 @@ public class DynamoAnalyticsTests : AnalyticsTests public DynamoAnalyticsTests() { - dynamoSettings = new PreferenceSettings() { IsAnalyticsReportingApproved = true, IsUsageReportingApproved = true }; + dynamoSettings = new PreferenceSettings(); } protected override Mock MockClient() @@ -157,11 +157,6 @@ private void SetupServices() factoryMoq.Object.Register(trackerMoq.Object); Service.Instance.Register(factoryMoq.Object); - - Service.Instance.AddTrackerFactoryFilter(factoryName, () => { - return CurrentDynamoModel.PreferenceSettings.IsAnalyticsReportingApproved; - } - ); } public override void Cleanup() @@ -179,25 +174,6 @@ public void AnalyticsTrackingEnabled() trackerMoq.Verify(t => t.Track(It.IsAny(), factoryMoq.Object), Times.AtLeast(10)); } - [Test] - [Category("Failure")] - public void AnalyticsTrackingDisabled() - { - //Modify preferences - dynamoSettings.IsAnalyticsReportingApproved = false; - dynamoSettings.IsUsageReportingApproved = false; - - //Trigger events and tracks - VerifyEventTracking(Times.Exactly(1)); - - //Reset preferences - dynamoSettings.IsAnalyticsReportingApproved = true; - dynamoSettings.IsUsageReportingApproved = true; - - //1 startup + 1 analytics optin status event - trackerMoq.Verify(t => t.Track(It.IsAny(), factoryMoq.Object), Times.Exactly(2)); - } - [Test] [Category("Failure")] public void CreateDisposableEvents() @@ -224,44 +200,6 @@ public void CreateDisposableEvents() //1 Create + 1 Dispose trackerMoq.Verify(t => t.Track(e as FileOperationEvent, factoryMoq.Object), Times.Exactly(2)); } - - [Test] - [Category("Failure")] - public void DummyDisposableEvents() - { - //Modify preferences - dynamoSettings.IsAnalyticsReportingApproved = false; - var variable = "TimeVariable"; - var description = "Some description"; - - Analytics.DisableAnalytics = true; - var e = Analytics.CreateTimedEvent(Categories.Performance, variable, description); - Assert.IsNotInstanceOf(e); - e.Dispose(); - - Analytics.DisableAnalytics = false; - - //1 ApplicationLifecycle Start - trackerMoq.Verify(t => t.Track(It.IsAny(), factoryMoq.Object), Times.Exactly(1)); - - e = Analytics.TrackCommandEvent("TestCommand"); - // CommandEvent will be created unless DisableAnalytics is on (because Dynamo does not know the ADP opted-in status) - Assert.IsInstanceOf(e); - e.Dispose(); - - trackerMoq.Verify(t => t.Track(It.IsAny(), factoryMoq.Object), Times.Never()); - - e = Analytics.TrackFileOperationEvent(this.TempFolder, Actions.Save, 5); - // CommandEvent will be created unless DisableAnalytics is on (because Dynamo does not know the ADP opted-in status) - Assert.IsInstanceOf(e); - e.Dispose(); - - dynamoSettings.IsAnalyticsReportingApproved = false; - - trackerMoq.Verify(t => t.Track(It.IsAny(), factoryMoq.Object), Times.Never()); - - //Reset preferences - dynamoSettings.IsAnalyticsReportingApproved = true; - } + } } diff --git a/test/DynamoCoreTests/Settings.cs b/test/DynamoCoreTests/Settings.cs index ef28af61cc3..7bea6e3da8e 100644 --- a/test/DynamoCoreTests/Settings.cs +++ b/test/DynamoCoreTests/Settings.cs @@ -38,32 +38,7 @@ public void LoadInvalidLocationsFromSetting() IEnumerable comparisonResult = settings.CustomPackageFolders.Zip(expectedPackageFolders, string.Equals); Assert.IsFalse(comparisonResult.Any(isEqual => !isEqual)); } - - [Test] - public void AnalyticsReportingApprovedSetting() - { - var settings = new PreferenceSettings(); - Assert.IsFalse(settings.IsAnalyticsReportingApproved); - - // Check when deserializing preference setting with first run flag - var settingFilePath = Path.Combine(SettingDirectory, "DynamoSettings-firstrun.xml"); - var settingsFromXML = PreferenceSettings.Load(settingFilePath); - Assert.IsTrue(settingsFromXML.IsFirstRun); - Assert.IsFalse(settingsFromXML.IsAnalyticsReportingApproved); - } - - [Test] - public void UsageReportingApprovedSetting() - { - var settings = new PreferenceSettings(); - Assert.IsFalse(settings.IsUsageReportingApproved); - - // Check when deserializing preference setting with first run flag - var settingFilePath = Path.Combine(SettingDirectory, "DynamoSettings-firstrun.xml"); - var settingsFromXML = PreferenceSettings.Load(settingFilePath); - Assert.IsTrue(settingsFromXML.IsFirstRun); - Assert.IsFalse(settingsFromXML.IsUsageReportingApproved); - } + [Test] public void LoadInvalidPythonTemplateFromSetting() diff --git a/test/DynamoCoreWpfTests/CoreUITests.cs b/test/DynamoCoreWpfTests/CoreUITests.cs index 55237b26967..b0b4ffff634 100644 --- a/test/DynamoCoreWpfTests/CoreUITests.cs +++ b/test/DynamoCoreWpfTests/CoreUITests.cs @@ -546,31 +546,7 @@ public void PreferenceSetting_GroupStyles() Assert.AreEqual(OneGroupStyle.GroupStyleItemsList[0].Name, initalSetting.GroupStyleItemsList[0].Name); Assert.AreEqual(OneGroupStyle.GroupStyleItemsList[0].HexColorString, initalSetting.GroupStyleItemsList[0].HexColorString); } - - [Test] - [Category("DynamoUI")] - public void PreferenceSetting_NotAgreeAnalyticsSharing() - { - // Test deserialization of analytics setting - // Test loading old settings file without agreement - var filePath = Path.Combine(GetTestDirectory(ExecutingDirectory), @"settings\DynamoSettings-firstrun.xml"); - var resultSetting = PreferenceSettings.Load(filePath); - Assert.AreEqual(false, resultSetting.IsAnalyticsReportingApproved); - Assert.AreEqual(false, resultSetting.IsUsageReportingApproved); - Assert.DoesNotThrow(() => Dynamo.Logging.AnalyticsService.ShutDown()); - } - - [Test] - [Category("DynamoUI")] - public void PreferenceSetting_AgreeAnalyticsSharing() - { - // Test loading old settings file with agreement - var filePath = Path.Combine(GetTestDirectory(ExecutingDirectory), @"settings\DynamoSettings-AnalyticsTurnedOn.xml"); - var resultSetting = PreferenceSettings.Load(filePath); - Assert.AreEqual(false, resultSetting.IsAnalyticsReportingApproved); - Assert.AreEqual(false, resultSetting.IsUsageReportingApproved); - Assert.DoesNotThrow(() => Dynamo.Logging.AnalyticsService.ShutDown()); - } + #region PreferenceSettings [Test, Apartment(ApartmentState.STA)] @@ -621,17 +597,9 @@ public void PreferenceSetting() // First time run, check if dynamo did set it back to false after running Assert.AreEqual(false, UsageReportingManager.Instance.FirstRun); - // CollectionInfoOption To FALSE - UsageReportingManager.Instance.SetUsageReportingAgreement(true); RestartTestSetup(startInTestMode: false); - // Because IsUsageReportingApproved is now dominated by IsAnalyticsReportingApproved. - // In this case. the value is still false because of IsAnalyticsReportingApproved - Assert.AreEqual(false, UsageReportingManager.Instance.IsUsageReportingApproved); - // CollectionInfoOption To FALSE - UsageReportingManager.Instance.SetUsageReportingAgreement(false); RestartTestSetup(startInTestMode: false); - Assert.AreEqual(false, UsageReportingManager.Instance.IsUsageReportingApproved); DynamoModel.IsTestMode = isTestMode; // Restore the orignal value. } diff --git a/test/System/IntegrationTests/DynamoApplicationTests.cs b/test/System/IntegrationTests/DynamoApplicationTests.cs index 749e97bfa16..ac241aa5605 100644 --- a/test/System/IntegrationTests/DynamoApplicationTests.cs +++ b/test/System/IntegrationTests/DynamoApplicationTests.cs @@ -71,10 +71,9 @@ public void IfASMPathInvalidExceptionNotThrown() var asmMockPath = @"./doesNotExist/"; Assert.DoesNotThrow(() => { - var model = Dynamo.Applications.StartupUtils.MakeModel(true, asmMockPath); + var model = StartupUtils.MakeModel(true, asmMockPath); Assert.IsNotNull(model); }); - } [Test]