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);
        }
Exemple #2
0
        public void TransmitSpecflowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
        {
            try
            {
                if (!_environmentSpecFlowTelemetryChecker.IsSpecFlowTelemetryEnabled())
                {
                    return;
                }

                _analyticsTransmitterSink.TransmitEvent(projectCompilingEvent);
            }
            catch (Exception)
            {
                //nope
            }
        }
Exemple #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);
        }
 public async Task <IResult> TransmitSpecFlowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
 {
     return(await TransmitEvent(projectCompilingEvent));
 }
 public void TransmitSpecflowProjectCompilingEvent(SpecFlowProjectCompilingEvent projectCompilingEvent)
 {
     TransmitEvent(projectCompilingEvent);
 }