protected virtual IInProcDataCollector CreateDataCollector(DataCollectorSettings dataCollectorSettings, TypeInfo interfaceTypeInfo)
        {
            var inProcDataCollector = new InProcDataCollector(dataCollectorSettings.CodeBase, dataCollectorSettings.AssemblyQualifiedName,
                                                              interfaceTypeInfo, dataCollectorSettings.Configuration.OuterXml);

            inProcDataCollector.LoadDataCollector(inProcDataCollectionSink);

            return(inProcDataCollector);
        }
        /// <summary>
        /// Creates data collector instance based on datacollector settings provided.
        /// </summary>
        /// <param name="dataCollectorSettings">
        /// Settings to be used for creating DataCollector.
        /// </param>
        /// <param name="interfaceTypeInfo">
        /// TypeInfo of datacollector.
        /// </param>
        /// <returns>
        /// The <see cref="IInProcDataCollector"/>.
        /// </returns>
        protected virtual IInProcDataCollector CreateDataCollector(string assemblyQualifiedName, string codebase, XmlElement configuration, TypeInfo interfaceTypeInfo)
        {
            var inProcDataCollector = new InProcDataCollector(
                codebase,
                assemblyQualifiedName,
                interfaceTypeInfo,
                configuration?.OuterXml);

            inProcDataCollector.LoadDataCollector(this.inProcDataCollectionSink);

            return(inProcDataCollector);
        }