예제 #1
0
    // Start is called before the first frame update
    void Awake()
    {
        string universeName = $"your-universe-name.sp.backtrace.io";
        string token        = "token";

        _backtraceClient = IntegrationFactory.CreateErrorReporter(universeName, token);
    }
예제 #2
0
        public bool LaunchJob(PostLaunchJobRequest request)
        {
            ProcessBase process = IntegrationFactory.GetIntegrationProcess(
                request.CustomerId, request.AdmUserId, request.JobId);
            IProcessArguments pargs = new IntegrationJobArguments()
            {
                CustomerID               = request.CustomerId,
                AdmIntegrationJobID      = request.JobId,
                AdmUserID                = request.AdmUserId,
                AdmIntegrationJobsFileID = request.FileId
                                           //IsImport = true
            };

            var job = JobManager.Instance.DoJobAsync(a => process.Run(pargs));

            process.OnStatusChanged += (sender, e) =>
            {
                Trace.Write(e.StatusMessage);
            };
            process.OnStepChanged += (sender, e) =>
            {
                Trace.Write(e.StatusMessage);
                job.ReportProgress(e.PercentComplete, e.StatusMessage);
            };
            process.OnComplete += (sender, result) =>
            {
                job.OnSendResults(result);
                job.ReportComplete();
            };
            JobStorage.Instance.StoreGlobalJobId(job.Id);

            return(true);
        }
예제 #3
0
        public OrganizationService(CacheManager cacheManager, CryptoHelper cryptoHelper,
                                   ISignUpUnitOfWork signUpUnitOfWork,
                                   ILogOnUnitOfWork logOnUnitOfWork,
                                   IUserRepository userRepository, UserFactory userFactory,
                                   IOrganizationRepository organizationRepository,
                                   LabelFactory labelFactory,
                                   OrganizationFactory organizationFactory,
                                   IUserLoginLogRepository userLoginLogRepository, UserLoginLogFactory userLoginLogFactory,
                                   IntegrationFactory integrationFactory,
                                   ILabelRepository labelRepository,
                                   IntegrationClientFactory integrationClientFactory,
                                   ProjectFactory projectFactory,
                                   ILanguageRepository languageRepository)
        {
            _cacheManager = cacheManager;
            _cryptoHelper = cryptoHelper;

            _signUpUnitOfWork         = signUpUnitOfWork;
            _logOnUnitOfWork          = logOnUnitOfWork;
            _userRepository           = userRepository;
            _userFactory              = userFactory;
            _organizationRepository   = organizationRepository;
            _labelFactory             = labelFactory;
            _organizationFactory      = organizationFactory;
            _userLoginLogRepository   = userLoginLogRepository;
            _userLoginLogFactory      = userLoginLogFactory;
            _integrationFactory       = integrationFactory;
            _labelRepository          = labelRepository;
            _integrationClientFactory = integrationClientFactory;
            _projectFactory           = projectFactory;
            _languageRepository       = languageRepository;
        }
예제 #4
0
        public Person GetPerson(string key, string id)
        {
            Person person = null;
            IIntegrationFactory factory = new IntegrationFactory();
            var service = factory.GetService(key);

            if (service != null)
            {
                person = service.GetPerson("GUID");
            }
            return(person);
        }
예제 #5
0
        public void Run(
            TargetOperatingSystem os,
            List <string> targets,
            string outputFileName = null,
            string fileExtension  = null,
            string outputPath     = null)
        {
            var integrator      = IntegrationFactory.GetIntegrator(os);
            var rawTraces       = integrator.GetTraces(targets);
            var rootNodeOfGraph = integrator.ParseRawTraces(rawTraces);
            var painter         = new Painter(rootNodeOfGraph);

            painter.Draw(outputFileName, fileExtension, outputPath);
        }
예제 #6
0
 public IntegrationService(CacheManager cacheManager,
                           IOrganizationRepository organizationRepository,
                           IIntegrationRepository integrationRepository, IntegrationFactory integrationFactory,
                           IIntegrationClientRepository integrationClientRepository, IntegrationClientFactory integrationClientFactory,
                           ITokenRepository tokenRepository, TokenFactory tokenFactory,
                           ITokenRequestLogRepository tokenRequestLogRepository, TokenRequestLogFactory tokenRequestLogFactory,
                           IProjectRepository projectRepository)
 {
     _cacheManager                = cacheManager;
     _organizationRepository      = organizationRepository;
     _integrationRepository       = integrationRepository;
     _integrationFactory          = integrationFactory;
     _integrationClientRepository = integrationClientRepository;
     _integrationClientFactory    = integrationClientFactory;
     _tokenRepository             = tokenRepository;
     _tokenFactory                = tokenFactory;
     _tokenRequestLogRepository   = tokenRequestLogRepository;
     _tokenRequestLogFactory      = tokenRequestLogFactory;
     _projectRepository           = projectRepository;
 }