From 76cd6f9b56c5a51e229d126fc9694bd3509537d3 Mon Sep 17 00:00:00 2001 From: Harsh Jain Date: Mon, 11 Sep 2017 12:16:25 +0530 Subject: [PATCH] Removing as it is no longer used. --- .../Events/DataRequestEventArgs.cs | 161 ------------------ 1 file changed, 161 deletions(-) delete mode 100644 src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataRequestEventArgs.cs diff --git a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataRequestEventArgs.cs b/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataRequestEventArgs.cs deleted file mode 100644 index 2285270b0a..0000000000 --- a/src/Microsoft.TestPlatform.ObjectModel/DataCollector/Events/DataRequestEventArgs.cs +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under the MIT license. See LICENSE file in the project root for full license information. - -namespace Microsoft.VisualStudio.TestPlatform.ObjectModel.DataCollection -{ - using System; - using System.Diagnostics; - - /// - /// Data Request event arguments - /// -#if NET451 - [Serializable] -#endif - public sealed class DataRequestEventArgs : TestCaseEventArgs - { - #region Constants - - /// - /// Default test case ID used when sending the event for a session data request - /// - private static readonly Guid DefaultTestCaseId = Guid.Empty; - - /// - /// Default test case name used when sending the event for a session data request - /// - private static readonly string DefaultTestCaseName = string.Empty; - - /// - /// Default value for flag indicating whether this is a child test case - /// - private const bool DefaultIsChildTestCase = false; - - #endregion - - #region Constructors - - /// - /// Initializes the instance by storing the given information - /// - /// Context information for the test case - /// How much of the previously collected data the requestor is interested in. - internal DataRequestEventArgs(DataCollectionContext context, TimeSpan requestedDuration) - : this(context, DefaultTestCaseId, DefaultTestCaseName, DefaultIsChildTestCase, requestedDuration) - { - Debug.Assert( - !context.HasTestCase, - "This constructor overload is to be used only for a session data request" - ); - } - - /// - /// Initializes the instance by storing the given information - /// - /// Context information for the test case - /// The test case ID - /// - /// Information used to obtain further data about the test from the Test Case Management (TCM) server, - /// or null if the test did not originate from TCM. - /// - /// The test case name - /// - /// True if this is a child test case, false if this is a top-level test case - /// - /// How much of the previously collected data the requestor is interested in. - internal DataRequestEventArgs( - DataCollectionContext context, - Guid testCaseId, - //TcmInformation tcmInformation, - string testCaseName, - bool isChildTestCase, - TimeSpan requestedDuration) - : base(context, testCaseId, testCaseName, isChildTestCase) - { - RequestId = new RequestId(); - RequestedDuration = requestedDuration; - } - - /// - /// Initializes the instance by storing the given information. - /// - /// Context information for the test case - /// The test element of the test that this event is for. - /// - /// Information used to obtain further data about the test from the Test Case Management (TCM) server, - /// or null if the test did not originate from TCM. - /// - /// How much of the previously collected data the requestor is interested in. - public DataRequestEventArgs( - DataCollectionContext context, - TestCase testElement, - //TcmInformation tcmInformation, - TimeSpan requestedDuration) - : base(context, testElement) - { - // NOTE: ONLY USE FOR UNIT TESTING! - // This overload is only here for 3rd parties to use for unit testing - // their data collectors. Internally we should not be passing the test element - // around in the events as this is extra information that needs to be seralized - // and the Execution Plugin Manager will fill this in for us before the event - // is sent to the data collector when running in a production environment. - - RequestId = new RequestId(); - RequestedDuration = requestedDuration; - } - - #endregion - - #region Properties - - /// - /// Gets the request ID that uniquely identifies this request context - /// - public RequestId RequestId - { - get; - private set; - } - - /// - /// How much of the previously collected data the requestor is interested in. A value - /// of is used to request all data. - /// - /// - /// It is up to each individual data collector to respect this value when returning data. - /// Some collectors may not be able to break up their data and will return the full - /// set of data instead of just the requested portion. - /// - public TimeSpan RequestedDuration - { - get; - private set; - } - - #endregion - } - - /// - /// Event arguments for the event that tells the plugin manager to flush any remaining data - /// collectors have sent into the result sink, and then append a token at the end, to - /// indicate that all the data has been flushed into the result sink. - /// -#if NET451 - [Serializable] -#endif - internal sealed class FlushDataEventArgs : DataCollectionEventArgs - { - #region Constructor - - /// - /// Initializes the instance by storing the given information - /// - /// Context information for the test case - internal FlushDataEventArgs(DataCollectionContext context) - : base(context) - { - } - - #endregion - } -} \ No newline at end of file