//// Concrete methods - cannot be overridden by a derived class

        /// <summary>
        /// Initializes a new instance of the CommonProcessing class
        /// </summary>
        /// <param name="theProgressWindowForm">The instance of the progress window form to use for reporting progress of the processing</param>
        /// <param name="theDebugInformation">The object that provides for the logging of debug information</param>
        /// <param name="performLatencyAnalysisProcessing">Boolean flag that indicates whether to perform latency analysis processing for data read from the packet capture</param>
        /// <param name="theLatencyAnalysisProcessing">The object that provides the latency analysis processing for data read from the packet capture</param>
        /// <param name="performBurstAnalysisProcessing">Boolean flag that indicates whether to perform burst analysis processing for data read from the packet capture</param>
        /// <param name="theBurstAnalysisProcessing">The object that provides the burst analysis processing for data read from the packet capture</param>
        /// <param name="performTimeAnalysisProcessing">Boolean flag that indicates whether to perform time analysis processing for data read from the packet capture</param>
        /// <param name="theTimeAnalysisProcessing">The object that provides the time analysis processing for data read from the packet capture</param>
        /// <param name="theSelectedPacketCapturePath">The path of the selected packet capture</param>
        /// <param name="useAlternativeSequenceNumber">Boolean flag that indicates whether to use the alternative sequence number in the data read from the packet capture, required for legacy recordings</param>
        /// <param name="minimizeMemoryUsage">Boolean flag that indicates whether to perform reading from the packet capture using a method that will minimize memory usage, possibly at the expense of increased processing time</param>
        protected CommonProcessing(ProgressWindowForm theProgressWindowForm, Analysis.DebugInformation theDebugInformation, bool performLatencyAnalysisProcessing, Analysis.LatencyAnalysis.Processing theLatencyAnalysisProcessing, bool performBurstAnalysisProcessing, Analysis.BurstAnalysis.Processing theBurstAnalysisProcessing, bool performTimeAnalysisProcessing, Analysis.TimeAnalysis.Processing theTimeAnalysisProcessing, string theSelectedPacketCapturePath, bool useAlternativeSequenceNumber, bool minimizeMemoryUsage)
        {
            this.theProgressWindowForm = theProgressWindowForm;

            this.theDebugInformation = theDebugInformation;

            this.performLatencyAnalysisProcessing = performLatencyAnalysisProcessing;
            this.theLatencyAnalysisProcessing     = theLatencyAnalysisProcessing;

            this.performBurstAnalysisProcessing = performBurstAnalysisProcessing;
            this.theBurstAnalysisProcessing     = theBurstAnalysisProcessing;

            this.performTimeAnalysisProcessing = performTimeAnalysisProcessing;
            this.theTimeAnalysisProcessing     = theTimeAnalysisProcessing;

            this.theSelectedPacketCapturePath = theSelectedPacketCapturePath;

            this.useAlternativeSequenceNumber = useAlternativeSequenceNumber;

            this.minimizeMemoryUsage = minimizeMemoryUsage;

            // Provide a default value for the network datalink type
            this.thePacketCaptureNetworkDataLinkType =
                (uint)PacketCapture.CommonConstants.NetworkDataLinkType.Invalid;

            // Provide a default value for the timestamp accuracy - not used for PCAP Next Generation and PCAP packet captures so default to zero
            this.thePacketCaptureTimestampAccuracy = 0.0;
        }
Example #2
0
        //// Concrete methods - override abstract methods on the base class

        /// <summary>
        /// Initializes a new instance of the Processing class
        /// </summary>
        /// <param name="theProgressWindowForm">The instance of the progress window form to use for reporting progress of the processing</param>
        /// <param name="theDebugInformation">The object that provides for the logging of debug information</param>
        /// <param name="performLatencyAnalysisProcessing">Boolean flag that indicates whether to perform latency analysis processing for data read from the packet capture</param>
        /// <param name="theLatencyAnalysisProcessing">The object that provides the latency analysis processing for data read from the packet capture</param>
        /// <param name="performBurstAnalysisProcessing">Boolean flag that indicates whether to perform burst analysis processing for data read from the packet capture</param>
        /// <param name="theBurstAnalysisProcessing">The object that provides the burst analysis processing for data read from the packet capture</param>
        /// <param name="performTimeAnalysisProcessing">Boolean flag that indicates whether to perform time analysis processing for data read from the packet capture</param>
        /// <param name="theTimeAnalysisProcessing">The object that provides the time analysis processing for data read from the packet capture</param>
        /// <param name="theSelectedPacketCapturePath">The path of the selected packet capture</param>
        /// <param name="useAlternativeSequenceNumber">Boolean flag that indicates whether to use the alternative sequence number in the data read from the packet capture, required for legacy recordings</param>
        /// <param name="minimizeMemoryUsage">Boolean flag that indicates whether to perform reading from the packet capture using a method that will minimize memory usage, possibly at the expense of increased processing time</param>
        public Processing(ProgressWindowForm theProgressWindowForm, Analysis.DebugInformation theDebugInformation, bool performLatencyAnalysisProcessing, Analysis.LatencyAnalysis.Processing theLatencyAnalysisProcessing, bool performBurstAnalysisProcessing, Analysis.BurstAnalysis.Processing theBurstAnalysisProcessing, bool performTimeAnalysisProcessing, Analysis.TimeAnalysis.Processing theTimeAnalysisProcessing, string theSelectedPacketCapturePath, bool useAlternativeSequenceNumber, bool minimizeMemoryUsage) :
            base(
                theProgressWindowForm,
                theDebugInformation,
                performLatencyAnalysisProcessing,
                theLatencyAnalysisProcessing,
                performBurstAnalysisProcessing,
                theBurstAnalysisProcessing,
                performTimeAnalysisProcessing,
                theTimeAnalysisProcessing,
                theSelectedPacketCapturePath,
                useAlternativeSequenceNumber,
                minimizeMemoryUsage)
        {
        }
        private void button1_Click(object sender, EventArgs e)
        {
            var model            = this.GetViewProfileModel();
            var validationResult = this.validationService.Validate(model);

            if (validationResult.Any())
            {
                var form = new ValidationForm(validationResult);
                form.ShowDialog();
                return;
            }

            var progressCallback = new ProgressWindowForm("New txt")
            {
                StartPosition = FormStartPosition.CenterParent
            };

            ;

            Task.Factory.StartNew(() => this.context.Send(state => progressCallback.ShowDialog(this), null));
            Task.Factory.StartNew(() => this.telnetService.Submit(model, progressCallback as IProgressCallback))
            .ContinueWith(this.ShowError, TaskContinuationOptions.OnlyOnFaulted)
            .ContinueWith(task => progressCallback.End());
        }