コード例 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProxyDataCollectionManager"/> class.
 /// </summary>
 /// <param name="arch">
 /// Architecture for datacollection process.
 /// </param>
 /// <param name="settingsXml">
 /// Runsettings that contains the datacollector related configuration.
 /// </param>
 /// <param name="dataCollectionRequestSender">
 /// Handles communication with datacollector process.
 /// </param>
 /// <param name="dataCollectionLauncher">
 /// Launches datacollector process.
 /// </param>
 internal ProxyDataCollectionManager(Architecture arch, string settingsXml, IDataCollectionRequestSender dataCollectionRequestSender, IDataCollectionLauncher dataCollectionLauncher)
 {
     this.settingsXml = settingsXml;
     this.dataCollectionRequestSender = dataCollectionRequestSender;
     this.dataCollectionLauncher      = dataCollectionLauncher;
     this.InitializeSocketCommunication(arch);
 }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ProxyDataCollectionManager"/> class.
 /// </summary>
 /// <param name="settingsXml">
 /// Runsettings that contains the datacollector related configuration.
 /// </param>
 /// <param name="dataCollectionRequestSender">
 /// Handles communication with datacollector process.
 /// </param>
 /// <param name="processHelper">
 /// The process Helper.
 /// </param>
 /// <param name="dataCollectionLauncher">
 /// Launches datacollector process.
 /// </param>
 internal ProxyDataCollectionManager(string settingsXml, IDataCollectionRequestSender dataCollectionRequestSender, IProcessHelper processHelper, IDataCollectionLauncher dataCollectionLauncher)
 {
     this.settingsXml = settingsXml;
     this.dataCollectionRequestSender = dataCollectionRequestSender;
     this.dataCollectionLauncher      = dataCollectionLauncher;
     this.processHelper     = processHelper;
     this.connectionTimeout = 5 * 1000;
 }
コード例 #3
0
 public CommunicationLayerIntegrationTests()
 {
     this.mockTestMessageEventHandler = new Mock <ObjectModel.Client.ITestMessageEventHandler>();
     this.dataCollectorSettings       = string.Format("<DataCollector friendlyName=\"CustomDataCollector\" uri=\"my://custom/datacollector\" assemblyQualifiedName=\"{0}\" codebase=\"{1}\" />", typeof(CustomDataCollector).AssemblyQualifiedName, typeof(CustomDataCollector).GetTypeInfo().Assembly.Location);
     this.runSettings            = string.Format(this.defaultRunSettings, this.dataCollectorSettings);
     this.processHelper          = new ProcessHelper();
     this.dataCollectionLauncher = DataCollectionLauncherFactory.GetDataCollectorLauncher(this.processHelper, this.runSettings);
 }
コード例 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProxyDataCollectionManager"/> class.
        /// </summary>
        /// <param name="settingsXml">
        /// Runsettings that contains the datacollector related configuration.
        /// </param>
        /// <param name="dataCollectionRequestSender">
        /// Handles communication with datacollector process.
        /// </param>
        /// <param name="processHelper">
        /// The process Helper.
        /// </param>
        /// <param name="dataCollectionLauncher">
        /// Launches datacollector process.
        /// </param>
        internal ProxyDataCollectionManager(string settingsXml, IDataCollectionRequestSender dataCollectionRequestSender, IProcessHelper processHelper, IDataCollectionLauncher dataCollectionLauncher)
        {
            // DataCollector process needs the information of the Extensions folder
            // Add the Extensions folder path to runsettings.
            this.settingsXml = UpdateExtensionsFolderInRunSettings(settingsXml);

            this.dataCollectionRequestSender = dataCollectionRequestSender;
            this.dataCollectionLauncher      = dataCollectionLauncher;
            this.processHelper     = processHelper;
            this.connectionTimeout = 5 * 1000;
        }
コード例 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ProxyDataCollectionManager"/> class.
        /// </summary>
        /// <param name="requestData">
        /// Request Data providing common execution/discovery services.
        /// </param>
        /// <param name="settingsXml">
        /// Runsettings that contains the datacollector related configuration.
        /// </param>
        /// <param name="dataCollectionRequestSender">
        /// Handles communication with datacollector process.
        /// </param>
        /// <param name="processHelper">
        /// The process Helper.
        /// </param>
        /// <param name="dataCollectionLauncher">
        /// Launches datacollector process.
        /// </param>
        internal ProxyDataCollectionManager(IRequestData requestData, string settingsXml, IDataCollectionRequestSender dataCollectionRequestSender, IProcessHelper processHelper, IDataCollectionLauncher dataCollectionLauncher)
        {
            // DataCollector process needs the information of the Extensions folder
            // Add the Extensions folder path to runsettings.
            this.settingsXml = UpdateExtensionsFolderInRunSettings(settingsXml);
            this.requestData = requestData;

            this.dataCollectionRequestSender = dataCollectionRequestSender;
            this.dataCollectionLauncher      = dataCollectionLauncher;
            this.processHelper     = processHelper;
            this.connectionTimeout = ProxyDataCollectionManager.DataCollectorConnectionTimeout;
            this.LogEnabledDataCollectors();
        }
コード例 #6
0
 public CommunicationLayerIntegrationTests()
 {
     this.mockTestMessageEventHandler = new Mock <ObjectModel.Client.ITestMessageEventHandler>();
     this.mockRequestData             = new Mock <IRequestData>();
     this.mockMetricsCollection       = new Mock <IMetricsCollection>();
     this.mockRequestData.Setup(rd => rd.MetricsCollection).Returns(this.mockMetricsCollection.Object);
     this.dataCollectorSettings = string.Format("<DataCollector friendlyName=\"CustomDataCollector\" uri=\"my://custom/datacollector\" assemblyQualifiedName=\"{0}\" codebase=\"{1}\" />", typeof(CustomDataCollector).AssemblyQualifiedName, typeof(CustomDataCollector).GetTypeInfo().Assembly.Location);
     this.runSettings           = string.Format(this.defaultRunSettings, this.dataCollectorSettings);
     this.testSources           = new List <string>()
     {
         "testsource1.dll"
     };
     this.processHelper          = new ProcessHelper();
     this.dataCollectionLauncher = DataCollectionLauncherFactory.GetDataCollectorLauncher(this.processHelper, this.runSettings);
 }