Ejemplo n.º 1
0
        /// <summary>
        /// Intializes a new <see cref="AcadProcessFactory"/> instance.
        /// </summary>
        /// <param name="logger">An <see cref="ILogger"/> instance.</param>
        /// <param name="fileSystem">An <see cref="IFileSystem"/> instance.</param>
        /// <param name="processFinder">A process finder.</param>
        /// <param name="processCreator">A process creator.</param>
        /// <param name="debuggerManager">An <see cref="IDebuggerManager"/> instance.</param>
        /// <param name="preferenceManager">The AutoCAD preference manager.</param>
        /// <param name="acadLocator">The AutoCAD locator.</param>
        /// <param name="pluginLocator">An AutoCAD plugin locator.</param>
        public AcadProcessFactory(ILogger logger, IFileSystem fileSystem,
            IProcessFinder processFinder, IProcessCreator processCreator,
            IDebuggerManager debuggerManager, IAcadPreferenceManager preferenceManager,
            IAcadLocator acadLocator, IAcadPluginLocator pluginLocator)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (fileSystem == null)
                throw new ArgumentNullException("fileSystem");
            if (processFinder == null)
                throw new ArgumentNullException("processFinder");
            if (processCreator == null)
                throw new ArgumentNullException("processCreator");
            if (debuggerManager == null)
                throw new ArgumentNullException("debuggerManager");
            if (preferenceManager == null)
                throw new ArgumentNullException("preferenceManager");
            if (acadLocator == null)
                throw new ArgumentNullException("acadLocator");
            if (pluginLocator == null)
                throw new ArgumentNullException("pluginLocator");

            this.logger = logger;
            this.fileSystem = fileSystem;
            this.processFinder = processFinder;
            this.processCreator = processCreator;
            this.debuggerManager = debuggerManager;
            this.preferenceManager = preferenceManager;
            this.acadLocator = acadLocator;
            this.pluginLocator = pluginLocator;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Intializes a new <see cref="AcadProcessFactory"/> instance.
        /// </summary>
        /// <param name="logger">An <see cref="ILogger"/> instance.</param>
        /// <param name="fileSystem">An <see cref="IFileSystem"/> instance.</param>
        /// <param name="processFinder">A process finder.</param>
        /// <param name="processCreator">A process creator.</param>
        /// <param name="debuggerManager">An <see cref="IDebuggerManager"/> instance.</param>
        /// <param name="preferenceManager">The AutoCAD preference manager.</param>
        /// <param name="acadLocator">The AutoCAD locator.</param>
        /// <param name="pluginLocator">An AutoCAD plugin locator.</param>
        public AcadProcessFactory(ILogger logger, IFileSystem fileSystem,
                                  IProcessFinder processFinder, IProcessCreator processCreator,
                                  IDebuggerManager debuggerManager, IAcadPreferenceManager preferenceManager,
                                  IAcadLocator acadLocator, IAcadPluginLocator pluginLocator)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (fileSystem == null)
            {
                throw new ArgumentNullException("fileSystem");
            }
            if (processFinder == null)
            {
                throw new ArgumentNullException("processFinder");
            }
            if (processCreator == null)
            {
                throw new ArgumentNullException("processCreator");
            }
            if (debuggerManager == null)
            {
                throw new ArgumentNullException("debuggerManager");
            }
            if (preferenceManager == null)
            {
                throw new ArgumentNullException("preferenceManager");
            }
            if (acadLocator == null)
            {
                throw new ArgumentNullException("acadLocator");
            }
            if (pluginLocator == null)
            {
                throw new ArgumentNullException("pluginLocator");
            }

            this.logger            = logger;
            this.fileSystem        = fileSystem;
            this.processFinder     = processFinder;
            this.processCreator    = processCreator;
            this.debuggerManager   = debuggerManager;
            this.preferenceManager = preferenceManager;
            this.acadLocator       = acadLocator;
            this.pluginLocator     = pluginLocator;
        }
Ejemplo n.º 3
0
        private static string GetExecutable(TestIsolationOptions options, IAcadPreferenceManager preferenceManager, IAcadLocator acadLocator)
        {
            var executable = options.Properties.GetValue("AcadExePath");

            if (!string.IsNullOrEmpty(executable))
            {
                return(executable);
            }

            if (preferenceManager.StartupAction == StartupAction.StartUserSpecified)
            {
                return(preferenceManager.UserSpecifiedExecutable);
            }

            return(acadLocator.GetMostRecentlyUsed());
        }
Ejemplo n.º 4
0
        private static string GetExecutable(TestIsolationOptions options, IAcadPreferenceManager preferenceManager, IAcadLocator acadLocator)
        {
            var executable = options.Properties.GetValue("AcadExePath");
            if (!string.IsNullOrEmpty(executable))
                return executable;

            if (preferenceManager.StartupAction == StartupAction.StartUserSpecified)
                return preferenceManager.UserSpecifiedExecutable;

            return acadLocator.GetMostRecentlyUsed();
        }