public SpecFlowProjectCompilingEvent CreateProjectCompilingEvent(string msbuildVersion, string assemblyName, string targetFrameworks, string targetFramework, string projectGuid)
        {
            string userId              = _userUniqueIdStore.GetUserId();
            string unitTestProvider    = _unitTestProvider;
            string specFlowVersion     = GetSpecFlowVersion();
            string buildServerName     = GetBuildServerName();
            bool   isDockerContainer   = IsRunningInDockerContainer();
            string hashedAssemblyName  = ToSha256(assemblyName);
            string platform            = GetOSPlatform();
            string platformDescription = RuntimeInformation.OSDescription;

            var compiledEvent = new SpecFlowProjectCompilingEvent(
                DateTime.UtcNow,
                userId,
                platform,
                platformDescription,
                specFlowVersion,
                unitTestProvider,
                buildServerName,
                hashedAssemblyName,
                targetFrameworks,
                targetFramework,
                msbuildVersion,
                projectGuid,
                isDockerContainer);

            return(compiledEvent);
        }
Example #2
0
        public void TransmitSpecflowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
        {
            try
            {
                if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
                {
                    return;
                }

                _analyticsTransmitterSink.TransmitEvent(projectCompilingEvent);
            }
            catch (Exception)
            {
                //nope
            }
        }
Example #3
0
        public SpecFlowProjectCompilingEvent CreateProjectCompilingEvent(string msbuildVersion, string assemblyName, string targetFrameworks, string targetFramework, string projectGuid)
        {
            var userId              = _userUniqueIdStore.GetUserId();
            var unitTestProvider    = _unitTestProvider;
            var specFlowVersion     = GetSpecFlowVersion();
            var isBuildServer       = IsBuildServerMode();
            var hashedAssemblyName  = ToSha256(assemblyName);
            var platform            = GetOSPlatform();
            var platformDescription = RuntimeInformation.OSDescription;

            var compiledEvent = new SpecFlowProjectCompilingEvent(DateTime.UtcNow, userId,
                                                                  platform, platformDescription, specFlowVersion, unitTestProvider, isBuildServer,
                                                                  hashedAssemblyName, targetFrameworks, targetFramework, msbuildVersion,
                                                                  projectGuid);

            return(compiledEvent);
        }
Example #4
0
 public async Task <IResult> TransmitSpecFlowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
 {
     return(await TransmitEvent(projectCompilingEvent));
 }
Example #5
0
 public void TransmitSpecflowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
 {
     TransmitEvent(projectCompilingEvent);
 }