예제 #1
0
        /// <summary>
        /// Builds this instance for specified executor type.
        /// </summary>
        /// <typeparam name="TExecutor">The type of the executor.</typeparam>
        public static TExecutor Build <TExecutor>(
            ILoggerFactory logger, IConfigurationStore configStore, IServiceExceptionHandler serviceExceptionHandler,
            string customerUid = null, string userId = null, string userEmailAddress = null, IHeaderDictionary headers = null,
            IProductivity3dV1ProxyCoord productivity3dV1ProxyCoord = null, IProductivity3dV2ProxyCompaction productivity3dV2ProxyCompaction = null,
            ITransferProxyFactory persistantTransferProxyFactory   = null, IFilterServiceProxy filterServiceProxy = null, ITRexImportFileProxy tRexImportFileProxy = null,
            IProjectRepository projectRepo        = null, IHttpContextAccessor httpContextAccessor = null, IDataOceanClient dataOceanClient = null,
            ITPaaSApplicationAuthentication authn = null, ISchedulerProxy schedulerProxy           = null, IPegasusClient pegasusClient     = null,
            ICwsProjectClient cwsProjectClient    = null, ICwsDeviceClient cwsDeviceClient         = null,
            ICwsProfileSettingsClient cwsProfileSettingsClient = null,
            IWebRequest gracefulClient = null, INotificationHubClient notificationHubClient = null
            )
            where TExecutor : RequestExecutorContainer, new()
        {
            ILogger log = null;

            if (logger != null)
            {
                log = logger.CreateLogger <RequestExecutorContainer>();
            }

            var executor = new TExecutor();

            executor.Initialise(
                log, configStore, serviceExceptionHandler, customerUid, userId, userEmailAddress, headers,
                productivity3dV1ProxyCoord, productivity3dV2ProxyCompaction,
                persistantTransferProxyFactory, filterServiceProxy, tRexImportFileProxy, projectRepo,
                httpContextAccessor, dataOceanClient, authn, schedulerProxy, pegasusClient, cwsProjectClient, cwsDeviceClient,
                cwsProfileSettingsClient, gracefulClient, notificationHubClient
                );

            return(executor);
        }
예제 #2
0
 public void Initialise(ILogger logger, IConfigurationStore configStore,
                        IServiceExceptionHandler serviceExceptionHandler,
                        string customerUid, string userId = null, string userEmailAddress = null,
                        IHeaderDictionary headers         = null,
                        IProductivity3dV1ProxyCoord productivity3dV1ProxyCoord           = null,
                        IProductivity3dV2ProxyCompaction productivity3dV2ProxyCompaction = null,
                        ITransferProxyFactory persistantTransferProxyFactory             = null, IFilterServiceProxy filterServiceProxy = null,
                        ITRexImportFileProxy tRexImportFileProxy           = null, IProjectRepository projectRepo = null,
                        IHttpContextAccessor httpContextAccessor           = null,
                        IDataOceanClient dataOceanClient                   = null, ITPaaSApplicationAuthentication authn = null,
                        ISchedulerProxy schedulerProxy                     = null, IPegasusClient pegasusClient          = null,
                        ICwsProjectClient cwsProjectClient                 = null, ICwsDeviceClient cwsDeviceClient      = null,
                        ICwsProfileSettingsClient cwsProfileSettingsClient = null,
                        IWebRequest gracefulClient = null, INotificationHubClient notificationHubClient = null)
 {
     log = logger;
     this.configStore             = configStore;
     this.serviceExceptionHandler = serviceExceptionHandler;
     this.customerUid             = customerUid;
     this.userId                          = userId;
     this.userEmailAddress                = userEmailAddress;
     this.customHeaders                   = headers;
     this.productivity3dV1ProxyCoord      = productivity3dV1ProxyCoord;
     this.productivity3dV2ProxyCompaction = productivity3dV2ProxyCompaction;
     this.persistantTransferProxyFactory  = persistantTransferProxyFactory;
     this.filterServiceProxy              = filterServiceProxy;
     this.tRexImportFileProxy             = tRexImportFileProxy;
     this.projectRepo                     = projectRepo;
     this.httpContextAccessor             = httpContextAccessor;
     this.dataOceanClient                 = dataOceanClient;
     this.authn                    = authn;
     this.schedulerProxy           = schedulerProxy;
     this.pegasusClient            = pegasusClient;
     this.cwsProjectClient         = cwsProjectClient;
     this.cwsDeviceClient          = cwsDeviceClient;
     this.cwsProfileSettingsClient = cwsProfileSettingsClient;
     this.gracefulClient           = gracefulClient;
     this.notificationHubClient    = notificationHubClient;
 }