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 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 #3
0
        private TelemetryClient GetTelemetryClient(IUserUniqueIdStore userUniqueIdStore)
        {
            var userUniqueId = userUniqueIdStore.GetUserId();

            return(new TelemetryClient
            {
                Context =
                {
                    User          =
                    {
                        Id        = userUniqueId,
                        AccountId = userUniqueId
                    },
                },
            });
        }