Esempio n. 1
0
        /// <summary>
        /// Creates a new <see cref="CreatedAcadProcess"/> instance.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">A AutoCAD command runner.</param>
        /// <param name="executable">The path to the AutoCAD executable.</param>
        /// <param name="processCreator">A process creator.</param>
        /// <param name="debuggerManager">A debugger mananger.</param>
        /// <param name="pluginLocator">A plugin locator.</param>
        public CreatedAcadProcess(ILogger logger, IAcadCommandRunner commandRunner,
                                  string executable, IProcessCreator processCreator, IDebuggerManager debuggerManager,
                                  IAcadPluginLocator pluginLocator)
            : base(logger, commandRunner, pluginLocator)
        {
            if (executable == null)
            {
                throw new ArgumentNullException("executable");
            }
            if (processCreator == null)
            {
                throw new ArgumentNullException("processCreator");
            }
            if (debuggerManager == null)
            {
                throw new ArgumentNullException("debuggerManager");
            }
            if (pluginLocator == null)
            {
                throw new ArgumentNullException("pluginLocator");
            }

            startInfo            = new ProcessStartInfo(executable);
            this.processCreator  = processCreator;
            this.debuggerManager = debuggerManager;
        }
        /// <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;
        }
        /// <summary>
        /// Creates a new <see cref="ExistingAcadProcess"/> instane.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">An AutoCAD command runner.</param>
        /// <param name="process">The existing AutoCAD process.</param>
        /// <param name="pluginLocator">An AutoCAD plugin locator.</param>
        public ExistingAcadProcess(ILogger logger, IAcadCommandRunner commandRunner, IProcess process, IAcadPluginLocator pluginLocator)
            : base(logger, commandRunner, pluginLocator)
        {
            if (process == null)
                throw new ArgumentNullException("process");

            this.process = process;
        }
Esempio n. 4
0
 /// <summary>
 /// Initializes a new <see cref="NetLoadCommand"/> object.
 /// </summary>
 public NetLoadCommand(ILogger logger, IAcadPluginLocator pluginLocator)
     : base("NETLOAD")
 {
     if (logger == null)
         throw new ArgumentNullException("logger");
     if (pluginLocator == null)
         throw new ArgumentNullException("pluginLocator");
     this.logger = logger;
     this.pluginLocator = pluginLocator;
 }
Esempio n. 5
0
        /// <summary>
        /// Creates a new <see cref="AcadProcessBase"/> instance.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">A AutoCAD command runner.</param>
        /// <param name="pluginLocator">A AutoCAD plugin locator.</param>
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="logger"/> or <paramref name="commandRunner"/> are null.
        /// </exception>
        protected AcadProcessBase(ILogger logger, IAcadCommandRunner commandRunner, IAcadPluginLocator pluginLocator)
        {
            if (logger == null)
                throw new ArgumentNullException("logger");
            if (commandRunner == null)
                throw new ArgumentNullException("commandRunner");
            if (pluginLocator == null)
                throw new ArgumentNullException("pluginLocator");

            this.logger = logger;
            this.commandRunner = commandRunner;
            this.pluginLocator = pluginLocator;
        }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new <see cref="NetLoadCommand"/> object.
 /// </summary>
 public NetLoadCommand(ILogger logger, IAcadPluginLocator pluginLocator)
     : base("NETLOAD")
 {
     if (logger == null)
     {
         throw new ArgumentNullException("logger");
     }
     if (pluginLocator == null)
     {
         throw new ArgumentNullException("pluginLocator");
     }
     this.logger        = logger;
     this.pluginLocator = pluginLocator;
 }
Esempio n. 7
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;
        }
        /// <summary>
        /// Creates a new <see cref="CreatedAcadProcess"/> instance.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">A AutoCAD command runner.</param>
        /// <param name="executable">The path to the AutoCAD executable.</param>
        /// <param name="processCreator">A process creator.</param>
        /// <param name="debuggerManager">A debugger mananger.</param>
        /// <param name="pluginLocator">A plugin locator.</param>
        public CreatedAcadProcess(ILogger logger, IAcadCommandRunner commandRunner,
            string executable, IProcessCreator processCreator, IDebuggerManager debuggerManager,
            IAcadPluginLocator pluginLocator)
            : base(logger, commandRunner, pluginLocator)
        {
            if (executable == null)
                throw new ArgumentNullException("executable");
            if (processCreator == null)
                throw new ArgumentNullException("processCreator");
            if (debuggerManager == null)
                throw new ArgumentNullException("debuggerManager");
            if (pluginLocator == null)
                throw new ArgumentNullException("pluginLocator");

            startInfo = new ProcessStartInfo(executable);
            this.processCreator = processCreator;
            this.debuggerManager = debuggerManager;
        }
Esempio n. 9
0
        /// <summary>
        /// Creates a new <see cref="AcadProcessBase"/> instance.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">A AutoCAD command runner.</param>
        /// <param name="pluginLocator">A AutoCAD plugin locator.</param>
        /// <exception cref="ArgumentNullException">
        /// If <paramref name="logger"/> or <paramref name="commandRunner"/> are null.
        /// </exception>
        protected AcadProcessBase(ILogger logger, IAcadCommandRunner commandRunner, IAcadPluginLocator pluginLocator)
        {
            if (logger == null)
            {
                throw new ArgumentNullException("logger");
            }
            if (commandRunner == null)
            {
                throw new ArgumentNullException("commandRunner");
            }
            if (pluginLocator == null)
            {
                throw new ArgumentNullException("pluginLocator");
            }

            this.logger        = logger;
            this.commandRunner = commandRunner;
            this.pluginLocator = pluginLocator;
        }
Esempio n. 10
0
        /// <summary>
        /// Creates a new <see cref="ExistingAcadProcess"/> instane.
        /// </summary>
        /// <param name="logger">A logger.</param>
        /// <param name="commandRunner">An AutoCAD command runner.</param>
        /// <param name="process">The existing AutoCAD process.</param>
        /// <param name="pluginLocator">An AutoCAD plugin locator.</param>
        public ExistingAcadProcess(ILogger logger, IAcadCommandRunner commandRunner, IProcess process, IAcadPluginLocator pluginLocator)
            : base(logger, commandRunner, pluginLocator)
        {
            if (process == null)
            {
                throw new ArgumentNullException("process");
            }

            this.process = process;
        }