Пример #1
0
        public async Task RunAsync()
        {
            if (hasRunBefore)
            {
                throw new InvalidOperationException(
                          "Can't run the startup preparation twice.");
            }

            if (Arguments == null)
            {
                throw new ArgumentNullException(
                          nameof(Arguments));
            }

            hasRunBefore = true;

            processManager.CloseAllDuplicateProcessesExceptCurrent();
            aggregateArgumentProcessor.ProcessArguments(Arguments);
        }