Пример #1
0
 protected override void BeginProcessing()
 {
     base.BeginProcessing();
     if (!(this.specifiedPath ^ this.isLiteralPath))
     {
         InvalidOperationException exception = new InvalidOperationException(CsvCommandStrings.CannotSpecifyPathAndLiteralPath);
         ErrorRecord errorRecord             = new ErrorRecord(exception, "CannotSpecifyPathAndLiteralPath", ErrorCategory.InvalidData, null);
         base.ThrowTerminatingError(errorRecord);
     }
     this.shouldProcess = base.ShouldProcess(this.Path);
     if (this.shouldProcess)
     {
         this.CreateFileStream();
         this.helper = new ExportCsvHelper(this, base.Delimiter);
     }
 }
Пример #2
0
 protected override void BeginProcessing()
 {
     base.BeginProcessing();
     if (!(this.specifiedPath ^ this.isLiteralPath))
     {
         InvalidOperationException exception = new InvalidOperationException(CsvCommandStrings.CannotSpecifyPathAndLiteralPath);
         ErrorRecord errorRecord = new ErrorRecord(exception, "CannotSpecifyPathAndLiteralPath", ErrorCategory.InvalidData, null);
         base.ThrowTerminatingError(errorRecord);
     }
     this.shouldProcess = base.ShouldProcess(this.Path);
     if (this.shouldProcess)
     {
         this.CreateFileStream();
         this.helper = new ExportCsvHelper(this, base.Delimiter);
     }
 }
Пример #3
0
 BeginProcessing()
 {
     base.BeginProcessing();
     _helper = new ExportCsvHelper(this, base.Delimiter);
 }
Пример #4
0
        /// <summary>
        /// BeginProcessing override
        /// </summary>
        protected override void BeginProcessing()
        {
            base.BeginProcessing();

            // Validate that they don't provide both Path and LiteralPath, but have provided at least one.
            if (!(_specifiedPath ^ _isLiteralPath))
            {
                InvalidOperationException exception = new InvalidOperationException(CsvCommandStrings.CannotSpecifyPathAndLiteralPath);
                ErrorRecord errorRecord = new ErrorRecord(exception, "CannotSpecifyPathAndLiteralPath", ErrorCategory.InvalidData, null);
                this.ThrowTerminatingError(errorRecord);
            }

            _shouldProcess = ShouldProcess(Path);
            if (!_shouldProcess) return;

            CreateFileStream();

            _helper = new ExportCsvHelper(this, base.Delimiter);
        }
Пример #5
0
 protected override void BeginProcessing()
 {
     base.BeginProcessing();
     this.helper = new ExportCsvHelper(this, base.Delimiter);
 }
Пример #6
0
 protected override void BeginProcessing()
 {
     base.BeginProcessing();
     this.helper = new ExportCsvHelper(this, base.Delimiter);
 }