/// <summary>
        /// Initializes a new instance of the <see cref="OpenShiftRequestController"/> class.
        /// </summary>
        /// <param name="appSettings">The key/value application settings DI.</param>
        /// <param name="telemetryClient">ApplicationInsights DI.</param>
        /// <param name="openShiftActivity">The open shift activity DI.</param>
        /// <param name="userMappingProvider">The user mapping provider DI.</param>
        /// <param name="teamDepartmentMappingProvider">The Team Department Mapping DI.</param>
        /// <param name="openShiftRequestMappingEntityProvider">The Open Shift Request Mapping DI.</param>
        /// <param name="httpClientFactory">http client.</param>
        /// <param name="openShiftMappingEntityProvider">The Open Shift Mapping DI.</param>
        /// <param name="utility">The common utility methods DI.</param>
        /// <param name="shiftMappingEntityProvider">Shift entity mapping provider DI.</param>
        /// <param name="taskWrapper">Wrapper class instance for BackgroundTask.</param>
        public OpenShiftRequestController(
            AppSettings appSettings,
            TelemetryClient telemetryClient,
            IOpenShiftActivity openShiftActivity,
            IUserMappingProvider userMappingProvider,
            ITeamDepartmentMappingProvider teamDepartmentMappingProvider,
            IOpenShiftRequestMappingEntityProvider openShiftRequestMappingEntityProvider,
            IHttpClientFactory httpClientFactory,
            IOpenShiftMappingEntityProvider openShiftMappingEntityProvider,
            Utility utility,
            IShiftMappingEntityProvider shiftMappingEntityProvider,
            BackgroundTaskWrapper taskWrapper)
        {
            if (appSettings is null)
            {
                throw new ArgumentNullException(nameof(appSettings));
            }

            this.appSettings                           = appSettings;
            this.telemetryClient                       = telemetryClient;
            this.openShiftActivity                     = openShiftActivity;
            this.userMappingProvider                   = userMappingProvider;
            this.teamDepartmentMappingProvider         = teamDepartmentMappingProvider;
            this.openShiftRequestMappingEntityProvider = openShiftRequestMappingEntityProvider;
            this.openShiftMappingEntityProvider        = openShiftMappingEntityProvider;
            this.httpClientFactory                     = httpClientFactory;
            this.openShiftQueryDateSpan                = $"{this.appSettings.ShiftStartDate}-{this.appSettings.ShiftEndDate}";
            this.utility = utility;
            this.shiftMappingEntityProvider = shiftMappingEntityProvider;
            this.taskWrapper = taskWrapper;
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenShiftController"/> class.
        /// </summary>
        /// <param name="appSettings">Configuration DI.</param>
        /// <param name="telemetryClient">Telemetry Client.</param>
        /// <param name="openShiftActivity">OpenShift activity.</param>
        /// <param name="utility">Unique ID utility DI.</param>
        /// <param name="openShiftMappingEntityProvider">Open Shift Entity Mapping DI.</param>
        /// <param name="teamDepartmentMappingProvider">Team Department Mapping Provider DI.</param>
        /// <param name="httpClientFactory">http client.</param>
        /// <param name="openShiftRequestMappingEntityProvider">Open Shift Request Entity Mapping DI.</param>
        /// <param name="taskWrapper">Wrapper class instance for BackgroundTask.</param>
        public OpenShiftController(
            AppSettings appSettings,
            TelemetryClient telemetryClient,
            IOpenShiftActivity openShiftActivity,
            Utility utility,
            IGraphUtility graphUtility,
            IOpenShiftMappingEntityProvider openShiftMappingEntityProvider,
            ITeamDepartmentMappingProvider teamDepartmentMappingProvider,
            IHttpClientFactory httpClientFactory,
            IOpenShiftRequestMappingEntityProvider openShiftRequestMappingEntityProvider,
            BackgroundTaskWrapper taskWrapper)
        {
            if (appSettings is null)
            {
                throw new ArgumentNullException(nameof(appSettings));
            }

            this.appSettings       = appSettings;
            this.telemetryClient   = telemetryClient;
            this.openShiftActivity = openShiftActivity;
            this.utility           = utility;
            this.graphUtility      = graphUtility;
            this.openShiftMappingEntityProvider = openShiftMappingEntityProvider;
            this.teamDepartmentMappingProvider  = teamDepartmentMappingProvider;
            this.httpClientFactory = httpClientFactory;
            this.openShiftRequestMappingEntityProvider = openShiftRequestMappingEntityProvider;
            this.taskWrapper = taskWrapper;
        }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TeamsController"/> class.
 /// </summary>
 /// <param name="telemetryClient">ApplicationInsights DI.</param>
 /// <param name="configurationProvider">ConfigurationProvider DI.</param>
 /// <param name="openShiftRequestController">OpenShiftRequestController DI.</param>
 /// <param name="swapShiftController">SwapShiftController DI.</param>
 /// <param name="utility">The common utility methods DI.</param>
 /// <param name="userMappingProvider">The user mapping provider DI.</param>
 /// <param name="shiftMappingEntityProvider">The shift entity mapping provider DI.</param>
 /// <param name="openShiftRequestMappingEntityProvider">The open shift request mapping entity provider DI.</param>
 /// <param name="openShiftMappingEntityProvider">The open shift mapping entity provider DI.</param>
 /// <param name="swapShiftMappingEntityProvider">The swap shift mapping entity provider DI.</param>
 public TeamsController(
     TelemetryClient telemetryClient,
     IConfigurationProvider configurationProvider,
     OpenShiftRequestController openShiftRequestController,
     SwapShiftController swapShiftController,
     Common.Utility utility,
     IUserMappingProvider userMappingProvider,
     IShiftMappingEntityProvider shiftMappingEntityProvider,
     IOpenShiftRequestMappingEntityProvider openShiftRequestMappingEntityProvider,
     IOpenShiftMappingEntityProvider openShiftMappingEntityProvider,
     ISwapShiftMappingEntityProvider swapShiftMappingEntityProvider)
 {
     this.telemetryClient            = telemetryClient;
     this.configurationProvider      = configurationProvider;
     this.openShiftRequestController = openShiftRequestController;
     this.swapShiftController        = swapShiftController;
     this.utility                               = utility;
     this.userMappingProvider                   = userMappingProvider;
     this.shiftMappingEntityProvider            = shiftMappingEntityProvider;
     this.openShiftRequestMappingEntityProvider = openShiftRequestMappingEntityProvider;
     this.openShiftMappingEntityProvider        = openShiftMappingEntityProvider;
     this.swapShiftMappingEntityProvider        = swapShiftMappingEntityProvider;
 }