Esempio n. 1
0
        public Orchestrator(IInitializer initializer,
                            ILog log, IAdo ado,
                            IAuthenticationWrapper authWrapper, IRetryClient retryClient, ILogAppender logAppender,
                            IO365ActivityApiWrapper o365ActivityApiWrapper)
        {
            _log                    = log;
            _logAppender            = logAppender;
            _authWrapper            = authWrapper;
            _o365ActivityApiWrapper = o365ActivityApiWrapper;
            _ado                    = ado;
            _initializer            = initializer;
            _configuration          = _initializer.Configuration;
            _retryClient            = retryClient;

            AuditLogTimeStampsForPowerPlatform = GetLatestTimeStampForPowerPlatform;

            _O365ServiceAuthenticationContract = new ServiceAuthenticationContract
            {
                ClientId     = _configuration.AppSettings.AuditLogClientId,
                ClientSecret = _configuration.AppSettings.AuditLogClientSecret,
                LoginUrl     = _configuration.AppSettings.LoginUrl,
                ResourceUrl  = _configuration.AppSettings.Office365ResourceId,
                TenantId     = _configuration.AppSettings.TenantId
            };
        }
Esempio n. 2
0
        public O365ActivityApiWrapper(ILog log, IInitializer initializer, IRetryClient retryClient)
        {
            _log           = log;
            _retryClient   = retryClient;
            _configuration = initializer.Configuration;

            _O365ServiceAuthenticationContract = new ServiceAuthenticationContract
            {
                ClientId     = _configuration.AppSettings.AuditLogClientId,
                ClientSecret = _configuration.AppSettings.AuditLogClientSecret,
                LoginUrl     = _configuration.AppSettings.LoginUrl,
                ResourceUrl  = _configuration.AppSettings.Office365ResourceId,
                TenantId     = _configuration.AppSettings.TenantId
            };
        }