/// <summary>
        /// Creates a new instance of this Rhino.Api.Simulator.Framework.XrayAutomationProvider.
        /// </summary>
        /// <param name="configuration">Rhino.Api.Contracts.Configuration.RhinoConfiguration to use with this provider.</param>
        /// <param name="types">A collection of <see cref="Type"/> to load for this repository.</param>
        /// <param name="logger">Gravity.Abstraction.Logging.ILogger implementation for this provider.</param>
        public XrayCloudAutomationProvider(RhinoConfiguration configuration, IEnumerable <Type> types, ILogger logger)
            : base(configuration, types, logger)
        {
            // setup
            this.logger = logger?.Setup(loggerName: nameof(XrayCloudAutomationProvider));
            jiraClient  = new JiraClient(configuration.GetJiraAuthentication());
            xpandClient = new XpandClient(configuration.GetJiraAuthentication());
            executor    = new JiraCommandsExecutor(configuration.GetJiraAuthentication());

            // capabilities
            BucketSize = configuration.GetBucketSize();
            configuration.PutDefaultCapabilities();
            capabilities = configuration.Capabilities.ContainsKey($"{Connector.JiraXryCloud}:options")
                ? configuration.Capabilities[$"{Connector.JiraXryCloud}:options"] as IDictionary <string, object>
                : new Dictionary <string, object>();

            // misc
            options = new ParallelOptions {
                MaxDegreeOfParallelism = BucketSize
            };

            // integration
            bugsManager = new JiraBugsManager(jiraClient);
        }
コード例 #2
0
        /// <summary>
        /// Creates a new instance of this Rhino.Api.Simulator.Framework.XrayAutomationProvider.
        /// </summary>
        /// <param name="configuration">Rhino.Api.Contracts.Configuration.RhinoConfiguration to use with this provider.</param>
        /// <param name="types">A collection of <see cref="Type"/> to load for this repository.</param>
        /// <param name="logger">Gravity.Abstraction.Logging.ILogger implementation for this provider.</param>
        public XrayAutomationProvider(RhinoConfiguration configuration, IEnumerable <Type> types, ILogger logger)
            : base(configuration, types, logger)
        {
            // setup
            this.logger = logger?.Setup(loggerName: nameof(XrayAutomationProvider));

            var authentication = configuration.GetJiraAuthentication();

            jiraClient   = new JiraClient(authentication);
            jiraExecutor = new JiraCommandsExecutor(authentication);

            // capabilities
            BucketSize = configuration.GetBucketSize();
            configuration.PutDefaultCapabilities();
            capabilities = configuration.Capabilities.ContainsKey($"{Connector.JiraXRay}:options")
                ? configuration.Capabilities[$"{Connector.JiraXRay}:options"] as IDictionary <string, object>
                : new Dictionary <string, object>();

            // integration
            bugsManager = new JiraBugsManager(jiraClient);
        }