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

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